KVM: x86: Take SRCU in kvm_zap_gfn_range()
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Take SRCU in kvm_zap_gfn_range() kvm_zap_gfn_range() walks memslots and rmaps and may drop mmu_lock to reschedule. Callers that do not already hold kvm->srcu (or slots_lock) can race with memslot deletion: synchronize_srcu_expedited() does not wait, kvm_free_memslot() 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 slot_rmap_walk_next+0x82/0x1c0 Read of size 8 at addr ffffc900005c1008 Call Trace: slot_rmap_walk_next+0x82/0x1c0 __kvm_rmap_zap_gfn_range+0x17a/0x280 kvm_zap_gfn_range+0x2a6/0x6a0 kvm_vfio_set_attr+0x576/0x770 kvm_device_ioctl+0x1ff/0x3b0 Take SRCU inside kvm_zap_gfn_range() 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 __kvm_set_or_clear_apicv_inhibit().
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from 362ff6dca5416e20646badf09394b9a8bfc000db, before 9d119b4921ac74bc606917fd274c10c966fa5b72; from 362ff6dca5416e20646badf09394b9a8bfc000db, before ec9df57c8e00f189d58d927cc9a1f49592f687af; from 362ff6dca5416e20646badf09394b9a8bfc000db, before e34057e59ed784a37657835aac9f54eec0864342; from 362ff6dca5416e20646badf09394b9a8bfc000db, before b59a87c1ba3c347e8aec5f932eb7abf13064fd62 | 9d119b4921ac74bc606917fd274c10c966fa5b72; ec9df57c8e00f189d58d927cc9a1f49592f687af; e34057e59ed784a37657835aac9f54eec0864342; b59a87c1ba3c347e8aec5f932eb7abf13064fd62 |
| Linux Linux | Software | 6.7 | not recorded |
The 7.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | Low | The attacker needs an ordinary user account. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 1.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 4 sources for this flaw, none tagged as a vendor patch.