CVE-2026-99336

Source
https://cve.org/CVERecord?id=CVE-2026-99336
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99336.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-99336
Downstream
Published
2026-11-19T14:21:42Z
Modified
2026-11-19T17:00:54Z
Summary
KVM: guest_memfd: take the invalidate lock when unbinding a dying file
Details

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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99336.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a8ac2bd0f98e1a230f1eb3260fa552bf2ef1753b
Fixed
4ae4316682cdc78d8f5a856ab0712a8281f211ca
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
ae431059e75d36170a5ae6b44cc4d06d43613215
Fixed
3af94f4e3526efdf52d84d7ba8d9fb8e8facb93a
Fixed
024be82ac4c4df650cc6daca6d7db79daee95470
Fixed
0ee2c883b62deb74d8c43007e8049dc006d3a2fb
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
393893693a523e053f84d69320d090b93503f79f

Affected versions

v6.*
v6.12.100
v6.12.101
v6.12.102
v6.12.103
v6.12.104
v6.12.105
v6.12.106
v6.12.107
v6.12.108
v6.12.109
v6.12.110
v6.12.111
v6.12.112
v6.12.113
v6.12.114
v6.12.115
v6.12.116
v6.12.117
v6.12.59
v6.12.60
v6.12.61
v6.12.62
v6.12.63
v6.12.64
v6.12.65
v6.12.66
v6.12.67
v6.12.68
v6.12.69
v6.12.70
v6.12.71
v6.12.72
v6.12.73
v6.12.74
v6.12.75
v6.12.76
v6.12.77
v6.12.78
v6.12.79
v6.12.80
v6.12.81
v6.12.82
v6.12.83
v6.12.84
v6.12.85
v6.12.86
v6.12.87
v6.12.88
v6.12.89
v6.12.90
v6.12.91
v6.12.92
v6.12.93
v6.12.94
v6.12.95
v6.12.96
v6.12.97
v6.12.98
v6.12.99
v6.17.10
v6.17.11
v6.17.12
v6.17.13
v6.17.9

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99336.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.12.59
Fixed
6.12.118
Type
ECOSYSTEM
Events
Introduced
6.17.9
Fixed
6.18
Type
ECOSYSTEM
Events
Introduced
6.18.0
Fixed
6.18.64
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.3.2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99336.json"