Bug 2320666 (CVE-2022-49001) - CVE-2022-49001 kernel: riscv: fix race when vmap stack overflow
Summary: CVE-2022-49001 kernel: riscv: fix race when vmap stack overflow
Keywords:
Status: NEW
Alias: CVE-2022-49001
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-10-21 21:01 UTC by OSIDB Bzimport
Modified: 2024-10-22 13:11 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-10-21 21:01:30 UTC
In the Linux kernel, the following vulnerability has been resolved:

riscv: fix race when vmap stack overflow

Currently, when detecting vmap stack overflow, riscv firstly switches
to the so called shadow stack, then use this shadow stack to call the
get_overflow_stack() to get the overflow stack. However, there's
a race here if two or more harts use the same shadow stack at the same
time.

To solve this race, we introduce spin_shadow_stack atomic var, which
will be swap between its own address and 0 in atomic way, when the
var is set, it means the shadow_stack is being used; when the var
is cleared, it means the shadow_stack isn't being used.

[Palmer: Add AQ to the swap, and also some comments.]

Comment 1 Avinash Hanwate 2024-10-22 08:57:52 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024102150-CVE-2022-49001-589c@gregkh/T

Comment 2 Avinash Hanwate 2024-10-22 12:44:19 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024102150-CVE-2022-49001-589c@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.