CVE-2026-46113 (GCVE-0-2026-46113)

Vulnerability from cvelistv5 – Published: 2026-05-28 09:35 – Updated: 2026-05-28 09:35
VLAI
Title
KVM: x86: Fix shadow paging use-after-free due to unexpected GFN
Summary
In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Fix shadow paging use-after-free due to unexpected GFN The shadow MMU computes GFNs for direct shadow pages using sp->gfn plus the SPTE index. This assumption breaks for shadow paging if the guest page tables are modified between VM entries (similar to commit aad885e77496, "KVM: x86/mmu: Drop/zap existing present SPTE even when creating an MMIO SPTE", 2026-03-27). The flow is as follows: - a PDE is installed for a 2MB mapping, and a page in that area is accessed. KVM creates a kvm_mmu_page consisting of 512 4KB pages; the kvm_mmu_page is marked by FNAME(fetch) as direct-mapped because the guest's mapping is a huge page (and thus contiguous). - the PDE mapping is changed from outside the guest. - the guest accesses another page in the same 2MB area. KVM installs a new leaf SPTE and rmap entry; the SPTE uses the "correct" GFN (i.e. based on the new mapping, as changed in the previous step) but that GFN is outside of the [sp->gfn, sp->gfn + 511] range; therefore the rmap entry cannot be found and removed when the kvm_mmu_page is zapped. - the memslot that covers the first 2MB mapping is deleted, and the kvm_mmu_page for the now-invalid GPA is zapped. However, rmap_remove() only looks at the [sp->gfn, sp->gfn + 511] range established in step 1, and fails to find the rmap entry that was recorded by step 3. - any operation that causes an rmap walk for the same page accessed by step 3 then walks a stale rmap and dereferences a freed kvm_mmu_page. This includes dirty logging or MMU notifier invalidations (e.g., from MADV_DONTNEED). The underlying issue is that KVM's walking of shadow PTEs assumes that if a SPTE is present when KVM wants to install a non-leaf SPTE, then the existing kvm_mmu_page must be for the correct gfn. Because the only way for the gfn to be wrong is if KVM messed up and failed to zap a SPTE... which shouldn't happen, but *actually* only happens in response to a guest write. That bug dates back literally forever, as even the first version of KVM assumes that the GFN matches and walks into the "wrong" shadow page. However, that was only an imprecision until 2032a93d66fa ("KVM: MMU: Don't allocate gfns page for direct mmu pages") came along. Fix it by checking for a target gfn mismatch and zapping the existing SPTE. That way the old SP and rmap entries are gone, KVM installs the rmap in the right location, and everyone is happy.
Severity
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7 , < 488e386484ec8c0e558be6e156edf34ed9f4d5c8 (git)
Affected: 6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7 , < 06c19c967b845b63172601fe459667d973b7e6b7 (git)
Affected: 6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7 , < 738ec97b1855df6c08fe2369f798fa0b972e556b (git)
Affected: 6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7 , < 14d1e55dfd2cf4711bff164a6aaaddb783552134 (git)
Affected: 6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7 , < 0cb2af2ea66ad8ff195c156ea690f11216285bdf (git)
Create a notification for this product.
Linux Linux Affected: 2.6.20
Unaffected: 0 , < 2.6.20 (semver)
Unaffected: 6.6.140 , ≤ 6.6.* (semver)
Unaffected: 6.12.88 , ≤ 6.12.* (semver)
Unaffected: 6.18.30 , ≤ 6.18.* (semver)
Unaffected: 7.0.7 , ≤ 7.0.* (semver)
Unaffected: 7.1-rc3 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/x86/kvm/mmu/mmu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "488e386484ec8c0e558be6e156edf34ed9f4d5c8",
              "status": "affected",
              "version": "6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7",
              "versionType": "git"
            },
            {
              "lessThan": "06c19c967b845b63172601fe459667d973b7e6b7",
              "status": "affected",
              "version": "6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7",
              "versionType": "git"
            },
            {
              "lessThan": "738ec97b1855df6c08fe2369f798fa0b972e556b",
              "status": "affected",
              "version": "6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7",
              "versionType": "git"
            },
            {
              "lessThan": "14d1e55dfd2cf4711bff164a6aaaddb783552134",
              "status": "affected",
              "version": "6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7",
              "versionType": "git"
            },
            {
              "lessThan": "0cb2af2ea66ad8ff195c156ea690f11216285bdf",
              "status": "affected",
              "version": "6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/x86/kvm/mmu/mmu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.20"
            },
            {
              "lessThan": "2.6.20",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.140",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.88",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.30",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.0.*",
              "status": "unaffected",
              "version": "7.0.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.1-rc3",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.140",
                  "versionStartIncluding": "2.6.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.88",
                  "versionStartIncluding": "2.6.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.30",
                  "versionStartIncluding": "2.6.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.0.7",
                  "versionStartIncluding": "2.6.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1-rc3",
                  "versionStartIncluding": "2.6.20",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86: Fix shadow paging use-after-free due to unexpected GFN\n\nThe shadow MMU computes GFNs for direct shadow pages using sp-\u003egfn plus\nthe SPTE index. This assumption breaks for shadow paging if the guest\npage tables are modified between VM entries (similar to commit\naad885e77496, \"KVM: x86/mmu: Drop/zap existing present SPTE even\nwhen creating an MMIO SPTE\", 2026-03-27).  The flow is as follows:\n\n- a PDE is installed for a 2MB mapping, and a page in that area is\n  accessed.  KVM creates a kvm_mmu_page consisting of 512 4KB pages;\n  the kvm_mmu_page is marked by FNAME(fetch) as direct-mapped because\n  the guest\u0027s mapping is a huge page (and thus contiguous).\n\n- the PDE mapping is changed from outside the guest.\n\n- the guest accesses another page in the same 2MB area.  KVM installs\n  a new leaf SPTE and rmap entry; the SPTE uses the \"correct\" GFN\n  (i.e. based on the new mapping, as changed in the previous step) but\n  that GFN is outside of the [sp-\u003egfn, sp-\u003egfn + 511] range; therefore\n  the rmap entry cannot be found and removed when the kvm_mmu_page\n  is zapped.\n\n- the memslot that covers the first 2MB mapping is deleted, and the\n  kvm_mmu_page for the now-invalid GPA is zapped.  However, rmap_remove()\n  only looks at the [sp-\u003egfn, sp-\u003egfn + 511] range established in step 1,\n  and fails to find the rmap entry that was recorded by step 3.\n\n- any operation that causes an rmap walk for the same page accessed\n  by step 3 then walks a stale rmap and dereferences a freed kvm_mmu_page.\n  This includes dirty logging or MMU notifier invalidations (e.g., from\n  MADV_DONTNEED).\n\nThe underlying issue is that KVM\u0027s walking of shadow PTEs assumes that\nif a SPTE is present when KVM wants to install a non-leaf SPTE, then the\nexisting kvm_mmu_page must be for the correct gfn.  Because the only way\nfor the gfn to be wrong is if KVM messed up and failed to zap a SPTE...\nwhich shouldn\u0027t happen, but *actually* only happens in response to a\nguest write.\n\nThat bug dates back literally forever, as even the first version of KVM\nassumes that the GFN matches and walks into the \"wrong\" shadow page.\nHowever, that was only an imprecision until 2032a93d66fa (\"KVM: MMU:\nDon\u0027t allocate gfns page for direct mmu pages\") came along.\n\nFix it by checking for a target gfn mismatch and zapping the existing\nSPTE.  That way the old SP and rmap entries are gone, KVM installs\nthe rmap in the right location, and everyone is happy."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-28T09:35:23.035Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/488e386484ec8c0e558be6e156edf34ed9f4d5c8"
        },
        {
          "url": "https://git.kernel.org/stable/c/06c19c967b845b63172601fe459667d973b7e6b7"
        },
        {
          "url": "https://git.kernel.org/stable/c/738ec97b1855df6c08fe2369f798fa0b972e556b"
        },
        {
          "url": "https://git.kernel.org/stable/c/14d1e55dfd2cf4711bff164a6aaaddb783552134"
        },
        {
          "url": "https://git.kernel.org/stable/c/0cb2af2ea66ad8ff195c156ea690f11216285bdf"
        }
      ],
      "title": "KVM: x86: Fix shadow paging use-after-free due to unexpected GFN",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-46113",
    "datePublished": "2026-05-28T09:35:23.035Z",
    "dateReserved": "2026-05-13T15:03:33.098Z",
    "dateUpdated": "2026-05-28T09:35:23.035Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-46113",
      "date": "2026-05-29",
      "epss": "0.00018",
      "percentile": "0.05164"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-46113\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-05-28T10:16:26.760\",\"lastModified\":\"2026-05-28T13:44:01.663\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nKVM: x86: Fix shadow paging use-after-free due to unexpected GFN\\n\\nThe shadow MMU computes GFNs for direct shadow pages using sp-\u003egfn plus\\nthe SPTE index. This assumption breaks for shadow paging if the guest\\npage tables are modified between VM entries (similar to commit\\naad885e77496, \\\"KVM: x86/mmu: Drop/zap existing present SPTE even\\nwhen creating an MMIO SPTE\\\", 2026-03-27).  The flow is as follows:\\n\\n- a PDE is installed for a 2MB mapping, and a page in that area is\\n  accessed.  KVM creates a kvm_mmu_page consisting of 512 4KB pages;\\n  the kvm_mmu_page is marked by FNAME(fetch) as direct-mapped because\\n  the guest\u0027s mapping is a huge page (and thus contiguous).\\n\\n- the PDE mapping is changed from outside the guest.\\n\\n- the guest accesses another page in the same 2MB area.  KVM installs\\n  a new leaf SPTE and rmap entry; the SPTE uses the \\\"correct\\\" GFN\\n  (i.e. based on the new mapping, as changed in the previous step) but\\n  that GFN is outside of the [sp-\u003egfn, sp-\u003egfn + 511] range; therefore\\n  the rmap entry cannot be found and removed when the kvm_mmu_page\\n  is zapped.\\n\\n- the memslot that covers the first 2MB mapping is deleted, and the\\n  kvm_mmu_page for the now-invalid GPA is zapped.  However, rmap_remove()\\n  only looks at the [sp-\u003egfn, sp-\u003egfn + 511] range established in step 1,\\n  and fails to find the rmap entry that was recorded by step 3.\\n\\n- any operation that causes an rmap walk for the same page accessed\\n  by step 3 then walks a stale rmap and dereferences a freed kvm_mmu_page.\\n  This includes dirty logging or MMU notifier invalidations (e.g., from\\n  MADV_DONTNEED).\\n\\nThe underlying issue is that KVM\u0027s walking of shadow PTEs assumes that\\nif a SPTE is present when KVM wants to install a non-leaf SPTE, then the\\nexisting kvm_mmu_page must be for the correct gfn.  Because the only way\\nfor the gfn to be wrong is if KVM messed up and failed to zap a SPTE...\\nwhich shouldn\u0027t happen, but *actually* only happens in response to a\\nguest write.\\n\\nThat bug dates back literally forever, as even the first version of KVM\\nassumes that the GFN matches and walks into the \\\"wrong\\\" shadow page.\\nHowever, that was only an imprecision until 2032a93d66fa (\\\"KVM: MMU:\\nDon\u0027t allocate gfns page for direct mmu pages\\\") came along.\\n\\nFix it by checking for a target gfn mismatch and zapping the existing\\nSPTE.  That way the old SP and rmap entries are gone, KVM installs\\nthe rmap in the right location, and everyone is happy.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/06c19c967b845b63172601fe459667d973b7e6b7\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/0cb2af2ea66ad8ff195c156ea690f11216285bdf\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/14d1e55dfd2cf4711bff164a6aaaddb783552134\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/488e386484ec8c0e558be6e156edf34ed9f4d5c8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/738ec97b1855df6c08fe2369f798fa0b972e556b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…