CVE-2021-47311·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: net: qcom/emac: fix UAF in emac_remove adpt is netdev private data and it cannot be used after free_netdev() call. Using adpt after free_netdev() can cause UAF bug. Fix it by moving free_netdev() at the end of the function.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.13.5
- Published
- 2024-05-21
Affected versions
From: 5.11
Until: 5.13.5
Fixed in: 5.13.5
How to fix this CVE
Update your Linux kernel to version 5.13.5 or later to resolve a use-after-free vulnerability in the QCOM EMAC network driver that could lead to memory corruption. The fix reorders cleanup operations in the emac_remove() function to prevent accessing freed memory structures. Prioritize this update for systems running kernel versions 5.11 through 5.13.4, particularly those using Qualcomm Ethernet hardware.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r | grep -E '^5\.(11|12|13\.[0-4])'
- Verify QCOM EMAC driver is loaded: lsmod | grep -i emac
- Search kernel logs for UAF-related crashes: dmesg | grep -i 'use.*after.*free\|UAF\|segfault' | grep -i emac
- Confirm kernel update: uname -r and verify version is 5.13.5 or later
FAQ
What is CVE-2021-47311?
This vulnerability is a use-after-free (UAF) bug in the QCOM EMAC Ethernet driver's removal routine, where the driver attempts to access network device private data after the device structure has been freed, potentially causing kernel crashes or memory corruption.
Is CVE-2021-47311 being actively exploited?
No, this CVE is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available. However, the high CVSS score (7.8) indicates local attackers with basic system access could trigger the vulnerability.
What versions of Kernel are affected by CVE-2021-47311?
Linux kernel versions 5.11 through 5.13.4 are vulnerable. The fix was included in kernel 5.13.5 and later stable releases.
How do I check if my server is vulnerable to CVE-2021-47311?
Run: uname -r and check if output matches 5.11.* through 5.13.[0-4]; then run: lsmod | grep emac to confirm the affected driver is present.
Does Defensia detect CVE-2021-47311?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47311 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/11e9d163d631198bb3eb41a677a61b499516c0f7
- https://git.kernel.org/stable/c/2b70ca92847c619d6264c7372ef74fcbfd1e048c
- https://git.kernel.org/stable/c/4d04a42b926e682140776e54188f4a44f1f01a81
- https://git.kernel.org/stable/c/8a225a6e07a57a1538d53637cb3d82bd3e477839
- https://git.kernel.org/stable/c/ad297cd2db8953e2202970e9504cab247b6c7cb4
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47311. Free for 1 server.
Get started free