CVE-2021-47255·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: kvm: LAPIC: Restore guard to prevent illegal APIC register access Per the SDM, "any access that touches bytes 4 through 15 of an APIC register may cause undefined behavior and must not be executed." Worse, such an access in kvm_lapic_reg_read can result in a leak of kernel stack contents. Prior to commit 01402cf81051 ("kvm: LAPIC: write down valid APIC registers"), such an access was explicitly disallowed. Restore the guard that was removed in that commit.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.12.13
- Published
- 2024-05-21
Affected versions
From: 5.11
Until: 5.12.13
Fixed in: 5.12.13
How to fix this CVE
Update your Linux kernel to version 5.12.13 or later to address a memory disclosure vulnerability in the KVM LAPIC subsystem. This vulnerability allows unauthorized reads of kernel stack memory through malformed APIC register access patterns. Ensure all virtualization hosts are patched promptly, as this affects KVM-based hypervisors running vulnerable kernel versions.
sudo dnf check-update kernel && sudo dnf update kernelDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with `uname -r` and compare against the affected range (5.11.0 through 5.12.12)
- Step 2: Verify if KVM is enabled on the system by running `grep -c '^processor' /proc/cpuinfo` and checking if any VMs are running with `virsh list --all` (if libvirt is installed)
- Step 3: Search kernel logs for APIC-related errors using `sudo dmesg | grep -i 'apic\|lapic'` and `sudo journalctl -b | grep -i 'apic'`
- Step 4: After patching, confirm the new kernel is loaded with `uname -r` and verify it is version 5.12.13 or later
FAQ
What is CVE-2021-47255?
This vulnerability is a kernel memory disclosure flaw in KVM's Local APIC (LAPIC) register handling that permits guest virtual machines to read uninitialized kernel stack memory by issuing invalid APIC register access patterns. The issue was introduced when input validation checks were removed in a prior commit.
Is CVE-2021-47255 being actively exploited?
No, this vulnerability is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are currently available. However, it remains a high-severity issue due to potential information disclosure risks.
What versions of Kernel are affected by CVE-2021-47255?
Linux kernel versions 5.11.0 through 5.12.12 are vulnerable. The fix was merged into stable releases starting with 5.12.13.
How do I check if my server is vulnerable to CVE-2021-47255?
Run `uname -r` and check if your kernel version falls within 5.11.0 to 5.12.12. If it does and KVM is enabled (check with `lsmod | grep kvm`), your system is vulnerable.
Does Defensia detect CVE-2021-47255?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47255 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/018685461a5b9a9a70e664ac77aef0d7415a3fd5
- https://git.kernel.org/stable/c/218bf772bddd221489c38dde6ef8e917131161f6
- https://git.kernel.org/stable/c/a2aff09807fbe4018c269d3773a629949058b210
- https://git.kernel.org/stable/c/bf99ea52970caeb4583bdba1192c1f9b53b12c84
- https://git.kernel.org/stable/c/018685461a5b9a9a70e664ac77aef0d7415a3fd5
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47255. Free for 1 server.
Get started free