HIGH 8.8

CVE-2026-53359: Linux KVM Shadow Paging Use-After-Free Vulnerability

A use-after-free vulnerability exists in Linux kernel shadow paging when the kernel's memory management code encounters a specific sequence: a page directory entry (PDE) is modified from outside a guest VM, converting a 2MB page into 4KB pages, and then a memory slot is deleted. The kernel reuses an internal page structure (kvm_mmu_page) despite a mismatch in how that page should be configured, leading to corrupted memory tracking. When the memory is freed, dangling references to it remain and can be dereferenced by subsequent memory operations, causing a crash or potential privilege escalation. An unprivileged local user with KVM access can trigger this.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Weaknesses (CWE)
CWE-416
Affected products
1 configuration(s)
Published / Modified
2026-07-04 / 2026-07-29

NVD description (verbatim)

In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Fix shadow paging use-after-free due to unexpected role Commit 0cb2af2ea66ad ("KVM: x86: Fix shadow paging use-after-free due to unexpected GFN") fixed a shadow paging mismatch between stored and computed GFNs; the bug could be triggered by changing a PDE mapping from outside the guest, and then deleting a memslot. The rmap_remove() call would miss entries created after the PDE change because the GFN of the leaf SPTE does not match the GFN of the struct kvm_mmu_page. A similar hole however remains if the modified PDE points to a non-leaf page. In this case the gfn can be made to match, but the role does not match: the original large 2MB page creates a kvm_mmu_page with direct=1, while the new 4KB needs a kvm_mmu_page with direct=0. However, kvm_mmu_get_child_sp() does not compare the role, and therefore reuses the page. The next step is installing a leaf (4KB) SPTE on the new path which records an rmap entry under the gfn resolved by the walk. But when that child is zapped its parent kvm_mmu_page has direct=1 and kvm_mmu_page_get_gfn() computes the gfn for the 4KB page as sp->gfn + index instead of using sp->shadowed_translation[] (or sp->gfns[] in older kernels). It therefore fails to remove the recorded entry. When the memslot is dropped the shadow page is freed but the rmap entry survives, as in the scenario that was already fixed. Code that later walks that gfn (dirty logging, MMU notifier invalidation, and so on) dereferences an sptep that lies in the freed page, causing the use-after-free.

8 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability is a use-after-free (CWE-416) in KVM's shadow paging implementation. The root cause is insufficient validation in kvm_mmu_get_child_sp() when reusing cached kvm_mmu_page structures. When a PDE is modified externally to split a large page (2MB) into smaller pages (4KB), the GFN (guest frame number) can match an existing page, but the role field—which tracks whether the page is direct (1) or indirect (0)—does not. The function reuses the page despite this role mismatch. Subsequent leaf SPTE installations record rmap entries under the incorrectly-configured page. During teardown, kvm_mmu_page_get_gfn() fails to locate and remove these entries because it computes the GFN incorrectly for direct=1 pages, relying on arithmetic instead of the shadowed translation table. When the memslot is freed, the rmap entries become dangling pointers. Any operation that walks the rmap (dirty logging, MMU notifier invalidation) dereferences freed memory.

Business impact

This vulnerability allows a local user with KVM guest access to cause a denial of service by crashing the host kernel, potentially affecting all VMs on that host. In multi-tenant cloud environments or shared hosting scenarios, an unprivileged guest user could destabilize the hypervisor. The HIGH CVSS score (8.8) reflects the combination of local access requirements, high confidentiality/integrity/availability impact, and scope crossing (from guest to host). While active exploitation requires KVM to be enabled and the attacker to have guest-level access, the consequences are severe.

Affected systems

All Linux kernels with KVM shadow paging support are affected. This is a core hypervisor feature present in most production Linux distributions. The vulnerability does not require specific hardware or virtualization extensions beyond KVM support. Any system running KVM-based virtual machines and allowing local user access to guest creation or guest interaction is at risk.

Exploitability

