VMTech
Discuss a project →

USB2Shell flaw gives malicious USB devices a route to Linux root

USB2Shell flaw gives malicious USB devices a route to Linux root

Security researchers at Drivesec have demonstrated USB2Shell, tracked as CVE-2026-98232, a Linux kernel vulnerability that can let a crafted USB storage device execute an attacker-chosen command as root. The attack occurs during the automatic storage-device scan triggered when the device is connected, before a user signs in, mounts media, or interacts with the system.

The flaw was fixed upstream in September and assigned its CVE in October. It affects upstream Linux releases from 6.5 onward until the fix is applied. Exposure also requires USB mass-storage support through the usb-storage or uas driver and a USB port an attacker can physically reach.

Automatic scanning reaches privileged kernel code

USB2Shell is located in the kernel SCSI core, in code that enables the Command Duration Limits storage feature. When a USB device presents itself as an ATA disk supporting that feature, the kernel copies device-provided information into a small stack buffer. The length values come from the device and are not checked against the buffer size.

That ordering is important: the kernel communicates with the device in privileged code as soon as it is connected. A locked display, a logged-out session, or a policy against mounting unknown drives does not prevent this parsing stage. The kernel advisory states that a malicious device can read up to 64 bytes of kernel stack memory and modify one byte.

In Drivesec's test environment, researchers converted that one-byte modification into an arbitrary kernel-memory write. They bypassed KASLR, created forged kernel data structures, and caused the chosen command to run as root when the USB device was unplugged. The team tested against Debian with kernel 6.12.22, KASLR enabled, and a Cynthion programmable USB device.

Risk depends on patch status and physical access

The researchers describe the exploit as probabilistic and did not publish a success rate. They also say failed attempts do not crash the machine, so an attacker can retry. No exploitation in the wild, victims, or compromised products have been identified, and the vulnerability was not in the U.S. Known Exploited Vulnerabilities catalog at publication.

Distribution version labels are not a reliable shortcut for assessment because vendors can backport features and fixes. Debian's standard version 12 kernel did not include the vulnerable code, while Red Hat delivered a fix in a kernel numbered 5.14. The kernel-risk pattern resembles low-level flaw paths to root control where a low-level flaw can create a path from a constrained environment to root-level control.

Patch first, then reduce USB exposure

Organizations should install a vendor kernel containing the fix or backport the upstream correction where that is the established maintenance approach. Drivesec's checking script can be useful for initial triage, but it may miss fixes that a distribution has backported and should not be treated as proof of exposure.

Where immediate patching is not possible, systems that do not need USB storage can prevent the usb-storage and uas drivers from loading. USB allow-listing, including USBGuard or the authorized_default=0 setting, can require approval before the kernel loads a device driver. The practical business priority is to identify reachable USB ports on kiosks, payment terminals, vehicle systems, EV chargers, and smart-home hubs, then verify vendor patches and restrict storage-device access until remediation is complete.

#linuxsecurity#usbsecurity#kernel#vulnerability
Open analytics
On the site 3 views
min read 4 01.12.2026
Instagram

USB2Shell flaw gives malicious USB devices a route to Linux root

Open the post on Instagram ↗