CVE-2026-99336
KVM: guest_memfd: take the invalidate lock when unbinding a dying file
Check your servers for CVE-2026-99336
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-99336 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Severity (CVSS)
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 2.42% of all scored CVEs. Scores of 29 Nov 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from a8ac2bd0f98e1a230f1eb3260fa552bf2ef1753b, before 4ae4316682cdc78d8f5a856ab0712a8281f211ca affected from ae431059e75d36170a5ae6b44cc4d06d43613215, before 3af94f4e3526efdf52d84d7ba8d9fb8e8facb93a affected from ae431059e75d36170a5ae6b44cc4d06d43613215, before 024be82ac4c4df650cc6daca6d7db79daee95470 affected from ae431059e75d36170a5ae6b44cc4d06d43613215, before 0ee2c883b62deb74d8c43007e8049dc006d3a2fb affected 393893693a523e053f84d69320d090b93503f79f affected from 6.12.59, before 6.12.118 affected from 6.17.9, before 6.18
Other versions: unaffected
|
| Linux |
affected 6.18 unaffected before 6.18 unaffected from 6.12.118 up to and including 6.12.* unaffected from 6.18.64 up to and including 6.18.* unaffected from 7.3.2 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-99336 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-99336
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-99336
trivy image --scanners vuln IMAGE | grep CVE-2026-99336
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/4ae4316682cdc78d8f5a856ab0712a8281f211ca git.kernel.org
- https://git.kernel.org/stable/c/3af94f4e3526efdf52d84d7ba8d9fb8e8facb93a git.kernel.org
- https://git.kernel.org/stable/c/024be82ac4c4df650cc6daca6d7db79daee95470 git.kernel.org
- https://git.kernel.org/stable/c/0ee2c883b62deb74d8c43007e8049dc006d3a2fb git.kernel.org
Source: the record CVE-2026-99336 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse