CVE-2021-47276·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: ftrace: Do not blindly read the ip address in ftrace_bug() It was reported that a bug on arm64 caused a bad ip address to be used for updating into a nop in ftrace_init(), but the error path (rightfully) returned -EINVAL and not -EFAULT, as the bug caused more than one error to occur. But because -EINVAL was returned, the ftrace_bug() tried to report what was at the location of the ip address, and read it directly. This caused the machine to panic, as the ip was not pointing to a valid memory address. Instead, read the ip address with copy_from_kernel_nofault() to safely access the memory, and if it faults, report that the address faulted, otherwise report what was in that location.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 5.12.11
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 2% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 5.11
Until: 5.12.11
Fixed in: 5.12.11
How to fix this CVE
Update your Linux kernel to version 5.12.11 or later to patch this vulnerability that could cause kernel panics during ftrace initialization on ARM64 systems. The fix implements safe memory access using copy_from_kernel_nofault() instead of direct pointer dereferencing, preventing machine crashes when invalid instruction pointers are encountered during ftrace error handling.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r (should be 5.12.11 or later if patched)
- Verify kernel configuration has ftrace enabled: grep CONFIG_FTRACE /boot/config-$(uname -r)
- Monitor system logs for ftrace-related panics: sudo dmesg | grep -i ftrace
- Confirm patch applied by checking kernel commit: git log --oneline | grep -i 'ftrace.*nofault' or verify kernel build timestamp is after the patch release date
FAQ
What is CVE-2021-47276?
This vulnerability exists in the Linux kernel's ftrace subsystem where error handling code directly reads memory at an invalid instruction pointer address without safety checks, causing kernel panics on ARM64 systems during ftrace initialization failures.
Is CVE-2021-47276 being actively exploited?
No, this CVE is not listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are available. Exploitation would require local access and specific kernel configuration.
What versions of Kernel are affected by CVE-2021-47276?
Linux kernel versions 5.11 through 5.12.10 are vulnerable; the fix is available in 5.12.11 and later stable releases.
How do I check if my server is vulnerable to CVE-2021-47276?
Run uname -r to retrieve your kernel version; if it shows 5.11.x or 5.12.0 through 5.12.10, your system is vulnerable. Verify ftrace is enabled with grep CONFIG_FTRACE /boot/config-$(uname -r).
Does Defensia detect CVE-2021-47276?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47276 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/0bc62e398bbd9e600959e610def5109957437b28
- https://git.kernel.org/stable/c/3e4ddeb68751fb4fb657199aed9cfd5d02796875
- https://git.kernel.org/stable/c/4aedc2bc2b32c93555f47c95610efb89cc1ec09b
- https://git.kernel.org/stable/c/6c14133d2d3f768e0a35128faac8aa6ed4815051
- https://git.kernel.org/stable/c/7e4e824b109f1d41ccf223fbb0565d877d6223a2
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47276. Free for 1 server.
Get started free