{"id":"CVE-2025-40065","aliases":["CVE-2025-40065"],"related":[],"kind":"vulnerability","state":"published","title":"RISC-V: KVM: Write hgatp register with valid mode bits","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nRISC-V: KVM: Write hgatp register with valid mode bits\n\nAccording to the RISC-V Privileged Architecture Spec, when MODE=Bare\nis selected,software must write zero to the remaining fields of hgatp.\n\nWe have detected the valid mode supported by the HW before, So using a\nvalid mode to detect how many vmid bits are supported.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nRISC-V: KVM: Write hgatp register with valid mode bits\n\nAccording to the RISC-V Privileged Architecture Spec, when MODE=Bare\nis selected,software must write zero to the remaining fields of hgatp.\n\nWe have detected the valid mode supported by the HW before, So using a\nvalid mode to detect how many vmid bits are supported.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nRISC-V: KVM: Escribir el registro hgatp con bits de modo válidos\n\nSegún la Especificación de Arquitectura Privilegiada de RISC-V, cuando se selecciona MODE=Bare, el software debe escribir cero en los campos restantes de hgatp.\n\nHemos detectado previamente el modo válido soportado por el hardware, por lo tanto, usando un modo válido para detectar cuántos bits vmid son soportados.","source":"nvd"}],"published":"2025-10-28T11:48:35.785Z","modified":"2026-10-30T13:18:12.777Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"fd7bb4a251dfc1da3496bf59a4793937c13e8c1f","fixed":"feb64ca53d97b3ac8ba9ecbeae5f9426f1513650","status":"affected"},{"type":"git","introduced":"fd7bb4a251dfc1da3496bf59a4793937c13e8c1f","fixed":"8b6e327736db013b9e385c3f6f9f0b04ddf26e43","status":"affected"},{"type":"git","introduced":"fd7bb4a251dfc1da3496bf59a4793937c13e8c1f","fixed":"5cba8ae00279296a586d0596443109d601b1d116","status":"affected"},{"type":"git","introduced":"fd7bb4a251dfc1da3496bf59a4793937c13e8c1f","fixed":"d00b61cd37f4c183ce0edbc9f8ccf6d5430ea357","status":"affected"},{"type":"git","introduced":"fd7bb4a251dfc1da3496bf59a4793937c13e8c1f","fixed":"2b351e3d04be9e1533f26c3464f1e44a5beace30","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.16","status":"unaffected"},{"type":"semver","introduced":"6.1.191","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.114","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.3","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/feb64ca53d97b3ac8ba9ecbeae5f9426f1513650","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8b6e327736db013b9e385c3f6f9f0b04ddf26e43","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5cba8ae00279296a586d0596443109d601b1d116","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d00b61cd37f4c183ce0edbc9f8ccf6d5430ea357","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2b351e3d04be9e1533f26c3464f1e44a5beace30","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-40065","url":"https://www.cve.org/CVERecord?id=CVE-2025-40065","licence":"CVE Terms of Use","modified":"2026-10-30T12:22:44.991Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-40065","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40065","licence":"Public domain","modified":"2026-10-30T13:18:12.777Z"}],"updatedAt":"2026-11-25T22:59:06.941Z","epss":{"score":0.00236,"percentile":0.15571,"date":"2026-12-01T12:00:22.000Z"}}