CVE-2026-52969: Linux KVM Integer Overflow and Guest-to-Host Escape Vulnerability
A flaw in the Linux kernel's KVM (Kernel Virtual Machine) hypervisor allows a local user with access to /dev/kvm to trigger an out-of-bounds memory access. The vulnerability exists in the dirty ring mechanism—a performance optimization that tracks which guest memory pages have been modified. An attacker can craft specially-formed entries in the shared memory region backing the dirty ring to cause an integer overflow, bypass a bounds check, and access memory outside the intended slot boundaries. On affected systems using shadow paging (legacy MMU or write-tracked memory slots), this can lead to privilege escalation or denial of service.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-129, CWE-190
- Affected products
- 4 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-15
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: KVM: Reject wrapped offset in kvm_reset_dirty_gfn() kvm_reset_dirty_gfn() guards the gfn range with if (!memslot || (offset + __fls(mask)) >= memslot->npages) return; but offset is u64 and the addition is unchecked. The check can be silently bypassed by a u64 wrap. The dirty ring backing those entries is MAP_SHARED at KVM_DIRTY_LOG_PAGE_OFFSET of the vcpu fd, so the VMM can rewrite the slot and offset fields of any entry between when the kernel pushes them and when KVM_RESET_DIRTY_RINGS consumes them. On reset, kvm_dirty_ring_reset() re-reads the values via READ_ONCE() and feeds them straight back into this check; only the flags handshake is treated as the handover, the slot/offset payload is taken on trust. Crafting two entries entry[i].offset = 0xffffffffffffffc1 entry[i+1].offset = 0 makes the coalescing loop in kvm_dirty_ring_reset() compute delta = (s64)(0 - 0xffffffffffffffc1) = 63 which falls in [0, BITS_PER_LONG), so it folds entry[i+1] into the existing mask by setting bit 63. The trailing kvm_reset_dirty_gfn() call then sees offset = 0xffffffffffffffc1 and __fls(mask) = 63; the sum is 0 in u64 and the bounds check passes. That offset propagates into kvm_arch_mmu_enable_log_dirty_pt_masked() unchanged. On the legacy MMU path -- kvm_memslots_have_rmaps() == true, i.e. shadow paging, any VM that has allocated shadow roots, or a write-tracked slot -- it reaches gfn_to_rmap(), which indexes slot->arch.rmap[0][] with a near-U64_MAX gfn. That is an out-of-bounds load of a kvm_rmap_head, followed by a conditional clear of PT_WRITABLE_MASK in whatever the loaded pointer points at. The path is reachable from any process holding /dev/kvm. Range-check offset on its own first, so the addition cannot wrap. memslot->npages is bounded well below U64_MAX, so once offset < npages holds, offset + __fls(mask) (with __fls(mask) < BITS_PER_LONG) stays in range.
10 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-52969 is an integer overflow and out-of-bounds access vulnerability in kvm_reset_dirty_gfn(). The kernel function validates a gfn (guest frame number) range with the check: if (!memslot || (offset + __fls(mask)) >= memslot->npages) return; where offset is u64. Since the addition is unchecked, a u64 wrap can bypass the guard. The dirty ring backing pages are MAP_SHARED at KVM_DIRTY_LOG_PAGE_OFFSET, allowing the userspace VMM to rewrite slot and offset fields between kernel writes and KVM_RESET_DIRTY_RINGS consumption. By crafting two entries with offsets 0xffffffffffffffc1 and 0, the coalescing loop computes a delta of 63, folding entry coalescing and wrapping the final offset to 0 after the addition. This zero-wrapped offset then propagates into kvm_arch_mmu_enable_log_dirty_pt_masked(), reaching gfn_to_rmap() which performs an out-of-bounds load and conditional write to arbitrary memory. The fix enforces range-checking of offset before addition to prevent wraparound.
Business impact
This vulnerability enables local privilege escalation on systems running KVM. Any user or process with access to /dev/kvm—including unprivileged containers or VM guests on shared infrastructure—can corrupt host kernel memory, potentially gaining root-level control. On multi-tenant cloud platforms, this risks lateral movement and data exfiltration across VM boundaries. The hypervisor trust boundary is broken, making it a critical concern for hosted virtualization services and on-premises data centers. Denial of service is also possible, affecting service availability.
Affected systems
All Linux kernels with KVM support are affected. This includes mainline kernels and distributions shipping KVM (Red Hat Enterprise Linux, Ubuntu, Debian, SUSE, etc.). The vulnerability is particularly dangerous on systems using shadow paging—either through legacy MMU or memory slots marked for write tracking. Kernels without KVM compiled in are not affected. Exact vulnerable version ranges are determined by when the code was introduced and when patches are applied; verify against vendor advisories for your distribution.
Exploitability
Exploitability is straightforward for local attackers. The vulnerability requires only local access to /dev/kvm, which is often available to unprivileged users on shared systems, containers, and cloud VMs. No authentication, special privileges, or user interaction is needed. The attack is reliable and repeatable once the malicious dirty ring entries are crafted. It is not a network-remote vulnerability. The CVSS score of 7.8 (HIGH) reflects the local-only requirement (AV:L) but acknowledges high impact: confidentiality, integrity, and availability are all compromised.
Remediation
Apply the upstream kernel patch that adds explicit range-checking of offset before the addition operation, ensuring offset < memslot->npages is verified independently before computing offset + __fls(mask). This prevents integer overflow. Monitor your distribution's security advisories for backported patches and apply them promptly. For systems where kernel updates are delayed, consider restricting access to /dev/kvm to trusted users only, though this is a partial mitigation and not a substitute for patching. Verify the patch has been applied by checking the kernel source or release notes against the upstream fix.
Patch guidance
Apply kernel updates from your distribution as soon as they become available. Mainline kernel users should update to a version containing the fix; the exact version number depends on the release branch. Ubuntu, Debian, Red Hat, SUSE, and other vendors will release patches through their respective channels. The fix is relatively small and focused on the bounds-check logic, so integration risk is low. Test in a non-production environment first if kernel updates require reboots. For long-term support kernels, verify the patch has been backported to your specific release. Check vendor advisories (Red Hat Security Advisories, Debian Security Tracker, etc.) for precise patch versions.
Detection guidance
Detection at the kernel level is challenging since the attack exploits shared memory that the VMM (hypervisor process) can legitimately modify. Behavioral detection might identify unusual memory corruption patterns or crashes in KVM-related code, but false positives are likely. At the host level, monitor for unexpected privilege escalations from unprivileged processes accessing /dev/kvm, or crashes in the kernel MMU/shadow paging subsystem. Intrusion detection systems looking for patterns in /dev/kvm access would require tuning to avoid noisy alerts. The most reliable detection is verifying patched kernel versions are running; use tools like 'uname -r' or distribution package managers to confirm.
Why prioritize this
This vulnerability warrants immediate patching despite being local-only. It breaks a fundamental security boundary in virtualization by allowing guest-to-host escape through the hypervisor. Any organization running KVM—whether for cloud services, container orchestration, or on-premises virtualization—is at risk. The ease of exploitation and high impact on confidentiality, integrity, and availability justify treating it as critical priority. Affected systems should be prioritized for patching ahead of higher-CVSS but less-exploitable vulnerabilities.
Risk score, explained
The CVSS 3.1 score of 7.8 (HIGH) reflects: local attack vector (AV:L) and low attack complexity (AC:L), requiring privilege level L (local user access to /dev/kvm, typically available on shared systems), no user interaction, and scope unchanged. However, all three impact metrics—confidentiality, integrity, and availability—are rated high, indicating an attacker can read arbitrary memory, corrupt kernel state, and crash the system. A local privilege escalation to root is achievable. The score appropriately captures the severity despite the local-only vector; in virtualization contexts, local access is often the threat model of greatest concern.
Frequently asked questions
Can this vulnerability be exploited remotely?
No. The attack requires local access to the /dev/kvm device file. However, in cloud environments, VM guests and containers typically have this access, making it effectively exploitable from within a guest context to compromise the host.
Do I need to worry about this if I'm not running KVM?
Only if you use KVM for virtualization. Systems using other hypervisors (Hyper-V, VMware ESXi, Xen with different dirty tracking) are not affected. Check your hypervisor configuration; if you don't see 'kvm' in kernel modules or use a commercial hypervisor, this CVE does not apply.
What's the difference between this and a guest VM escape?
This *is* a guest-to-host escape (or jailbreak). A guest OS or unprivileged process with access to /dev/kvm can use this flaw to corrupt the host kernel's memory and gain root privileges. It's one of the most severe classes of virtualization vulnerability.
Will patching require downtime?
Most Linux distributions allow live kernel patching with tools like live-patch or KernelCare, avoiding reboots. However, standard kernel patching requires a reboot. Coordinate with your change management process; the security severity justifies scheduling a maintenance window quickly.
This analysis is based on the CVE record and public vulnerability description as of the publication date. SEC.co does not guarantee the completeness or accuracy of forward-looking statements about exploit availability or attack prevalence. Organizations should verify patch availability and compatibility with their specific kernel versions and distributions through official vendor advisories before applying updates. This information is provided for informational purposes; consult with your security team or vendor for guidance specific to your environment. No exploit code or proof-of-concept is provided or endorsed by SEC.co. Source: NVD (public-domain), retrieved 2026-07-30. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10921HIGHChrome Dawn Integer Overflow Sandbox Escape Vulnerability
- CVE-2026-10924HIGHChrome Integer Overflow Sandbox Escape Vulnerability
- CVE-2026-34711HIGHCAI Content Credentials Integer Overflow Denial-of-Service Vulnerability
- CVE-2026-46122HIGHLinux b43 Wireless Driver Out-of-Bounds Read Memory Disclosure
- CVE-2026-46163HIGHLinux b43legacy Out-of-Bounds Read in Wireless RX Path
- CVE-2026-46198HIGHLinux Kernel batman-adv Integer Overflow & Kernel Memory Disclosure (CVSS 8.8)
- CVE-2026-46331HIGHLinux Kernel pedit Page Cache Corruption Vulnerability
- CVE-2026-52915HIGHLinux Kernel Netfilter IPv6 Hop-by-Hop Array Out-of-Bounds Vulnerability