Ethical Hacking News
A critical flaw in the Linux kernel allows malicious USB devices to gain root access to a system without the need for a login or mounting of a drive. The flaw, known as USB2Shell, has been fixed in the kernel, but systems that have not been updated are still exposed. Learn more about the vulnerability and how to mitigate it in our latest article.
The Linux kernel has a critical flaw known as USB2Shell, which allows malicious USB devices to gain root access without a login or mounting. The vulnerability arises from a flaw in the Linux kernel's SCSI core and was introduced in Linux 6.5. The exploit can read up to 64 bytes of kernel stack memory and write to any location in kernel memory, allowing the attacker to defeat KASLR and gain root access. Systems are exposed if they have USB mass storage support and a USB port that can be reached. The researchers recommend updating to a kernel with the fix, backporting the upstream fix, or stopping the usb-storage and uas drivers from loading. No attacks using the flaw have been found, but the researchers note that devices with open ports are a practical concern.
The Linux kernel has been found to be vulnerable to a critical flaw known as USB2Shell, which allows malicious USB devices to gain root access to a system without the need for a login or mounting of a drive. This flaw, identified as CVE-2026-98232, was discovered by researchers at Drivesec and was fixed in the kernel in September 2026. However, systems that have not been updated with the fix are still exposed to this vulnerability.
The vulnerability arises from a flaw in the Linux kernel's SCSI core, specifically in a function that enables a storage feature called Command Duration Limits. When a USB device claims to be an ATA disk that supports this feature, the kernel copies information from the device into a small buffer on its stack. The kernel uses the length values provided by the device and does not check them against the buffer size. This means that a malicious device can read up to 64 bytes of kernel stack memory and change a single byte of it, according to the kernel advisory.
On the test machine used by the researchers, they turned this single-byte change into the ability to write to any location in kernel memory. They defeated KASLR, which randomizes the location of kernel code, built fake kernel data structures, and made the device's chosen command run as root the moment it was unplugged. The researchers were able to achieve this by exploiting the flaw in the kernel's SCSI core.
The flaw was introduced in Linux 6.5 and is present in every release from 6.5 onward until the fix is applied. A system is only exposed if it has USB mass storage support, via the usb-storage or uas driver, and a USB port that someone can reach. The researchers tested their exploit against a Debian machine running kernel 6.12.22, with KASLR switched on, using a Cynthion, a small programmable USB tool.
The researchers also note that while the exploit is probabilistic, no crash is triggered on failed executions, and the attacker can try again. This means that a failed attempt does not crash the machine, and the attacker can continue to try again.
In terms of mitigation, the researchers recommend that systems update to a kernel that includes the fix or backport the upstream fix commit. If this is not possible, systems can stop the usb-storage and uas drivers from loading on machines that do not need to read USB storage. Alternatively, devices can be required to be approved before the kernel loads a driver for them, using USB allow-listing such as USBGuard or the authorized_default=0 setting.
It is worth noting that the bug was first flagged by Sashiko, an AI code-review system built by Google for the Linux kernel and given to the Linux Foundation. Sashiko reported the bug on the kernel mailing list, and Drivesec found the same flaw on its own, wrote the fix, and built the working exploit. However, Google cautions that it is "too early to make strong claims" about how much credit the tool deserves.
In terms of real-world implications, the researchers note that no attacks using the flaw have been found, and no victims have been identified. The flaw has not been added to the U.S. government's Known Exploited Vulnerabilities catalog as of publication. However, the researchers do point to equipment where strangers can reach a USB port as the practical concern, such as self-service kiosks, payment terminals, car infotainment units, EV chargers, and smart-home hubs. None of these have been shown to be compromised, but the researchers note that an open port matters, not a list of affected products.
In conclusion, the USB2Shell flaw is a critical vulnerability in the Linux kernel that allows malicious USB devices to gain root access to a system without the need for a login or mounting of a drive. The flaw was discovered by researchers at Drivesec and was fixed in the kernel in September 2026. However, systems that have not been updated with the fix are still exposed to this vulnerability.
Related Information:
https://www.ethicalhackingnews.com/articles/Unveiling-the-USB2Shell-Flaw-A-Critical-Vulnerability-in-Linux-Kernel-Scans-ehn.shtml
https://thehackernews.com/2026/12/usb2shell-linux-kernel-flaw-lets.html
Published: Tue Dec 1 04:04:54 2026 by llama3.2 3B Q4_K_M