CVE-2022-49001
JSON

7.0high

riscv: fix race when vmap stack overflow

Severity
7.0high CVSS:3.1 by Linux
Exploit likelihood
0.19% (higher than 9% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

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.]

Affected

Product or packageVersionsReported by
Linux Linuxfrom 31da94c25aea835ceac00575a9fd206c5a833fed before ac00301adb19df54f2eae1efc4bad7447c0156ce, from 31da94c25aea835ceac00575a9fd206c5a833fed before 879fabc5a95401d9bce357e4b1d24ae4a360a81f, from 31da94c25aea835ceac00575a9fd206c5a833fed before 7e1864332fbc1b993659eab7974da9fe8bf8c128, 5.14
Not affected: before 5.14, from 5.15.82 up to 5.15.*, from 6.0.12 up to 6.0.*, from 6.1 up to *
CVE List
linux linux_kernelfrom 5.14 before 5.15.82, from 5.16 before 6.0.12, 6.1NVD

All scores

Linux7.0high CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD7.0high CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-362

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.]

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: riscv: arregla la ejecución cuando se desborda la pila de vmap Actualmente, al detectar un desbordamiento de la pila de vmap, riscv primero cambia a la llamada pila de sombra, luego usa esta pila de sombra para llamar a get_overflow_stack() para obtener la pila de desbordamiento. Sin embargo, aquí hay una ejecución si dos o más harts usan la misma pila de sombra al mismo tiempo. Para resolver esta ejecución, introducimos la variable atómica spin_shadow_stack, que se intercambiará entre su propia dirección y 0 de forma atómica, cuando la variable está configurada, significa que se está usando shadow_stack; cuando la variable se borra, significa que no se está usando shadow_stack. [Palmer: Agrega AQ al intercambio y también algunos comentarios].

References

Sources

SourceRecordLicence
CVE ListCVE-2022-49001 changed 2026-08-05CVE Terms of Use
NVDCVE-2022-49001 changed 2026-08-04Public domain