USB2Shell: a rigged USB stick can give root on Linux — but the fix has been out since September
Drivesec showed on 30 November how a rigged USB device can run commands as root on unpatched Linux machines. The flaw, CVE-2026-98232, was fixed in September, so only systems that skipped updates are exposed.

Affects
- Linux
Tracked as
CVE-2026-98232Linux kernel 6.5 and later
A USB stick you never open, never mount and never click on can still take over a Linux machine — if that machine has not been updated since September. Italian security firm Drivesec published its write-up of the attack, which it calls USB2Shell, on 30 November, with a working demonstration against a stock Debian system.
The important context comes first: the underlying flaw, CVE-2026-98232, was fixed in the Linux kernel on 9 September 2026 and published as a CVE record on 6 October. Machines that take their regular kernel updates are already protected. The new disclosure matters because it shows, in public and in detail, what an unpatched machine is exposed to — and because plenty of equipment with reachable USB ports is rarely updated at all.
How plugging in a stick becomes root
The bug sits in the kernel’s SCSI core, in a function called scsi_cdl_enable() that switches on a storage feature named Command Duration Limits. Support for that feature arrived in Linux 6.5, and every release from 6.5 onward carries the flaw until the fix is applied.
When a USB storage device is plugged in, the kernel scans it automatically — before anyone logs in, before any drive is mounted, before any user does anything. The kernel asks the device for a mode page, a small block of data describing the drive, and copies it into a 64-byte buffer on the kernel stack. The problem is that it trusts the length values the device itself reports, without checking them against the size of that buffer.
A rigged device can lie about those lengths. The lie lets it read up to 64 bytes of kernel stack memory back, and change a single byte of it at an offset it chooses. On its own that sounds small. Drivesec turned it into much more: the leaked memory defeats KASLR, the randomisation that hides where kernel code sits, and the one-byte change becomes a stepping stone to writing anywhere in kernel memory. The researchers built fake kernel data structures, and when the device is unplugged, the kernel runs a command the device supplied — as root.
The attack is probabilistic: it does not work every time. But a failed attempt does not crash the machine, so the attacker can simply try again. Drivesec’s own site carries the 54-second demonstration: the first two attempts miss, and the third runs whoami and uname as root on a Debian machine running kernel 6.12.22, with KASLR switched on, using a small programmable USB board called a Cynthion.
Who is actually at risk
Three conditions must line up: the machine runs an unpatched kernel from Linux 6.5 onward, USB mass storage drivers are present, and a stranger can physically reach a port. A locked screen, a logged-out session, or a rule against mounting unknown drives does not stop it, because the flaw fires during the automatic scan, before any of those protections apply.
That combination points at equipment rather than laptops. Drivesec names the places where strangers can reach a USB port: self-service kiosks, payment terminals, car infotainment units, EV chargers, in-flight entertainment systems, industrial control panels and smart-home hubs. None of these has actually been attacked this way — they are illustrations of where a reachable port matters, not products known to be affected. No attacks using the flaw have been found anywhere, and no victims have been identified.
Android phones are less exposed. Their kernels from 6.6 onward carry the same flaw and still leak some kernel memory to a rigged device, but the two builds Drivesec tested — Google’s generic kernel and the one shipping on a Samsung Galaxy A16 — both have a compiler safeguard that stops the overwrite, so on Android the bug stays a leak and cannot reach root.
From discovery to disclosure
26 Aug 2026
Drivesec finds the bug
The research team spots the unchecked length values in scsi_cdl_enable().
2 Sep 2026
Reported privately
Drivesec reports the issue to the SCSI maintainers, then sends a patch.
9 Sep 2026
Fix committed
Upstream commit 3d676e458fe0 lands; fixed kernels follow: 6.6.158, 6.12.112, 6.18.54, 7.2.8 and 7.3.
6 Oct 2026
CVE published
CVE-2026-98232 is published by the Linux CNA.
30 Nov 2026
Public write-up
Drivesec publishes the full write-up and the working demonstration.
One footnote to the timeline: the bug was first flagged on the kernel mailing list not by a person but by Sashiko, an AI code-review system Google built for the Linux kernel. Drivesec says it found the same flaw independently, wrote the fix itself and built the exploit — the AI did not write the attack.
What to do
Close the hole
Update the kernel
Install a kernel that includes the fix — 6.6.158, 6.12.112, 6.18.54, 7.2.8, 7.3 or later — or backport the upstream fix. Check your distribution rather than the upstream number: distributions backport fixes without changing version numbers, so Debian’s standard version 12 kernel never contained the flawed code, while Red Hat shipped the fix in a kernel it numbers 5.14.
Block USB storage where it is not needed
On machines that never need to read a USB drive, stop the usb-storage and uas drivers from loading. That removes the attack surface entirely.
Allow-list devices on exposed ports
Where USB ports must stay open to strangers — kiosks, payment terminals, chargers — require devices to be approved before the kernel loads a driver for them, using USBGuard or the authorized_default=0 setting.
Do not plug in unknown USB devices
The oldest advice still applies. A found USB stick is not a free drive; it is an unknown device talking to privileged kernel code the moment it is plugged in.
Drivesec offers a checker script for individual systems, but the script cannot see fixes a vendor has backported, so its verdict is a hint rather than proof. If it flags a kernel, check the vendor’s advisory for CVE-2026-98232 or look for the fix commit in the source tree:
curl -fsSLO https://usb2shell.com/tools/usb2shell-check.sh
less usb2shell-check.sh
sh usb2shell-check.sh
Read the script before running it, as the researchers themselves advise. And the broader lesson is the familiar one: the machines most exposed to this flaw are the ones nobody thinks of as computers — and the ones nobody updates.
Sources
- usb2shell: Root on Linux from a USB Plug-In (CVE-2026-98232)Drivesec
- USB2Shell Linux Kernel Flaw Lets Malicious USB Devices Gain Root Access Without LoginThe Hacker News
- CVE-2026-98232CVE Program


