{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-46113","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-05-13T15:03:33.098Z","datePublished":"2026-05-28T09:35:23.035Z","dateUpdated":"2026-08-05T12:29:45.121Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T12:29:45.121Z"},"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->gfn 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's 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->gfn, sp->gfn + 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->gfn, sp->gfn + 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's 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't 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't 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":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Exploitation requires executing code inside a guest VM that takes shadow-paging page faults on the host CPU; there is no network protocol involved, so the vulnerable host MMU code is reached via local guest execution.\nAC:L - The guest deterministically controls its page-table contents and vCPU scheduling to create the mis-GFN'd rmap, and the commit confirms the condition \"only happens in response to a guest write\"; the attacker can also drive the memslot-delete and rmap-walk triggers (BAR reprogramming, balloon/MADV_DONTNEED), so no condition lies beyond attacker control.\nPR:L - From the host's (vulnerable component's) perspective the attacker only needs the low privilege of running a guest VM, consistent with how guest-to-host KVM bugs are scored in this tree; full host-root is not required.\nUI:N - The malicious guest triggers the UAF autonomously through its own memory accesses and page-table edits with no action required from any host operator.\nS:C - A guest-context attacker corrupts host-kernel memory, crossing the VM/hypervisor security boundary into the host's authority (VM-escape class), exactly as other KVM guest-to-host issues are scored.\nC:H - The use-after-free leaves a stale rmap pointing at a freed kvm_mmu_page whose contents the attacker can reclaim/spray, yielding an arbitrary host-kernel read primitive.\nI:H - The stale rmap walk operates (drop_spte/write-protect/etc.) on attacker-reclaimed freed memory, providing a write/control-flow-hijack primitive in the host kernel — i.e. full host integrity compromise.\nA:H - Dereferencing the freed kvm_mmu_page during dirty logging or MMU-notifier invalidation reliably crashes/panics the host kernel, taking down the hypervisor and all co-resident guests."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/kvm/mmu/mmu.c"],"versions":[{"version":"6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7","lessThan":"e9d4ea13aa2b6400bb10ec64b370ba3dadcd22f0","status":"affected","versionType":"git"},{"version":"6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7","lessThan":"488e386484ec8c0e558be6e156edf34ed9f4d5c8","status":"affected","versionType":"git"},{"version":"6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7","lessThan":"06c19c967b845b63172601fe459667d973b7e6b7","status":"affected","versionType":"git"},{"version":"6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7","lessThan":"738ec97b1855df6c08fe2369f798fa0b972e556b","status":"affected","versionType":"git"},{"version":"6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7","lessThan":"14d1e55dfd2cf4711bff164a6aaaddb783552134","status":"affected","versionType":"git"},{"version":"6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7","lessThan":"0cb2af2ea66ad8ff195c156ea690f11216285bdf","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/kvm/mmu/mmu.c"],"versions":[{"version":"2.6.20","status":"affected"},{"version":"0","lessThan":"2.6.20","status":"unaffected","versionType":"semver"},{"version":"6.1.175","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.140","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.88","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.30","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.0.7","lessThanOrEqual":"7.0.*","status":"unaffected","versionType":"semver"},{"version":"7.1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"6.1.175"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"6.6.140"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"6.12.88"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"6.18.30"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"7.0.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"7.1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/e9d4ea13aa2b6400bb10ec64b370ba3dadcd22f0"},{"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"}}}}