KVM: guest_memfd: Gracefully handle xarray errors when binding a memslot
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: KVM: guest_memfd: Gracefully handle xarray errors when binding a memslot If inserting a memslot into a guest_memfd's bindings xarray fails, propagate the error back to the caller, i.e. fail memslot creation as well. Signalling success and continuing on with memslot creation results in use-after-free, as the guest_memfd instance will remain reachable via the memslot after the file is freed (kvm_gmem_release() won't nullify the file pointer due to lack of a valid binding). Opportunistically WARN and reject binding if KVM_MEMSLOT_GMEM_ONLY is already set, partly to guard against goofs elsewhere, but mostly so that KVM doesn't need to worry about clobbering flags when unwinding on failure. Regarding the unwind, the slot must be fully prepared before inserting it into the bindings, at which point the slot becomes reachable. I.e. waiting to update the slot in order to avoid the ugly unwind isn't an option. And as part of the unwind, explicitly nullify the relevant bindings, as xarray can store a subset of entries when populating a range.
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 a7800aa80ea4d5356b8474c2302812e9d4926fa6, before 2cfc1ccf67ffe96811c816d27d44128c5d5833ec; from a7800aa80ea4d5356b8474c2302812e9d4926fa6, before 1706461eb1af814366b6d0ab413edd0876bd8033; from a7800aa80ea4d5356b8474c2302812e9d4926fa6, before 2fa83c615f8dbb240b262265e788b120b6384e7b; from a7800aa80ea4d5356b8474c2302812e9d4926fa6, before e6ecb88711d93b9e014532f17d3d29b57e80932c | 2cfc1ccf67ffe96811c816d27d44128c5d5833ec; 1706461eb1af814366b6d0ab413edd0876bd8033; 2fa83c615f8dbb240b262265e788b120b6384e7b; e6ecb88711d93b9e014532f17d3d29b57e80932c |
| Linux Linux | Software | 6.8 | not recorded |
The 7.0 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 | High | Hard to carry out. It depends on conditions the attacker cannot control. |
| 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.0 | 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.