Look up another CVE · open CVE-2025-40065 in the interactive tracker
CVE-2025-40065
RISC-V: KVM: Write hgatp register with valid mode bits
Published 2025-10-28 (12 months ago) by the Linux kernel CNA. Subsystem arch/riscv. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-40065 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | vulnerable | 6.12.113-1 | No fix published anywhere yet, neither in Debian nor upstream for the series trixie tracks. Watch the Debian tracker page for this CVE. Advisories for trixie have historically landed a median of 11 days after publication. |
| Debian 14forky | fixed | 6.17.6-1 | Update the kernel and reboot. Fixed in 6.17.6-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.17.6-1 | Update the kernel and reboot. Fixed in 6.17.6-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
According to the RISC-V Privileged Architecture Spec, when MODE=Bare is selected,software must write zero to the remaining fields of hgatp. We have detected the valid mode supported by the HW before, So using a valid mode to detect how many vmid bits are supported.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
arch/riscv/kvm/vmid.c
- What this is
- KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv)MAINTAINERS section matched on arch/riscv/kvm/ · kvm@vger.kernel.org · Maintained
- Kernel module
- kvm
Check it on the machine
grep -w CONFIG_KVM /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w kvmPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookwormBnot built on arm64/rt/arm64, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp
- trixieBnot built on armel/rpi, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp
- forky, sidBnot built on armhf/armmp, armhf/armmp-lpae
- B
- built in on some, a module on others, absent on the rest
- Build switch
- CONFIG_KVM
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2025-10-28 (12 months ago)source
- CVSS
- no vector published, unrated
- Attack vector
- not published
- EPSS
- 0.19%, higher than 7.7% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- arch/riscv
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 5.16 | 6.17.3 | d00b61cd37f4 |
| 5.16 | 6.18 | 2b351e3d04be |
Why the CNA scored it this way
The kernel CNA published no CVSS vector and no reasoning for CVE-2025-40065, which is why it is shown as unrated rather than given an invented score. 6,405 of the 20,413 CVEs here carry reasoning; this is not one of them.