CVE-2021-47291·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: ipv6: fix another slab-out-of-bounds in fib6_nh_flush_exceptions While running the self-tests on a KASAN enabled kernel, I observed a slab-out-of-bounds splat very similar to the one reported in commit 821bbf79fe46 ("ipv6: Fix KASAN: slab-out-of-bounds Read in fib6_nh_flush_exceptions"). We additionally need to take care of fib6_metrics initialization failure when the caller provides an nh. The fix is similar, explicitly free the route instead of calling fib6_info_release on a half-initialized object.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.13.6
- Published
- 2024-05-21
Affected versions
From: 5.11
Until: 5.13.6
Fixed in: 5.13.6
How to fix this CVE
Update your Linux kernel to version 5.13.6 or later to address this memory safety issue affecting IPv6 routing. This vulnerability in the fib6_nh_flush_exceptions function can cause kernel memory corruption when handling incomplete route initialization. Apply the patch immediately to systems running kernels 5.11 through 5.13.5.
sudo dnf check-update kernel && sudo dnf update kernelDefensia detects this vulnerability
How to check if you are affected
- Check kernel version: uname -r | grep -E '^5\.(11|12|13\.[0-5])' — if output matches, system is vulnerable
- Verify if IPv6 routing is enabled: cat /proc/sys/net/ipv6/conf/all/forwarding (1=enabled, affected if enabled on vulnerable kernel)
- Search kernel logs for memory corruption signs: sudo dmesg | grep -i 'kasan\|slab-out-of-bounds\|use-after-free' | grep -i fib6
- Confirm patch applied: uname -r | grep -E '^5\.(13\.[6-9]|1[4-9]|[2-9][0-9])' — if kernel version is 5.13.6 or higher, vulnerability is patched
FAQ
What is CVE-2021-47291?
This vulnerability is a slab-out-of-bounds memory access in the Linux kernel's IPv6 routing subsystem, specifically in the fib6_nh_flush_exceptions function. When metric initialization fails during route setup, improper cleanup can lead to kernel memory corruption and potential system crash.
Is CVE-2021-47291 being actively exploited?
No, according to CISA's Known Exploited Vulnerabilities catalog, CVE-2021-47291 is not actively exploited in the wild, and no public exploits are publicly available.
What versions of Kernel are affected by CVE-2021-47291?
Linux kernel versions 5.11.0 through 5.13.5 are vulnerable; the issue was fixed in kernel 5.13.6 and later.
How do I check if my server is vulnerable to CVE-2021-47291?
Run 'uname -r' and compare the output against the affected range 5.11-5.13.5. If your version falls within this range and IPv6 routing is enabled (check with 'cat /proc/sys/net/ipv6/conf/all/forwarding'), your system is vulnerable.
Does Defensia detect CVE-2021-47291?
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-47291 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/115784bcccf135c3a3548098153413d76f16aae0
- https://git.kernel.org/stable/c/830251361425c5be044db4d826aaf304ea3d14c6
- https://git.kernel.org/stable/c/8fb4792f091e608a0a1d353dfdf07ef55a719db5
- https://git.kernel.org/stable/c/ce8fafb68051fba52546f8bbe8621f7641683680
- https://git.kernel.org/stable/c/115784bcccf135c3a3548098153413d76f16aae0
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47291. Free for 1 server.
Get started free