VulnWatch by ve1ve2
high 7.0 EPSS 0.21%

CVE-2026-99336: In the Linux kernel, the following vulnerability has been resolved: KVM: guest_memfd: take the invalidate lock when unbinding a dying file kvm_gmem_unbind() ta…

Source:
NVD CVE API 2.0
Published:
Fetched:
Updated:
Affects:
linux

https://nvd.nist.gov/vuln/detail/CVE-2026-99336 ↗

In the Linux kernel, the following vulnerability has been resolved: KVM: guest_memfd: take the invalidate lock when unbinding a dying file kvm_gmem_unbind() takes mapping->invalidate_lock only if the get_file_active() succeeds. When the guest_memfd file is dying, its reference count is already zero so get_file_active fails and the binding is removed without holding the invalidate lock. kvm_gmem_invalidate_{start,end}() checks f->bindings independently to decide whether to begin or end KVM MMU invalidation. So, the bindings must therefore remain stable between the two calls. Otherwise, unbind can remove a binding after start increments mmu_invalidate_in_progress, but before end finds the binding and decrements it. Example, unbind race with memory failure: CPU 0: memory failure CPU 1: memslot delete ---------------------------------- --------------------------- (guest_memfd file is dying) kvm_gmem_error_folio() kvm_gmem_invalidate_start() finds binding mmu_invalidate_in_progress++ kvm_gmem_unbind() get_file_active() fails removes binding kvm_gmem_invalidate_end() no binding found counter stays elevated mmu_invalidate_retry() then returns 1 forever, so guest page faults retry without ever installing a mapping and the guest hangs. Remove the distinction between live and dying files in the unbind path. Always use slot->gmem.file and take the invalidate lock when it's non-NULL. Normal unbind callers hold slots_lock, which prevents release from clearing the pointer or freeing the file state until unbind completes. Final VM teardown can only see a NULL pointer because guest_memfd pins the KVM until release has cleared all bindings. References: https://git.kernel.org/stable/c/024be82ac4c4df650cc6daca6d7db79daee95470 https://git.kernel.org/stable/c/0ee2c883b62deb74d8c43007e8049dc006d3a2fb https://git.kernel.org/stable/c/3af94f4e3526efdf52d84d7ba8d9fb8e8facb93a https://git.kernel.org/stable/c/4ae4316682cdc78d8f5a856ab0712a8281f211ca

Linked vulnerabilities (1)

CVE-2026-99336 high 7.0 EPSS 0.21% (p12) NVDCVE.org
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

kernel: kernel: Denial of Service via race condition in KVM guest memory unbinding

CWE: CWE-413Aliases: CVE-2026-99272, CVE-2026-99275, CVE-2026-99308, CVE-2026-99312, CVE-2026-99314, CVE-2026-99315, CVE-2026-99316, CVE-2026-99317, CVE-2026-99318, CVE-2026-99319, CVE-2026-99320, CVE-2026-99335, CVE-2026-99345, CVE-2026-99347, CVE-2026-99348, CVE-2026-99350, CVE-2026-99363, CVE-2026-99376, CVE-2026-99377, CVE-2026-99379, CVE-2026-99382, CVE-2026-99384, CVE-2026-99387, CVE-2026-99394, CVE-2026-99426, CVE-2026-99484, CVE-2026-99496, CVE-2026-99566, CVE-2026-99567, CVE-2026-99568, CVE-2026-99569, CVE-2026-99570, CVE-2026-99573, CVE-2026-99574, CVE-2026-99575, CVE-2026-99576, CVE-2026-99577, CVE-2026-99578, CVE-2026-99579, CVE-2026-99580, CVE-2026-99582, CVE-2026-99583, CVE-2026-99587, CVE-2026-99588, CVE-2026-99589, CVE-2026-99590, CVE-2026-99591, CVE-2026-99593, CVE-2026-99594NVD: Received

Also reported by (1)