CVE-2021-47270
📋 TL;DR
A null pointer dereference vulnerability in the Linux kernel's USB gadget subsystem affects multiple USB gadget drivers when 10Gbps USB cabling is used. This can cause kernel panics or system crashes on affected systems. The vulnerability impacts Linux systems using USB gadget functionality, particularly embedded devices, IoT devices, or systems configured as USB peripherals.
💻 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 →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 →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 complete system crash and denial of service, potentially requiring physical intervention to restore functionality.
Likely Case
System crash or instability when specific USB gadget drivers are used with 10Gbps USB connections, resulting in denial of service.
If Mitigated
No impact if USB gadget functionality is disabled or if systems don't use affected USB gadget drivers with 10Gbps cabling.
🎯 Exploit Status
Exploitation requires physical USB access or ability to connect USB devices to the target system. The vulnerability is triggered by specific USB gadget configurations.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel versions containing the fix commits: 10770d2ac0094b053c8897d96d7b2737cd72f7c5, 4b289a0f3033f465b4fd51ba995251a7867a2aa2, 8cd5f45c1b769e3e9e0f4325dd08b6c3749dc7ee, 90c4d05780d47e14a50e11a7f17373104cd47d25, b4903f7fdc484628d0b8022daf86e2439d3ab4db
Vendor Advisory: https://git.kernel.org/stable/c/10770d2ac0094b053c8897d96d7b2737cd72f7c5
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix commits. 2. For distributions: Use package manager to update kernel package. 3. For custom kernels: Apply the relevant kernel patches. 4. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable USB gadget functionality
linuxPrevent exploitation by disabling USB gadget subsystem if not required.
modprobe -r g_ether g_serial g_mass_storage g_audio g_webcam g_midi g_hid g_acm_ms g_cdc g_multi g_nokia g_android g_ffs g_ncm g_phonet g_rndis g_ecm g_eem g_subset g_tcm
Blacklist affected gadget drivers
linuxPrevent loading of vulnerable USB gadget drivers.
echo 'blacklist g_ecm' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist g_eem' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist g_hid' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist g_printer' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist g_rndis' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist g_serial' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist g_sourcesink' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist g_subset' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist g_tcm' >> /etc/modprobe.d/blacklist.conf
update-initramfs -u
🧯 If You Can't Patch
- Disable USB gadget functionality entirely if not required for system operation
- Implement physical security controls to prevent unauthorized USB device connections
🔍 How to Verify
Check if Vulnerable:
Check if USB gadget drivers are loaded: lsmod | grep -E 'g_ecm|g_eem|g_hid|g_printer|g_rndis|g_serial|g_sourcesink|g_subset|g_tcm'
Check Version:
uname -r
Verify Fix Applied:
Check kernel version contains fix commits or verify affected gadget drivers no longer crash with 10Gbps USB connections
📡 Detection & Monitoring
Log Indicators:
- Kernel panic messages in /var/log/kern.log or dmesg
- USB-related crash logs
- System crash/reboot logs
Network Indicators:
- None - this is a local USB-based vulnerability
SIEM Query:
source="kern.log" AND ("kernel panic" OR "Oops" OR "BUG") AND ("usb" OR "gadget")
🔗 References
- https://git.kernel.org/stable/c/10770d2ac0094b053c8897d96d7b2737cd72f7c5
- https://git.kernel.org/stable/c/4b289a0f3033f465b4fd51ba995251a7867a2aa2
- https://git.kernel.org/stable/c/8cd5f45c1b769e3e9e0f4325dd08b6c3749dc7ee
- https://git.kernel.org/stable/c/90c4d05780d47e14a50e11a7f17373104cd47d25
- https://git.kernel.org/stable/c/b4903f7fdc484628d0b8022daf86e2439d3ab4db
- https://git.kernel.org/stable/c/beb1e67a5ca8d69703c776db9000527f44c0c93c
- https://git.kernel.org/stable/c/f17aae7c4009160f0630a91842a281773976a5bc
- https://git.kernel.org/stable/c/10770d2ac0094b053c8897d96d7b2737cd72f7c5
- https://git.kernel.org/stable/c/4b289a0f3033f465b4fd51ba995251a7867a2aa2
- https://git.kernel.org/stable/c/8cd5f45c1b769e3e9e0f4325dd08b6c3749dc7ee
- https://git.kernel.org/stable/c/90c4d05780d47e14a50e11a7f17373104cd47d25
- https://git.kernel.org/stable/c/b4903f7fdc484628d0b8022daf86e2439d3ab4db
- https://git.kernel.org/stable/c/beb1e67a5ca8d69703c776db9000527f44c0c93c
- https://git.kernel.org/stable/c/f17aae7c4009160f0630a91842a281773976a5bc