VYPR
researchPublished Dec 1, 2026· 2 sources

USB2Shell Flaw Grants Root Access on Linux Systems via Malicious USB Devices

A critical vulnerability in the Linux kernel, dubbed USB2Shell, allows a malicious USB device to execute commands as root without user interaction or login.

A critical flaw discovered in the Linux kernel, named USB2Shell, enables attackers to gain root access on unpatched systems simply by plugging in a specially crafted USB storage device. This vulnerability exploits the kernel's automatic scanning process that occurs immediately upon device connection, even before a user logs in or the system applies security measures like screen locking.

The vulnerability resides within the kernel's SCSI core, specifically in a function responsible for enabling a feature called Command Duration Limits. When a USB device masquerades as an ATA disk supporting this feature, the kernel copies information from the device into a buffer on its stack. Crucially, the kernel does not validate the size of this information against the buffer's capacity, allowing a malicious device to provide oversized values.

This oversight permits an attacker to read up to 64 bytes of kernel stack memory and, more significantly, alter a single byte within it. Researchers from Drivesec demonstrated that this single-byte modification could be escalated to achieve arbitrary write capabilities within kernel memory. By defeating kernel address space layout randomization (KASLR) and constructing fake kernel data structures, they were able to execute arbitrary commands with root privileges as soon as the malicious USB device was unplugged.

The USB2Shell flaw was introduced in Linux kernel version 6.5 and affects all subsequent releases until the patch is applied. Exploitation requires physical access to a USB port on a target machine that has USB mass storage support enabled via the usb-storage or uas drivers. The attack is particularly concerning for devices like self-service kiosks, payment terminals, car infotainment units, and smart-home hubs where physical access to USB ports might be less restricted.

While the researchers successfully demonstrated the exploit on a Debian machine running kernel 6.12.22 with KASLR enabled, they noted that the exploit is probabilistic and does not trigger a crash on failed attempts, allowing for repeated tries. The vulnerability was patched in the Linux kernel in September and publicly disclosed as CVE-2026-98232 in October. However, systems remain vulnerable if they have not incorporated this fix.

Mitigation strategies include updating the Linux kernel to a version that includes the fix. For systems that cannot be immediately updated, administrators can prevent the usb-storage and uas drivers from loading on machines that do not require USB storage access. Additionally, implementing USB allow-listing solutions like USBGuard or configuring authorized_default=0 can restrict which devices are permitted to load drivers.

Interestingly, the vulnerability was initially flagged by Sashiko, an AI code-review system developed by Google for the Linux kernel. While Sashiko identified the flaw, Drivesec independently discovered it, developed the fix, and created the working exploit. On Android systems, a similar memory leak was found, but a compiler check in newer kernels prevents the memory-altering aspect of the exploit.

As of the report's publication, no real-world attacks utilizing the USB2Shell vulnerability have been detected, nor have any victims been identified. The vulnerability has not yet been added to the U.S. government's Known Exploited Vulnerabilities (KEV) catalog, likely due to the requirement for physical access and the availability of a patch since September.

This new report details the specific kernel versions affected, noting that the vulnerability is present in Linux kernel versions 6.5 and later. It also provides a list of patched releases, including 6.6.158, 6.12.112, 6.18.54, 7.2.8, and mainline 7.3, and clarifies that the fix was committed upstream on September 9, 2026. The article further explains that while the out-of-bounds write might be prevented by compiler bounds checks in some Android builds, the memory leak component remains a concern.

Synthesized by Vypr AI
USB2Shell Flaw Grants Root Access on Linux Systems via Malicious USB Devices · VYPR