CVE-2026-99340: KVM: x86: Take SRCU in kvm_zap_gfn_range()
In the Linux kernel, the following vulnerability has been resolved:
KVM: x86: Take SRCU in kvmzapgfnrange()
kvmzapgfnrange() walks memslots and rmaps and may drop mmulock to reschedule. Callers that do not already hold kvm->srcu (or slotslock) can race with memslot deletion: synchronizesrcuexpedited() does not wait, kvmfreememslot() frees the old slot and its rmap, and the zap resumes on freed memory.
The VFIO noncoherent-DMA path hits this by zapping the entire GPA space without SRCU. KASAN reported:
BUG: KASAN: vmalloc-out-of-bounds in slotrmapwalknext+0x82/0x1c0 Read of size 8 at addr ffffc900005c1008 Call Trace: slotrmapwalknext+0x82/0x1c0 kvmrmapzapgfnrange+0x17a/0x280 kvmzapgfnrange+0x2a6/0x6a0 kvmvfiosetattr+0x576/0x770 kvmdeviceioctl+0x1ff/0x3b0
Take SRCU inside kvmzapgfnrange() so every caller is covered. Nesting with an existing kvm->srcu critical section is fine; the helper uses a local index. Drop the now-redundant SRCU pair from kvmsetorclearapicvinhibit().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Compensating control
Take SRCU inside kvm_zap_gfn_range() so every caller is covered.