CVE-2025-39815
NoneCVSS
—
EPSS
0.2%
Published
Sep 16, 2025
CISA due date
—
Cloudanix analysis
A flaw in the Linux kernel for RISC-V processors could let attackers crash the system or run harmful code when handling virtual machines.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Privilege Gain
- Component
- OS kernel
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Allows a stack buffer overflow in the RISC-V KVM module when loading vlenb values from userspace, as the code does not validate that the input size fits within an xlen-bit stack buffer before copying up to 2048 bits.
Why it matters to the business
Can lead to system instability, crashes, or potential privilege escalation in virtualized RISC-V environments, impacting the reliability and security of Linux-based hypervisors and guest VMs.
How an attack unfolds
An attacker with the ability to interact with the KVM interface on a RISC-V system supplies an oversized vlenb load request from userspace, causing the kernel to write beyond the allocated stack buffer.
How to fix it
Upgrade the Linux kernel to a version containing commit c76bf8359188a11f8fd790e5bbd6077894a245cc or apply the fixed packages for Debian 11-14 which include the fix in version 3.19.
How to confirm the fix worked
Verify the kernel source includes the size check before loading vlenb, or check the running kernel version against the fixed commits.
Typical attack path
- Identify RISC-V KVM host
- Gain access to userspace process interacting with KVM
- Craft malicious vlenb load request exceeding xlen bits
- Trigger the vulnerable code path to cause overflow
How to detect it
Look for kernel stack overflow panics or oops messages related to KVM vlenb loading in system logs.
What your security team should do
- Apply kernel updates immediately on RISC-V systems
- Monitor for any KVM-related crashes
- Restrict untrusted access to KVM interfaces
The record
In the Linux kernel, the following vulnerability has been resolved: RISC-V: KVM: fix stack overrun when loading vlenb The userspace load can put up to 2048 bits into an xlen bit stack buffer. We want only xlen bits, so check the size beforehand.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:13 | linux | 0 | No fix |
| Debian:14 | linux | 0 | 6.16.5-1 |
| Linux | Kernel | 6.8.0 | 6.12.45 |
Related vulnerabilities
- CVE-2025-39885 In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix recursive… Also affects linux
- CVE-2025-39883 In the Linux kernel, the following vulnerability has been resolved: mm/memory-failure… Also affects linux
- CVE-2025-39884 In the Linux kernel, the following vulnerability has been resolved: btrfs: fix subvolume… Also affects linux
- CVE-2025-39886 In the Linux kernel, the following vulnerability has been resolved: bpf: Tell memcg to… Also affects linux
- CVE-2025-39876 In the Linux kernel, the following vulnerability has been resolved: net: fec: Fix… Also affects linux
- CVE-2025-39880 In the Linux kernel, the following vulnerability has been resolved: libceph: fix invalid… Also affects linux
- CVE-2025-39881 In the Linux kernel, the following vulnerability has been resolved: kernfs: Fix UAF in… Also affects linux
- CVE-2025-39882 In the Linux kernel, the following vulnerability has been resolved: drm/mediatek: fix… Also affects linux