CVE-2021-47204
📋 TL;DR
This CVE describes a use-after-free vulnerability in the Linux kernel's dpaa2-eth network driver. When removing the driver, the code accesses a network device structure after it has been freed, potentially allowing local attackers to crash the system or execute arbitrary code. This affects systems using the dpaa2-eth driver, typically found on NXP DPAA2-based systems.
💻 Affected Systems
- Linux kernel with dpaa2-eth driver
📦 What is this software?
Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →⚠️ Risk & Real-World Impact
Worst Case
Local privilege escalation leading to kernel compromise, system crash, or arbitrary code execution with kernel privileges.
Likely Case
Kernel panic or system crash when the driver is removed, causing denial of service.
If Mitigated
No impact if the driver is not being removed or if proper access controls prevent local users from unloading kernel modules.
🎯 Exploit Status
Exploitation requires local access and ability to trigger driver removal. The vulnerability is in driver cleanup code, making reliable exploitation challenging but possible for skilled attackers.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in kernel commits: 1c4099dc0d6a01e76e4f7dd98e4b3e0d55d80ad9, 32d4686224744819ddcae58b666c21d2a4ef4c88, 9b5a333272a48c2f8b30add7a874e46e8b26129c, d74ff10ed2d93dc9b67e99a74b36fb9a83273d8a
Vendor Advisory: https://git.kernel.org/stable/c/1c4099dc0d6a01e76e4f7dd98e4b3e0d55d80ad9
Restart Required: Yes
Instructions:
1. Update to a kernel version containing the fix commits. 2. Check your distribution's security advisories for patched kernel packages. 3. Reboot the system after kernel update.
🔧 Temporary Workarounds
Restrict module unloading
linuxPrevent unauthorized users from unloading kernel modules to block exploitation
echo 1 > /proc/sys/kernel/modules_disabled
chmod 600 /proc/sys/kernel/modules_disabled
Disable dpaa2-eth driver
linuxIf not needed, blacklist the vulnerable driver module
echo 'blacklist fsl_dpaa2_eth' > /etc/modprobe.d/blacklist-dpaa2.conf
update-initramfs -u
🧯 If You Can't Patch
- Restrict local user access to systems using dpaa2-eth hardware
- Implement strict privilege separation to prevent users from unloading kernel modules
🔍 How to Verify
Check if Vulnerable:
Check if dpaa2-eth driver is loaded: lsmod | grep dpaa2_eth && check kernel version against patched versions
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes fix commits: git log --oneline | grep -E '1c4099dc0d6a|32d468622474|9b5a333272a4|d74ff10ed2d9'
📡 Detection & Monitoring
Log Indicators:
- Kernel oops or panic messages related to dpaa2_eth_remove
- System crashes during driver removal operations
Network Indicators:
- None - this is a local kernel vulnerability
SIEM Query:
source="kernel" AND ("dpaa2_eth" OR "use-after-free" OR "general protection fault")
🔗 References
- https://git.kernel.org/stable/c/1c4099dc0d6a01e76e4f7dd98e4b3e0d55d80ad9
- https://git.kernel.org/stable/c/32d4686224744819ddcae58b666c21d2a4ef4c88
- https://git.kernel.org/stable/c/9b5a333272a48c2f8b30add7a874e46e8b26129c
- https://git.kernel.org/stable/c/d74ff10ed2d93dc9b67e99a74b36fb9a83273d8a
- https://git.kernel.org/stable/c/1c4099dc0d6a01e76e4f7dd98e4b3e0d55d80ad9
- https://git.kernel.org/stable/c/32d4686224744819ddcae58b666c21d2a4ef4c88
- https://git.kernel.org/stable/c/9b5a333272a48c2f8b30add7a874e46e8b26129c
- https://git.kernel.org/stable/c/d74ff10ed2d93dc9b67e99a74b36fb9a83273d8a