# CVE-2025-40358: riscv: stacktrace: Disable KASAN checks for non-current tasks

- Severity: High 7.1 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-12-16T13:39:57.847Z
- Modified: 2026-10-14T13:10:00.187Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

riscv: stacktrace: Disable KASAN checks for non-current tasks

Unwinding the stack of a task other than current, KASAN would report
"BUG: KASAN: out-of-bounds in walk_stackframe+0x41c/0x460"

There is a same issue on x86 and has been resolved by the commit
84936118bdf3 ("x86/unwind: Disable KASAN checks for non-current tasks")
The solution could be applied to RISC-V too.

This patch also can solve the issue:
https://seclists.org/oss-sec/2025/q4/23

[pjw@kernel.org: clean up checkpatch issues]

(As written by CVE List.)

## Affected

- Linux Linux: from 5d8544e2d0075a5f3c9a2cf27152354d54360da1 before ef4d626ac59a56f8ec5cc09c1fef26f2923eec6f; from 5d8544e2d0075a5f3c9a2cf27152354d54360da1 before f34ba22989da61186f30a40b6a82e0b3337b96fc; from 5d8544e2d0075a5f3c9a2cf27152354d54360da1 before 27379fcc15a10d3e3780fe79ba3fc7ed1ccd78e2; from 5d8544e2d0075a5f3c9a2cf27152354d54360da1 before 2c8d2b53866fb229b438296526ef0fa5a990e5e5; from 5d8544e2d0075a5f3c9a2cf27152354d54360da1 before 060ea84a484e852b52b938f234bf9b5503a6c910; 4.15 (not affected: before 4.15; from 6.1.167 up to 6.1.*; from 6.6.117 up to 6.6.*; from 6.12.58 up to 6.12.*; from 6.17.8 up to 6.17.*; from 6.18 up to *)

## References

- <https://git.kernel.org/stable/c/ef4d626ac59a56f8ec5cc09c1fef26f2923eec6f>
- <https://git.kernel.org/stable/c/f34ba22989da61186f30a40b6a82e0b3337b96fc>
- <https://git.kernel.org/stable/c/27379fcc15a10d3e3780fe79ba3fc7ed1ccd78e2>
- <https://git.kernel.org/stable/c/2c8d2b53866fb229b438296526ef0fa5a990e5e5>
- <https://git.kernel.org/stable/c/060ea84a484e852b52b938f234bf9b5503a6c910>

## Sources

- CVE List: [CVE-2025-40358](https://www.cve.org/CVERecord?id=CVE-2025-40358), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-40358](https://nvd.nist.gov/vuln/detail/CVE-2025-40358), Public domain, modified 2026-10-14

---

Page: https://cve.day/CVE-2025-40358 · Whole record: https://cve.day/CVE-2025-40358.json · Rebuilt by cve.day 2026-11-25T22:59:09.473Z
