CVE-2026-53345: Linux KVM Memory Leak in SEV-ES VM Destruction
CVE-2026-53345 is a memory leak vulnerability in the Linux kernel's KVM (Kernel-based Virtual Machine) hypervisor that affects systems running SEV-ES (Secure Encrypted Virtualization with Encrypted State) virtual machines. The issue occurs when KVM fails to properly clean up a writable page mapping during virtual machine destruction, particularly when userspace never completes operations after certain VM exits. This leaves memory incorrectly marked as dirty without proper cleanup, resulting in a resource leak. The vulnerability is triggered only during the shutdown sequence of affected VMs and does not allow remote exploitation or privilege escalation beyond the local user's existing permissions.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-401
- Affected products
- 7 configuration(s)
- Published / Modified
- 2026-07-01 / 2026-07-22
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: KVM: Don't WARN if memory is dirtied without a vCPU when the VM is dying When marking a page dirty, complain about not having a running/loaded vCPU if and only if the VM is still alive, i.e. its refcount is non-zero. This will allow fixing a memory leak for x86 SEV-ES guests without hitting what is effectively a false positive on the WARN. For some SEV-ES VM-Exits, KVM keeps a writable mapping of a guest page across an exit to userspace, and typically unmaps the page on the next KVM_RUN. But if userspace never calls KVM_RUN after such an exit, then KVM needs to unmap the page when the vCPU is destroyed, which in turn triggers the WARN about not having a running vCPU. Alternatively, SEV-ES could temporarily load the vCPU to suppress the WARN, as is done in nested_vmx_free_vcpu() (but for completely unrelated reasons; suppressing WARN from nested_put_vmcs12_pages() is pure happenstance). But loading a vCPU during destruction is gross (ideally nVMX code would be cleaned up), risks complicating the SEV-ES code (KVM would need to ensure the temporarily load()+put() only runs when the vCPU isn't already loaded), and is ultimately pointless. The motivation for the WARN is to guard against KVM dirtying guest memory without pushing the corresponding GFN to the active vCPU's dirty ring, e.g. to ensure userspace doesn't miss a dirty page. But for the VM's refcount to reach zero, there can't be _any_ userspace mappings to the dirty ring, as mapping the dirty ring requires doing mmap() on the vCPU FD. I.e. if userspace had a valid mapping for the dirty ring, then the vCPU file and thus the owning VM would still be alive. And so since userspace can't possibly reach the dirty ring, whether or not KVM technically "misses" a push to the dirty ring is irrelevant.
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from a false-positive WARN condition in KVM's dirty page tracking mechanism. When marking guest memory as dirty, KVM validates that a running vCPU context exists to ensure the dirty page notification is properly pushed to the active vCPU's dirty ring. However, during VM destruction for SEV-ES guests, KVM may need to unmap guest pages that were held writable across a userspace exit—a scenario where no vCPU is actively loaded. The original code triggers a WARN in this condition, even though it's harmless: if the VM refcount has reached zero, no userspace process holds a valid mapping to the dirty ring, making the missed dirty notification irrelevant. The fix conditions the WARN to fire only when the VM is still alive (refcount > 0), eliminating the false positive during legitimate cleanup.
Business impact
This vulnerability primarily affects infrastructure operators running SEV-ES virtual machines on Linux KVM hosts. The memory leak accumulates across affected VM lifecycle events, potentially degrading host performance if many VMs are created and destroyed. However, the impact is limited to the VM destruction path and does not compromise guest data security or allow host escape. For organizations heavily invested in encrypted VM deployments (e.g., confidential computing workloads), the resource waste may influence scheduling efficiency and increase operational costs over time, but the business criticality is low unless memory exhaustion becomes a concern in resource-constrained environments.
Affected systems
Linux kernel versions with KVM support are affected, specifically those running SEV-ES virtual machines. SEV-ES is an AMD security feature used primarily on EPYC processors; systems using other processor architectures or those not running encrypted VMs may not trigger this code path. The vulnerability manifests only during the vCPU destruction phase after a userspace-initiated VM exit without a subsequent KVM_RUN call, meaning it is reproducible in specific VM lifecycle scenarios rather than affecting all KVM deployments.
Exploitability
This vulnerability cannot be exploited remotely and poses no security boundary violation. It requires local access to the hypervisor host and can only be triggered by a user with permissions to manage and destroy VMs. The impact is limited to a resource leak (improper memory accounting), not unauthorized data access or system compromise. Exploitability in a security context is effectively zero; this is a reliability and resource management issue rather than a security breach vector.
Remediation
Apply a Linux kernel patch that conditions the WARN check to only fire when the VM refcount is non-zero. This prevents false positives during legitimate VM destruction while preserving the original safety check for active VMs. Organizations should update to a patched kernel version once available from their distribution or verify the fix against upstream kernel releases. No configuration changes or workarounds are necessary; patching the kernel is the sole remediation path.
Patch guidance
Monitor your Linux distribution's kernel advisories for an update addressing CVE-2026-53345. The fix is a targeted logic change to KVM's dirty page tracking code and is low-risk for backporting to stable kernel branches. Verify the patch in your distribution's advisory or upstream kernel commit history before deployment. Test the update in a non-production environment first, particularly if your infrastructure runs SEV-ES workloads, to confirm memory leak behavior is resolved. No special migration steps are required; standard kernel update procedures apply.
Detection guidance
Monitor kernel logs for WARN_ON messages originating from KVM's dirty page marking function during VM destruction events. Elevated kernel memory usage correlated with VM creation/destruction cycles may indicate the leak is occurring. For affected environments, tracking memory accounting before and after VM lifecycle operations can reveal resource accumulation. However, detection is primarily post-hoc; prevention through patching is the recommended approach. Consider enabling memory instrumentation tools (e.g., kmemleak) on non-production systems to validate the leak's absence post-patch.
Why prioritize this
While the CVSS score is moderate (5.5), the vulnerability's actual risk to operations is low because it does not expose security boundaries or enable privilege escalation. Prioritize patching based on infrastructure maturity: organizations with dense SEV-ES VM deployments and tight memory constraints should patch sooner to avoid cumulative resource waste. Environments without encrypted VMs or with abundant hypervisor memory can defer patching to standard maintenance windows. This is not a candidate for emergency patching but should be included in routine kernel security updates.
Risk score, explained
The CVSS:3.1 score of 5.5 (MEDIUM) reflects a local attack vector, low complexity, low privilege requirements, and high availability impact (DoS potential through memory exhaustion). However, the actual exploitability is constrained by the specific SEV-ES lifecycle requirement and the gradual nature of the leak, reducing real-world severity below the numeric score. The score appropriately penalizes the availability impact but does not reflect the limited attack surface or the fact that this is a resource leak, not an active security vulnerability.
Frequently asked questions
Does this vulnerability allow unauthorized access to guest VM memory?
No. This is strictly a resource leak affecting memory accounting and cleanup during VM destruction. Guest data confidentiality and integrity are not compromised. The dirty page tracking mechanism protects against missed notifications, not data exfiltration, so the false-positive WARN does not mask a security breach.
Will this vulnerability cause immediate system instability?
Unlikely in most deployments. The leak is gradual and occurs only during specific VM exit scenarios in SEV-ES guests. Environments with infrequent VM churn or ample hypervisor memory may never observe practical impact. Severe memory pressure would require many affected VM destruction cycles over time.
Do I need to patch if I don't use AMD SEV-ES or encrypted VMs?
You are not impacted if your Linux KVM hosts do not run SEV-ES virtual machines. This vulnerability is specific to that encrypted VM feature. Standard VM deployments do not trigger the affected code path, though updating for other kernel security fixes remains good practice.
What is the relationship between this WARN and the dirty ring buffer in KVM?
The dirty ring is a userspace-accessible buffer that tracks which guest pages KVM has modified, allowing live migration and backup tools to avoid copying unchanged data. KVM validates that dirty page notifications are pushed to an active vCPU's ring to prevent userspace from missing updates. However, during VM destruction when no vCPU is loaded, this check triggers a false positive—hence the fix to only warn if userspace could actually be listening (i.e., the VM is still alive).
This analysis is based on published vulnerability data as of the date of writing. CVSS scores and severity ratings are provided by the CVE record and represent industry consensus; however, real-world risk depends on your specific infrastructure and deployment patterns. No liability is assumed for incomplete or rapidly-evolving vulnerability details. Organizations should verify all patch versions and remediation guidance against official vendor advisories and their own security policies before implementation. This explainer is informational and does not constitute professional security advice. Source: NVD (public-domain), retrieved 2026-08-10. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-46109MEDIUMLinux Kernel USB ULPI Memory Leak – CVSS 5.5 Medium
- CVE-2026-46141MEDIUMPowerPC XIVE Memory Leak in MSI-X Interrupt Allocation
- CVE-2026-46143MEDIUMLinux QCOM Audio Driver Memory Leak – Availability Risk
- CVE-2026-46147MEDIUMLinux ARM64 KVM vCPU Initialization Pin Leak and Race Condition
- CVE-2026-46151MEDIUMLinux Kernel USB Printer Driver Heap Memory Leak
- CVE-2026-46171MEDIUMLinux RISC-V KVM Vector Context Memory Leak
- CVE-2026-46182MEDIUMLinux Kernel PAPR Hypervisor Pipe Information Disclosure Vulnerability
- CVE-2026-46207MEDIUMLinux vsock/virtio Incomplete Payload Disclosure in Network Monitoring