# CVE-2026-53345: KVM: Don't WARN if memory is dirtied without a vCPU when the VM is dying

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.12%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-07-01T13:32:25.098Z
- Modified: 2026-11-06T17:18:25.773Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 2efd61a608b0039911924d2e5d7028eb37496e85 before 21b880f040bd0e8b50ff30c5a40db7bf3384ff48; from 2efd61a608b0039911924d2e5d7028eb37496e85 before 033d39e41fc30f484f4e4f37fb4cd76b12cbb18e; from 2efd61a608b0039911924d2e5d7028eb37496e85 before 66a8e7ddd901023c89a2733494d827eca3f9c1b0; from 2efd61a608b0039911924d2e5d7028eb37496e85 before 343e95c8ecc40e0738975ef4ee24c0c35e800e6b; from 2efd61a608b0039911924d2e5d7028eb37496e85 before 99d7d43784ae3235026581e9bf892c036e04c8e6; from 2efd61a608b0039911924d2e5d7028eb37496e85 before 8618004d3e897c0f1b71d9a9ab860461289bb89a; 5.17 (not affected: before 5.17; from 6.1.191 up to 6.1.*; from 6.6.143 up to 6.6.*; from 6.12.94 up to 6.12.*; from 6.18.36 up to 6.18.*; from 7.0.13 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 5.17 before 6.6.143; from 6.7 before 6.12.94; from 6.13 before 6.18.36; from 6.19 before 7.0.13; 7.1

## References

- <https://git.kernel.org/stable/c/21b880f040bd0e8b50ff30c5a40db7bf3384ff48>
- <https://git.kernel.org/stable/c/033d39e41fc30f484f4e4f37fb4cd76b12cbb18e> (patch)
- <https://git.kernel.org/stable/c/66a8e7ddd901023c89a2733494d827eca3f9c1b0> (patch)
- <https://git.kernel.org/stable/c/343e95c8ecc40e0738975ef4ee24c0c35e800e6b> (patch)
- <https://git.kernel.org/stable/c/99d7d43784ae3235026581e9bf892c036e04c8e6> (patch)
- <https://git.kernel.org/stable/c/8618004d3e897c0f1b71d9a9ab860461289bb89a> (patch)

## Sources

- CVE List: [CVE-2026-53345](https://www.cve.org/CVERecord?id=CVE-2026-53345), CVE Terms of Use, modified 2026-11-06
- NVD: [CVE-2026-53345](https://nvd.nist.gov/vuln/detail/CVE-2026-53345), Public domain, modified 2026-11-06

---

Page: https://cve.day/CVE-2026-53345 · Whole record: https://cve.day/CVE-2026-53345.json · Rebuilt by cve.day 2026-11-25T22:59:26.899Z
