Drivesec researchers disclosed USB2Shell, a Linux kernel flaw that lets a crafted USB storage device run commands as root during the automatic scan at plug-in. The fix shipped in September, so only machines without the update are exposed.
Drivesec researchers showed on Monday that a crafted USB device can make an unpatched Linux machine run an attacker's command as root. The attack needs no login, no mounted drive, and no click. The flaw, which the researchers call USB2Shell, sits in the Linux kernel and triggers during the scan that runs the moment a device is plugged in, before anyone signs in.
The bug is in the kernel's SCSI core, the code that handles storage devices. One function in that code turns on a storage feature called Command Duration Limits. When a USB device claims to be an ATA disk that supports the feature, the kernel copies data from the device into a small buffer on the stack. The copy uses the length values the device supplies and never checks them against the buffer size.
That ordering matters. The kernel performs this work during the automatic scan, so a locked screen, a logged-out session, or a policy that blocks unknown drives does not stop it. The device reaches privileged kernel code before any of those protections take effect.
According to the kernel advisory, a device that lies those lengths can read up to 64 bytes of kernel stack memory and change a single byte of it. Read access alone does little for an attacker. The single-byte write is what makes the bug dangerous.
From one byte to root
On a test machine, the researchers turned that single-byte change into the ability to write to any location in kernel memory. They defeated KASLR, the feature that randomizes where kernel code sits so attackers cannot predict its address. They then built fake kernel data structures and made the device's chosen command run as root the moment the device was unplugged.
The researchers ran the attack against a Debian machine running kernel 6.12.22, with KASLR enabled. They used a Cynthion, a small programmable USB tool, to act as the malicious device. The exploit does not succeed every time, and the team has published no success rate. A failed attempt does not crash the machine, though. An attacker can simply try again.
The flaw entered the kernel with Linux 6.5 and appears in every later release until a fix is applied. A system is exposed only if it has USB mass storage support through the usb-storage or uas driver and a USB port that someone can physically reach.
Upstream, the fix landed in September, and the kernel project published the flaw as CVE-2026-98232 in October. Upstream version numbers do not map neatly onto what Linux distributions ship, because distributions backport both features and fixes into older kernels. Debian's standard version 12 kernel never contained the flawed code, according to the Debian security tracker . Red Hat delivered the fix in a kernel it numbers 5.14. Check your own distribution's advisories instead of relying on the upstream version number.
Update to a kernel that includes the fix, or backport the upstream fix commit to your own kernel build.
If you cannot update right away, reduce the exposure:
Block the usb-storage and uas drivers from loading on machines that do not need to read USB storage.
Require approval before the kernel loads a driver for any new device. Tools such as USBGuard enforce this, and the authorized_default=0 setting achieves a similar result for new devices.
The researchers published a script that checks whether a system is vulnerable. It can miss fixes that a vendor has backported, so treat a clean result as a hint rather than proof.
An AI tool flagged the bug first
Sashiko, an AI code-review system that Google built for the Linux kernel and handed to the Linux Foundation, reported the flaw on the kernel mailing list. Drivesec says it found the same flaw independently, wrote the fix, and built the working exploit. The AI did not write the exploit.
Google says Sashiko has been credited in 528 Linux kernel CVE fixes this year, according to a project retrospective. The company also cautions that it is "too early to make strong claims" how much credit the tool deserves.
Android is mostly safe
On Android, the researchers found a memory leak but not a path to root. Phone kernels based on version 6.6 and newer are affected, and they hand a device some kernel memory. The builds the researchers checked, including Google's generic Android kernel and the kernel on a Samsung Galaxy A16, use a compiler protection that blocks the memory-changing step.
Why the open port matters
No attacks using USB2Shell have been found, and no victims have been identified. The flaw does not appear in the U.S. government's Known Exploited Vulnerabilities catalog as of publication. A physical attack is hard to run across many machines, and the fix has been available since September.
The researchers point to equipment where strangers can reach a USB port as the practical concern. Examples include self-service kiosks, payment terminals, car infotainment units, EV chargers, and smart- hubs. None has been shown to be compromised. These devices illustrate where an open port matters. They do not form a list of affected products.
Source : USB2Shell Linux Kernel Flaw Lets Malicious USB Devices Gain Root Access Without Login , by The Hacker News , The Hacker News , Dec 1, 2026
