CVE-2025-40358
NoneCVSS
—
EPSS
0.1%
Published
Dec 16, 2025
CISA due date
—
Cloudanix analysis
A Linux kernel bug on certain processor types could cause security checks to incorrectly flag problems when examining memory used by other running programs.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Other
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Patch
- Effort
- Low
- Patch risk
- Low
What it actually does
KASAN incorrectly reports out-of-bounds access during stack unwinding for non-current tasks on RISC-V because shadow memory checks are performed on stacks belonging to other tasks.
Why it matters to the business
False-positive KASAN reports can mask real memory safety issues during kernel debugging and tracing, increasing risk of undetected corruption in RISC-V systems and complicating forensic analysis.
How an attack unfolds
No attacker-controlled exploitation path exists; the issue manifests only when the kernel unwinds a non-current task's stack while KASAN is active, triggering a spurious report identical to the previously fixed x86 case.
How to fix it
Apply commit f34ba22989da61186f30a40b6a82e0b3337b96fc or later; rebuild and deploy the fixed kernel image to all RISC-V systems. No workaround exists.
How to confirm the fix worked
Confirm presence of the commit in the running kernel source tree and verify that KASAN no longer reports out-of-bounds during cross-task unwinding tests.
Typical attack path
- Trigger stack trace collection for a non-current task
- KASAN performs invalid shadow checks on foreign stack memory
- False BUG report is emitted in walk_stackframe
How to detect it
Review kernel logs for repeated KASAN out-of-bounds reports originating from walk_stackframe when tracing non-current tasks; no post-exploitation artifacts exist because the flaw is not exploitable.
What your security team should do
- Prioritize kernel update on all RISC-V production and development hosts within the next maintenance window
- Re-run KASAN-enabled stress and tracing workloads after patching to confirm absence of false reports
- Update kernel build pipelines to include the fix before next image release
The record
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]
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Linux | Kernel | 4.15.0 | 6.6.117 |
| Mageia:9 | kernel | 0 | 6.6.120-1.mga9 |
| Mageia:9 | kernel-linus | 0 | 6.6.120-1.mga9 |
| Mageia:9 | kmod-virtualbox | 0 | 7.1.14-14.mga9 |
| Mageia:9 | kmod-xtables-addons | 0 | 3.24-88.mga9 |
Related vulnerabilities
- CVE-2026-23226 In the Linux kernel, the following vulnerability has been resolved: ksmbd: add chann_lock… Also affects Kernel
- CVE-2026-23225 In the Linux kernel, the following vulnerability has been resolved: sched/mmcid: Don't… Also affects Kernel
- CVE-2026-23230 In the Linux kernel, the following vulnerability has been resolved: smb: client: split… Also affects Kernel
- CVE-2026-23224 In the Linux kernel, the following vulnerability has been resolved: erofs: fix UAF issue… Also affects Kernel
- CVE-2026-23227 In the Linux kernel, the following vulnerability has been resolved: drm/exynos: vidi: use… Also affects Kernel
- CVE-2026-23223 In the Linux kernel, the following vulnerability has been resolved: xfs: fix UAF in… Also affects Kernel
- CVE-2026-23228 In the Linux kernel, the following vulnerability has been resolved: smb: server: fix leak… Also affects Kernel
- CVE-2026-23229 In the Linux kernel, the following vulnerability has been resolved: crypto: virtio - Add… Also affects Kernel