CVE-2021-47061 KVM: Destroy I/O bus devices on unregister failure _after_ sync'ing SRCU
A use-after-free in the Linux kernel KVM module allows attackers to potentially execute code or escalate privileges via improper device destruction timing.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-47061?
CVE-2021-47061 is a high-severity use after free vulnerability in Linux kernel, published on 29 Feb 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
KVM: Destroy I/O bus devices on unregister failure _after_ sync'ing SRCU
If allocating a new instance of an I/O bus fails when unregistering a device, wait to destroy the device until after all readers are guaranteed to see the new null bus. Destroying devices before the bus is nullified could lead to use-after-free since readers expect the devices on their reference of the bus to remain valid.
Weakness: CWE-416
Which versions are affected by CVE-2021-47061?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47061?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2021-47061 being exploited?
There is no known exploitation of CVE-2021-47061 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-47061, GHSA-wpx2-5m9q-j3g7, UBUNTU-CVE-2021-47061.