Exploitation requires local user access to the system with the ability to interact with KVM (typically via /dev/kvm). The attacker must run code inside a guest VM with permissions to trigger memory-mapped I/O operations or coordinate with the host to modify PDE structures. No network access or privilege escalation outside KVM is needed to trigger the crash. However, reliable exploitation of the use-after-free for code execution (rather than denial of service) is complex and depends on controlling memory layout post-free. The vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog.

Remediation

The fix involves adding role comparison to kvm_mmu_get_child_sp() so that pages are only reused if both the GFN and the role match. Alternatively, the lookup and caching logic can be enhanced to invalidate or prevent reuse when structural mismatches occur. Patching is the only mitigation; there is no configuration workaround. Organizations must update the Linux kernel to a patched version. Verify against your distribution's security advisory for the specific kernel version containing the fix.

Patch guidance

Apply the latest kernel security updates from your Linux distribution immediately. Consult your vendor's advisory for the specific patched kernel version. For distributions using long-term support kernels, check both the stable and LTS kernel repositories. If you cannot patch immediately, disable KVM or restrict guest creation to trusted users only. Test patches in a non-production environment first to ensure compatibility with your workloads.

Detection guidance

Monitor for kernel panic messages or oops dumps mentioning shadow paging, kvm_mmu_page, or rmap operations. Check system logs for unusual KVM-related errors. Kernel Address Sanitizer (KASAN) or similar runtime checks may detect the use-after-free if enabled. Host-based intrusion detection systems should alert on unexpected kernel crashes correlated with guest VM activity. Memory forensics post-crash may reveal corruption patterns in the kvm_mmu_page cache.

Why prioritize this

This vulnerability merits immediate attention because: (1) it allows local denial of service of the entire hypervisor, affecting all VMs; (2) it requires no special privileges beyond KVM access, which is commonly available in cloud and shared hosting; (3) the CVSS score of 8.8 reflects high impact; and (4) shadow paging is widely used. Organizations should prioritize patching systems that host multiple VMs or untrusted guests.

Risk score, explained

CVSS 8.8 (HIGH) is justified by the combination of Local access vector (AV:L), Low attack complexity (AC:L), Low privilege requirement (PR:L), No user interaction (UI:N), Changed scope (S:C—guest to host), and High impact across confidentiality, integrity, and availability (C:H/I:H/A:H). The scope change from guest to host context is critical; what appears as a guest-level crash actually compromises the host. The HIGH severity reflects the severity of the consequences, not the ease of exploitation.

Frequently asked questions

Does this affect systems not running KVM?

No. This vulnerability is specific to the KVM (Kernel-based Virtual Machine) hypervisor module. Systems without KVM or those using alternative hypervisors (Xen, Hyper-V, etc.) are not affected by this issue.

Can this be exploited from outside a guest VM?

No. The attacker must have local access and be able to run code inside a guest VM. Exploitation cannot occur remotely or from the host kernel alone. However, the impact extends to the host kernel and other VMs on the same hardware.

What if I don't use shadow paging?

Shadow paging is a KVM mechanism used when extended page tables (EPT/NPT) are unavailable or disabled. If your system uses EPT/NPT instead, you are not vulnerable to this specific issue. However, you should still keep the kernel patched for other potential vulnerabilities.

Will disabling KVM prevent this vulnerability?

Yes, disabling the KVM module entirely eliminates the risk. However, this prevents all KVM-based virtualization. A more practical mitigation for production systems is to apply the kernel patch and restrict guest access to trusted users.

This analysis is based on the vulnerability description and CVSS scoring provided as of the publication date. Actual impact and exploitation complexity may vary depending on kernel version, configuration, and security mitigations in place. Organizations should verify patch availability and compatibility with their specific kernel versions and distributions before applying updates. SEC.co does not provide exploit code or proof-of-concept demonstrations. All assertions about remediation, detection, and impact should be validated against official vendor advisories and your organization's security testing. Source: NVD (public-domain), retrieved 2026-08-13. Analysis generated by SEC.co (claude-haiku-4-5).