CVE-2021-47061·Kernel vulnerability
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.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.12.4
- Published
- 2024-02-29
Affected versions
From: 5.12
Until: 5.12.4
Fixed in: 5.12.4
How to fix this CVE
Update your Linux kernel to version 5.12.4 or later to resolve a critical memory safety issue in KVM's I/O bus device handling. This vulnerability can lead to use-after-free conditions when device unregistration fails, potentially allowing local privilege escalation. Apply the kernel update immediately if you are running an affected 5.12.x kernel on a system with KVM virtualization enabled.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Run 'uname -r' to check your current kernel version. If it shows 5.12.0 through 5.12.3, your system is vulnerable.
- Verify KVM is enabled by checking if '/sys/module/kvm' exists and 'lsmod | grep kvm' returns output.
- Check dmesg and /var/log/kern.log for error messages containing 'io_bus' or 'kvm' combined with 'allocation' or 'unregister' failures.
- After patching, reboot and run 'uname -r' again to confirm the kernel version is 5.12.4 or higher, and verify '/sys/module/kvm' still functions normally.
FAQ
What is CVE-2021-47061?
This is a use-after-free vulnerability in KVM's I/O bus device management where improper cleanup during device unregistration can leave freed device references accessible to active readers, potentially enabling local privilege escalation on systems running the affected kernel versions.
Is CVE-2021-47061 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2021-47061?
Linux kernel versions 5.12 through 5.12.3 are vulnerable. The issue is resolved in kernel 5.12.4 and all subsequent releases.
How do I check if my server is vulnerable to CVE-2021-47061?
Run 'uname -r' and check if the output shows kernel version 5.12.0, 5.12.1, 5.12.2, or 5.12.3. If it does and KVM is enabled (verify with 'lsmod | grep kvm'), your system requires an immediate kernel update.
Does Defensia detect CVE-2021-47061?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47061 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/03c6cccedd3913006744faa252a4da5145299343
- https://git.kernel.org/stable/c/2ee3757424be7c1cd1d0bbfa6db29a7edd82a250
- https://git.kernel.org/stable/c/30f46c6993731efb2a690c9197c0fd9ed425da2d
- https://git.kernel.org/stable/c/4e899ca848636b37e9ac124bc1723862a7d7d927
- https://git.kernel.org/stable/c/03c6cccedd3913006744faa252a4da5145299343
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47061. Free for 1 server.
Get started free