CVE-2025-40065

Source
https://cve.org/CVERecord?id=CVE-2025-40065
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40065.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40065
Downstream
Related
Published
2025-10-28T11:48:35.785Z
Modified
2026-03-12T03:54:31.240537Z
Summary
RISC-V: KVM: Write hgatp register with valid mode bits
Details

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

RISC-V: KVM: Write hgatp register with valid mode bits

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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40065.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
fd7bb4a251dfc1da3496bf59a4793937c13e8c1f
Fixed
d00b61cd37f4c183ce0edbc9f8ccf6d5430ea357
Fixed
2b351e3d04be9e1533f26c3464f1e44a5beace30

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40065.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.17.3

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40065.json"