CVE-2021-47228·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: x86/ioremap: Map EFI-reserved memory as encrypted for SEV Some drivers require memory that is marked as EFI boot services data. In order for this memory to not be re-used by the kernel after ExitBootServices(), efi_mem_reserve() is used to preserve it by inserting a new EFI memory descriptor and marking it with the EFI_MEMORY_RUNTIME attribute. Under SEV, memory marked with the EFI_MEMORY_RUNTIME attribute needs to be mapped encrypted by Linux, otherwise the kernel might crash at boot like below: EFI Variables Facility v0.08 2004-May-17 general protection fault, probably for non-canonical address 0x3597688770a868b2: 0000 [#1] SMP NOPTI CPU: 13 PID: 1 Comm: swapper/0 Not tainted 5.12.4-2-default #1 openSUSE Tumbleweed Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:efi_mokvar_entry_next [...] Call Trace: efi_mokvar_sysfs_init ? efi_mokvar_table_init do_one_initcall ? __kmalloc kernel_init_freeable ? rest_init kernel_init ret_from_fork Expand the __ioremap_check_other() function to additionally check for this other type of boot data reserved at runtime and indicate that it should be mapped encrypted for an SEV guest. [ bp: Massage commit message. ]
- Severity
- medium
- 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 resolve this SEV (AMD Secure Encrypted Virtualization) memory mapping vulnerability. This fix ensures that EFI-reserved memory regions are correctly mapped as encrypted, preventing kernel crashes during boot on SEV-enabled systems. Systems running kernel versions 5.11 through 5.12.12 on AMD SEV infrastructure should prioritize this update.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check current kernel version: uname -r
- Step 2: Verify if system is running on SEV-enabled hypervisor: grep -i sev /proc/cpuinfo or dmesg | grep -i 'SEV'
- Step 3: Review kernel boot logs for general protection faults related to EFI: dmesg | grep -i 'general protection fault\|efi'
- Step 4: After patching, confirm new kernel version loads: uname -r (should show 5.12.13 or newer)
FAQ
What is CVE-2021-47228?
This vulnerability affects the Linux kernel's handling of EFI-reserved memory regions on AMD SEV systems. When certain memory regions are marked with EFI_MEMORY_RUNTIME attributes, the kernel failed to map them as encrypted, leading to general protection faults and boot failures on SEV-protected virtual machines.
Is CVE-2021-47228 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog, and no public exploits are available. However, it can cause denial of service through unintended kernel panics on affected systems.
What versions of Kernel are affected by CVE-2021-47228?
Linux kernel versions 5.11 through 5.12.12 are affected. The vulnerability was resolved in kernel 5.12.13 and later stable releases.
How do I check if my server is vulnerable to CVE-2021-47228?
Run 'uname -r' to check your kernel version. If it shows 5.11.x through 5.12.12 and your system is running on AMD SEV infrastructure (check 'grep sev /proc/cpuinfo'), your system is vulnerable and requires immediate patching.
Does Defensia detect CVE-2021-47228?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2021-47228 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/208bb686e7fa7fff16e8fa78ff0db34aa9acdbd7
- https://git.kernel.org/stable/c/8d651ee9c71bb12fc0c8eb2786b66cbe5aa3e43b
- https://git.kernel.org/stable/c/b7a05aba39f733ec337c5b952e112dd2dc4fc404
- https://git.kernel.org/stable/c/208bb686e7fa7fff16e8fa78ff0db34aa9acdbd7
- https://git.kernel.org/stable/c/8d651ee9c71bb12fc0c8eb2786b66cbe5aa3e43b
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47228. Free for 1 server.
Get started free