CVE-2021-47372·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: net: macb: fix use after free on rmmod plat_dev->dev->platform_data is released by platform_device_unregister(), use of pclk and hclk is a use-after-free. Since device unregister won't need a clk device we adjust the function call sequence to fix this issue. [ 31.261225] BUG: KASAN: use-after-free in macb_remove+0x77/0xc6 [macb_pci] [ 31.275563] Freed by task 306: [ 30.276782] platform_device_release+0x25/0x80
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.14.9
- Published
- 2024-05-21
Affected versions
From: 5.11
Until: 5.14.9
Fixed in: 5.14.9
How to fix this CVE
Update your Linux kernel to version 5.14.9 or later to resolve a use-after-free vulnerability in the macb network driver that occurs during module removal. The issue stems from accessing clock resources after platform device unregistration, which can cause kernel crashes. Perform a kernel upgrade and reboot your system to apply the fix.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with: uname -r
- Step 2: Verify if macb network driver is loaded by running: lsmod | grep macb
- Step 3: Review kernel logs for use-after-free errors: sudo dmesg | grep -i 'use-after-free\|macb_remove\|KASAN'
- Step 4: After patching, reboot and confirm the new kernel version is active: uname -r (should be 5.14.9 or later)
FAQ
What is CVE-2021-47372?
This vulnerability is a use-after-free bug in the Linux kernel's macb Cadence Ethernet driver that occurs when the kernel module is unloaded, causing memory safety violations due to improper clock resource handling during device cleanup.
Is CVE-2021-47372 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog and no public exploits are available. However, it can cause kernel crashes and system instability on affected systems.
What versions of Kernel are affected by CVE-2021-47372?
Linux kernel versions 5.11 through 5.14.8 are affected. The vulnerability is fixed in kernel version 5.14.9 and later.
How do I check if my server is vulnerable to CVE-2021-47372?
Run 'uname -r' to check your kernel version. If it is 5.11 or later but earlier than 5.14.9, your system is vulnerable. Additionally, confirm the macb driver is present with 'lsmod | grep macb'.
Does Defensia detect CVE-2021-47372?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47372 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1da750d1e2140ef43d64d17f301ff6f41b45541e
- https://git.kernel.org/stable/c/46670fb832ee80943715df618632ca13c2e96f2b
- https://git.kernel.org/stable/c/4ad6f2d23b0f6ac0d3e5f3102a4256d1c86c90f5
- https://git.kernel.org/stable/c/7721221e87d25c9840d9ca6b986dbdc410d5ce2b
- https://git.kernel.org/stable/c/a7d521cc726f30b8e679a6f36d04b18a8ab3c536
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47372. Free for 1 server.
Get started free