Skip to main content

Linux Kernel CVE-2025-40358

HIGH
2025-12-16 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.1
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local account on RISC-V host
  2. Delivery
    Request stack unwind of foreign task via /proc
  3. Exploit
    Frame-pointer walk reads past stack boundary
  4. Execution
    KASAN out-of-bounds trip or adjacent-memory read
  5. Impact
    Information exposure or kernel warning

Vulnerability Assessment

Exploitation Conditions

Requires local access with an unprivileged-or-higher account (CVSS PR:L) on a Linux system built for the RISC-V architecture, plus the ability to make the kernel unwind the stack of a task other than the current one - e.g. reading /proc/<pid>/stack, triggering a sysrq stack dump, or a tracing path that invokes walk_stackframe. Exploitation is limited to RISC-V kernels (x86 and other arches are unaffected or already fixed) and is most pronounced on KASAN-instrumented builds where the boundary read is actively checked. It is not remotely reachable (AV:L), needs no user interaction, and is ineffective against non-RISC-V deployments.

Impact

The input CVSS 3.1 score of 7.1 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H) is inconsistent with the described behavior and should be treated skeptically: the mechanism is a bounded out-of-bounds READ detected by KASAN during unwinding, which realistically maps to minor information exposure or a KASAN-induced warning/panic, not high-confidentiality-plus-high-availability compromise. Corroborating signals point to low real-world risk - EPSS is 0.03% (7th percentile), there is no KEV listing and no known public exploit, and exploitation needs local authenticated access plus the ability to unwind another task. This is a hardening/defense-in-depth fix rather than an urgent, widely exploitable bug. Conflict stated explicitly: CVSS claims C:H/A:H while the described mechanism is an OOB read of adjacent stack words - verify true impact against the kernel commit before trusting the 7.1.

Exploit ScenarioDerived

A local authenticated user on a RISC-V Linux host repeatedly reads /proc/<pid>/stack (or otherwise induces the kernel to unwind another task) to force walk_stackframe to dereference memory just past the target's kernel stack. On a KASAN-enabled kernel this produces an out-of-bounds report and potential noise or instability; on non-KASAN kernels the OOB read may disclose adjacent stack bytes. No public exploit is identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Jul 30, 2026

Out-of-bounds memory access in the RISC-V stack unwinder (walk_stackframe) of the Linux kernel lets KASAN trip and read past a task's kernel stack boundary when unwinding a task other than the current one. The defect mirrors a previously fixed x86 issue (commit 84936118bdf3) and is reached through normal task-introspection paths on RISC-V builds. There is no public exploit identified at time of analysis, EPSS risk is negligible (0.03%, 7th percentile), and it is not in CISA KEV; the fix disables KASAN checks for non-current tasks.

Earlier versions of this analysis (1)
v1 Mar 25, 2026 - 11:22

Linux kernel stack unwinding on RISC-V architecture triggers false KASAN (Kernel Address Sanitizer) out-of-bounds warnings when analyzing non-current task stacks, causing denial of service through spurious memory safety violation reports. The vulnerability affects RISC-V systems running vulnerable kernel versions and is resolved through disabling KASAN instrumentation during stack unwinding operations for tasks other than the currently executing process, mirroring a previously fixed defect in x86 architecture. No public exploit code has been identified; the EPSS score of 0.03% (percentile 7%) indicates minimal real-world exploitation probability, though Ubuntu has released security notices (USN-8126-1 and USN-8125-1) suggesting coordinated patching efforts across distributions.

RemediationAI

Patch available per vendor advisory: apply the upstream stable-tree fix that disables KASAN checks for non-current tasks in the RISC-V unwinder (git.kernel.org commits 060ea84a484e, 27379fcc15a1, 2c8d2b53866f, ef4d626ac59a, f34ba22989da), or install your distribution's updated kernel - Ubuntu users should apply the packages in USN-8126-1 (https://ubuntu.com/security/notices/USN-8126-1) and USN-8125-1 (https://ubuntu.com/security/notices/USN-8125-1) and reboot into the new kernel. Because the fix is a source-level unwinder change there is no runtime toggle; as an interim compensating control on RISC-V hosts you can restrict local access to introspection surfaces that force foreign-task unwinding, for example tightening permissions on /proc/<pid>/stack and disabling the sysrq stack-dump trigger via /proc/sys/kernel/sysrq, accepting that these limit legitimate debugging and observability. Disabling KASAN is not recommended, as KASAN is a hardening feature, not the vulnerability.

Affected ProductsAI

The Linux kernel is affected, specifically builds for the RISC-V architecture that include the stacktrace/unwinder code; the defect and its fix are architecture-specific and do not affect x86 (already patched). Exact vulnerable ranges are defined by stable-tree commits rather than one tag: fixes were backported across multiple branches (git.kernel.org commits 060ea84a484e, 27379fcc15a1, 2c8d2b53866f, ef4d626ac59a, f34ba22989da). Distribution exposure is confirmed for Ubuntu, which shipped kernel updates under USN-8126-1 (https://ubuntu.com/security/notices/USN-8126-1) and USN-8125-1 (https://ubuntu.com/security/notices/USN-8125-1). No CPE strings were provided, so precise version boundaries should be read from the referenced commits and distro advisories.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is in RISC-V architecture-specific stacktrace code (arch/riscv, walk_stackframe), which walks frame pointers to reconstruct a call chain. When the kernel unwinds a task that is not currently running - via /proc/<pid>/stack, sysrq, or scheduler/trace paths - the frame-pointer walk can dereference memory just outside the target task's stack region. With KASAN (Kernel Address Sanitizer) compiled in, that shadow-checked read is flagged as 'out-of-bounds in walk_stackframe'. The root-cause class is an out-of-bounds read (CWE-125); no CWE was supplied in the input. The fix follows the established x86 pattern of suppressing KASAN validation while unwinding a foreign task, since the unwinder may legitimately probe boundary words.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY 7.1 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
vuln.today AI 4.4 MEDIUM

Local low-priv trigger of foreign-task unwinding with no UI; impact is a bounded out-of-bounds read giving minor info exposure (C:L) and possible KASAN warning/instability (A:L), no integrity impact.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE 6.3 MEDIUM
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:H

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

Lifecycle Timeline

4
Analysis Updated
Jul 30, 2026 - 08:14 vuln.today
v2 - CVSS changed
CVSS changed
Jul 30, 2026 - 06:37 NVD
7.1 (HIGH)
Patch released
Mar 25, 2026 - 19:32 nvd
Patch available
CVE Published
Dec 16, 2025 - 14:15 nvd
N/A

DescriptionCVE.org

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]

Executive ViewAI

Why It Matters

CVE-2025-40358 is a high-severity out-of-bounds memory access vulnerability in the Linux kernel's RISC-V stack unwinder that could enable information disclosure through KASAN validation trips when introspecting non-current kernel tasks. No public exploit identified at time of analysis, and exploitation probability is negligible (0.03% EPSS), but organizations running RISC-V-based systems should prioritize patching to prevent potential unauthorized kernel memory reads.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 93% exploitable
Prevalence
Low
RISC-V-only kernel code path; limited production Linux footprint
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
Medium

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 16.0 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy