CVE-2021-47368
📋 TL;DR
This CVE describes a use-after-free vulnerability in the Linux kernel's ENETC driver where temporary stack memory is incorrectly referenced for IRQ affinity hints. When reading from /proc/irq/*/affinity_hint, the system can crash with a kernel oops. This affects systems using Linux kernels with the ENETC Ethernet controller driver.
💻 Affected Systems
- Linux kernel
📦 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 →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
Kernel panic leading to system crash and denial of service, potentially causing data loss or service disruption.
Likely Case
System crash or kernel oops when reading from /proc/irq/*/affinity_hint, resulting in denial of service.
If Mitigated
No impact if the vulnerability is patched or the affected driver is not loaded.
🎯 Exploit Status
Exploitation requires local access to read /proc/irq/*/affinity_hint files. No privilege escalation or remote code execution.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in kernel commits: 4c4c3052911b, 6c3f1b741c6c, 6f329d9da2a5, 7237a494decfa
Vendor Advisory: https://git.kernel.org/stable/c/4c4c3052911b577920353a7646e4883d5da40c28
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix commits. 2. For distributions: Use package manager (apt/yum/dnf) to install latest kernel updates. 3. Reboot system to load patched kernel.
🔧 Temporary Workarounds
Disable ENETC driver
linuxPrevent loading of the vulnerable enetc driver module
echo 'blacklist enetc' >> /etc/modprobe.d/blacklist-enetc.conf
update-initramfs -u
reboot
Restrict procfs access
linuxLimit access to /proc/irq/*/affinity_hint files to prevent triggering
chmod 600 /proc/irq/*/affinity_hint
🧯 If You Can't Patch
- Ensure only trusted users have local shell access to systems
- Monitor system logs for kernel oops or crashes related to ENETC driver
🔍 How to Verify
Check if Vulnerable:
Check if enetc driver is loaded: lsmod | grep enetc. If loaded, check kernel version against patched versions.
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes fix commits: grep -q '4c4c3052911b\|6c3f1b741c6c\|6f329d9da2a5\|7237a494decfa' /proc/version_signature
📡 Detection & Monitoring
Log Indicators:
- Kernel oops messages in /var/log/kern.log or dmesg
- System crashes or reboots
Network Indicators:
- None - local vulnerability only
SIEM Query:
source="kern.log" AND "Oops" AND "enetc"
🔗 References
- https://git.kernel.org/stable/c/4c4c3052911b577920353a7646e4883d5da40c28
- https://git.kernel.org/stable/c/6c3f1b741c6c2914ea120e3a5790d3e900152f7b
- https://git.kernel.org/stable/c/6f329d9da2a5ae032fcde800a99b118124ed5270
- https://git.kernel.org/stable/c/7237a494decfa17d0b9d0076e6cee3235719de90
- https://git.kernel.org/stable/c/4c4c3052911b577920353a7646e4883d5da40c28
- https://git.kernel.org/stable/c/6c3f1b741c6c2914ea120e3a5790d3e900152f7b
- https://git.kernel.org/stable/c/6f329d9da2a5ae032fcde800a99b118124ed5270
- https://git.kernel.org/stable/c/7237a494decfa17d0b9d0076e6cee3235719de90