← Back to CVE Explorer

CVE-2025-40065

Full vulnerability record from the local CVENow database.

Description

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.

Severity
Not scored
CVSS score
Not available
Vulnerability status
Deferred
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2025-10-28 12:15:40.950000
Last modified
2026-10-30 13:18:12.777000
View original CVE JSON
{
  "id": "CVE-2025-40065",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2025-10-28T12:15:40.950",
  "lastModified": "2026-10-30T13:18:12.777",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    },
    {
      "lang": "es",
      "value": "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."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "arch/riscv/kvm/vmid.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "fd7bb4a251dfc1da3496bf59a4793937c13e8c1f",
              "lessThan": "feb64ca53d97b3ac8ba9ecbeae5f9426f1513650",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "fd7bb4a251dfc1da3496bf59a4793937c13e8c1f",
              "lessThan": "8b6e327736db013b9e385c3f6f9f0b04ddf26e43",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "fd7bb4a251dfc1da3496bf59a4793937c13e8c1f",
              "lessThan": "5cba8ae00279296a586d0596443109d601b1d116",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "fd7bb4a251dfc1da3496bf59a4793937c13e8c1f",
              "lessThan": "d00b61cd37f4c183ce0edbc9f8ccf6d5430ea357",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "fd7bb4a251dfc1da3496bf59a4793937c13e8c1f",
              "lessThan": "2b351e3d04be9e1533f26c3464f1e44a5beace30",
              "versionType": "git",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "arch/riscv/kvm/vmid.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "5.16",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "5.16",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.1.191",
              "lessThanOrEqual": "6.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.6.160",
              "lessThanOrEqual": "6.6.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.114",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.17.3",
              "lessThanOrEqual": "6.17.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.18",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {},
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/2b351e3d04be9e1533f26c3464f1e44a5beace30",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/5cba8ae00279296a586d0596443109d601b1d116",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/8b6e327736db013b9e385c3f6f9f0b04ddf26e43",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/d00b61cd37f4c183ce0edbc9f8ccf6d5430ea357",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/feb64ca53d97b3ac8ba9ecbeae5f9426f1513650",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ]
}