{"id":"CVE-2022-49001","aliases":["CVE-2022-49001"],"related":[],"kind":"vulnerability","state":"published","title":"riscv: fix race when vmap stack overflow","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: fix race when vmap stack overflow\n\nCurrently, when detecting vmap stack overflow, riscv firstly switches\nto the so called shadow stack, then use this shadow stack to call the\nget_overflow_stack() to get the overflow stack. However, there's\na race here if two or more harts use the same shadow stack at the same\ntime.\n\nTo solve this race, we introduce spin_shadow_stack atomic var, which\nwill be swap between its own address and 0 in atomic way, when the\nvar is set, it means the shadow_stack is being used; when the var\nis cleared, it means the shadow_stack isn't being used.\n\n[Palmer: Add AQ to the swap, and also some comments.]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: fix race when vmap stack overflow\n\nCurrently, when detecting vmap stack overflow, riscv firstly switches\nto the so called shadow stack, then use this shadow stack to call the\nget_overflow_stack() to get the overflow stack. However, there's\na race here if two or more harts use the same shadow stack at the same\ntime.\n\nTo solve this race, we introduce spin_shadow_stack atomic var, which\nwill be swap between its own address and 0 in atomic way, when the\nvar is set, it means the shadow_stack is being used; when the var\nis cleared, it means the shadow_stack isn't being used.\n\n[Palmer: Add AQ to the swap, and also some comments.]","source":"cvelist"},{"lang":"es","text":"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].","source":"nvd"}],"published":"2024-10-21T20:06:15.443Z","modified":"2026-08-05T08:53:23.800Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"}],"cwes":["CWE-362"],"affected":[{"ranges":[{"type":"git","introduced":"31da94c25aea835ceac00575a9fd206c5a833fed","fixed":"ac00301adb19df54f2eae1efc4bad7447c0156ce","status":"affected"},{"type":"git","introduced":"31da94c25aea835ceac00575a9fd206c5a833fed","fixed":"879fabc5a95401d9bce357e4b1d24ae4a360a81f","status":"affected"},{"type":"git","introduced":"31da94c25aea835ceac00575a9fd206c5a833fed","fixed":"7e1864332fbc1b993659eab7974da9fe8bf8c128","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.14","status":"unaffected"},{"type":"semver","introduced":"5.15.82","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.0.12","lastAffected":"6.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.14","fixed":"5.15.82"},{"status":"affected","introduced":"5.16","fixed":"6.0.12"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ac00301adb19df54f2eae1efc4bad7447c0156ce","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/879fabc5a95401d9bce357e4b1d24ae4a360a81f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7e1864332fbc1b993659eab7974da9fe8bf8c128","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-10-22T13:15:10.722Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49001","url":"https://www.cve.org/CVERecord?id=CVE-2022-49001","licence":"CVE Terms of Use","modified":"2026-08-05T08:53:23.800Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49001","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49001","licence":"Public domain","modified":"2026-08-04T10:17:30.553Z"}],"updatedAt":"2026-11-25T22:58:20.025Z","epss":{"score":0.0019,"percentile":0.09074,"date":"2026-12-01T12:00:22.000Z"}}