Executive brief
A technical issue was identified in the Linux Kernel's virtualization component (KVM) that could lead to memory leaks in specific virtual machine configurations, such as those using AMD SEV-ES. The issue involves how the system tracks changes to memory when a virtual machine is being shut down. While primarily a stability and resource management concern, it could impact the reliability of host systems running multiple secure virtual machines.
Technical details
A vulnerability in `virt/kvm/kvm_main.c` in the Linux kernel was identified where KVM would trigger a `WARN` (and potentially fail to clean up resources) when guest memory was marked dirty without an active vCPU context during VM destruction. In SEV-ES guests, KVM may maintain writable mappings across userspace exits; if the VM is destroyed before the next `KVM_RUN`, the subsequent unmapping triggers a false-positive warning because no vCPU is loaded. The fix modifies `mark_page_dirty_in_slot` to only trigger the warning if the VM's refcount (`kvm->users_count`) is non-zero, acknowledging that dirty ring tracking is irrelevant once userspace mappings are gone. This resolution prevents a memory leak in SEV-ES guest cleanup paths.
Affected products
- Linux Linux Kernel virt/kvm/kvm_main.c
Timeline
- 2026-05-29: patched: Initial patch authored by Sean Christopherson
- 2026-07-01: advisory: CVE-2026-53345 published by NVD
References
- https://git.kernel.org/stable/c/033d39e41fc30f484f4e4f37fb4cd76b12cbb18e
- https://git.kernel.org/stable/c/343e95c8ecc40e0738975ef4ee24c0c35e800e6b
- https://git.kernel.org/stable/c/66a8e7ddd901023c89a2733494d827eca3f9c1b0
- https://git.kernel.org/stable/c/8618004d3e897c0f1b71d9a9ab860461289bb89a
- https://git.kernel.org/stable/c/99d7d43784ae3235026581e9bf892c036e04c8e6