Linux kernel vulnerability usb2shell (CVE-2026-98232): root from one USB plug-in
A USB device that claims to be storage can make Linux 6.5+ read past a 64-byte stack buffer while it scans the new disk: it leaks up to 64 bytes of kernel stack and clears two bits of one byte. Researchers turned that into root on a stock Debian kernel with KASLR on. Not BadUSB: no keystrokes, no login, no mount. What happens step by step, which kernels are fixed, how to check yours, and how to lock down USB ports.
On 30 November 2026 the Italian security company Drivesec published usb2shell: a USB device that, once plugged into an unpatched Linux machine, can get a command of its choice run as root. Nobody has to log in, open a file, mount a disk or click anything. The kernel does all the work on its own while it scans the new device.
The bug is CVE-2026-98232, a stack out-of-bounds bug in the kernel’s SCSI code. In Drivesec’s words, the device “can read up to 64 bytes of kernel stack and overwrite one stack byte”. That one byte was enough for them.
We didn’t run anything for this post: no exploit, no checker script, no tests. Everything comes from the CVE record, the fix commit, the kernel source, kernel.org’s stable ChangeLogs, the Debian and Ubuntu trackers, and Drivesec’s write-up. We also leave out how the one-byte write becomes a full exploit. You don’t need that part to defend against it.
One search-result trap first: CVE-2026-98432 (with a 4) is a different kernel bug, a use-after-free in IPv4 TCP. usb2shell is 98232.
Not BadUSB
Most “USB attack” videos are about BadUSB: a stick that pretends to be a keyboard (USB class 03) and types commands into whatever session is open. That attack needs someone logged in, and it works the same on any operating system.
usb2shell is the opposite. The device says it’s storage (class 08) and types nothing. It answers the kernel’s own disk questions with lengths that don’t add up, and the kernel believes them. All of this happens during the automatic scan, “before userspace sees the disk” (Drivesec). There isn’t even a drive icon yet.
One plug-in, step by step
- Plug in. The USB core asks the device what it is. It answers “mass storage”. The vendor and product names in your kernel log are just what the device claims.
- A driver binds.
usb-storageoruasloads automatically.usb-storagewaits one second by default (usb-storage.delay_use, “default 1”) and then starts a SCSI scan. SCSI is the old disk command language that USB sticks still speak. - INQUIRY. The kernel asks what the device is. A malicious one says: a disk, speaking SPC-5 (a recent SCSI version). It also offers VPD page 0x89, “ATA Information”, which makes the kernel treat it as an ATA drive behind a bridge.
- The CDL check. In the v6.12 source,
scsi_add_lun()callsscsi_cdl_check(). For SPC-5 devices that report Command Duration Limits support, it callsscsi_cdl_enable(). CDL is a feature from the ATA (ACS-5) and SCSI (SPC-6) standards that lets the host give a disk a time limit for each command. Linux gained support in 6.5 in 2023. It was built for big hard drives, and a USB gadget only has to claim it. - MODE SENSE.
scsi_cdl_enable()reads the ATA feature control page (0x0A/0xF2) intochar buf[64]on the kernel stack. Then it writes the page back with MODE SELECT.
The bug is in step 5. The old code computed
len = min_t(size_t, sizeof(buf),
data.length - data.header_length - data.block_descriptor_length);
buf_data = buf + data.header_length + data.block_descriptor_length;
All three lengths come from the device. The CVE record explains what happens: “A target can report a total length shorter than its mode header and block descriptors. The unsigned subtraction used for the MODE SELECT length can wrap, and the separately computed buf_data can point beyond buf.” The wrapped length is capped at 64, and the pointer is wherever the device’s lengths put it. During the scan, buf_data[4] = 0 then “can clear the low two bits of a target-selected out-of-bounds stack byte”. scsi_mode_select() “can then copy up to 64 bytes from outside the buffer into the outgoing MODE SELECT payload, disclosing stack contents to the target”.
So the attacker gets two things: a 64-byte leak and a one-byte write.
From one byte to root (high level only)
Drivesec’s proof used a Cynthion USB research board against a stock Debian 6.12.22+bpo-amd64 kernel on a real USB port, with KASLR (the kernel’s address randomisation) on. As they describe it, the leak defeats KASLR and a chain grows the one-byte write into a controlled write. The strangest detail is that the root command runs when the device is unplugged. The exploit is probabilistic, but missed attempts don’t crash the machine. In their demo the first two tries missed and the third ran whoami and uname as root (as reported by Drivesec).
The fix commit also describes a second, lab-only proof: on 7.3-rc1 in a one-vCPU QEMU machine with Raw Gadget, a proof command created a root-owned file during automatic enumeration, “with KASLR and NX enabled”.
Android: Drivesec says Android kernels 6.6 and later still leak the stack. In the builds they checked (Android GKI and a Samsung Galaxy A16 shipping kernel), compiler bounds checks keep the write inside the buffer, so it’s a leak only.
Who found it first? An AI review bot
The fix (by Alberto Carboneri and Pimen Flavian Dei of Drivesec, committed 9 September) carries Reported-by: Sashiko AI Review, plus Assisted-by: LLM. Sashiko is an AI review system that reviews patches on the kernel mailing lists. It’s a Linux Foundation project, and Google funds the compute and tokens. Drivesec’s page says Sashiko “first reported the bug on linux-scsi” and that their team “found it independently, wrote the fix and built the exploit chain”. The commit’s Closes: link points to a linux-scsi message whose ID is dated July 2026, and Drivesec found the bug on 26 August.
| Date (2026) | What happened |
|---|---|
| July (per message ID) | Sashiko AI Review reports it on linux-scsi |
| 26 Aug | Drivesec finds it; root on real hardware 28 Aug |
| 2 Sep / 4 Sep | Private report to SCSI maintainers / patch posted |
| 9 Sep | Fix committed (3d676e458fe0) |
| 25 Sep – 3 Oct | Stable releases 6.18.54, 7.2.8, 6.6.158, 6.12.112 |
| 6 Oct | CVE-2026-98232 published by the Linux CNA |
| 30 Nov | usb2shell.com goes public |
Which kernels are affected
Linux 6.5 and newer before the fix, with USB mass storage support (usb-storage or uas) built in or auto-loaded.
Older is safer this time. Debian 12’s default 6.1 kernel (“Vulnerable code not present”) and Ubuntu 22.04’s 5.15 never had the CDL code. But Debian 12 machines running the 6.12 backports kernel, which is the kernel Drivesec attacked, do need the fix (6.12.113-1~deb12u1, DLA-4850-1).
How to check your machine
uname -r # the kernel you are running right now
Don’t just compare that number with the upstream list. Distros backport fixes into their own version lines. Ubuntu 24.04 is fixed in 6.8.0-149.149, and 6.8 isn’t an upstream stable line at all. Debian 13’s fixed package is 6.12.113-1, not 6.12.112. Look the CVE up for your distro instead:
- Debian: https://security-tracker.debian.org/tracker/CVE-2026-98232
- Ubuntu: https://ubuntu.com/security/CVE-2026-98232
- Others: search your vendor’s advisories for CVE-2026-98232 or commit
3d676e458fe0.
Then reboot. An installed kernel package does nothing until you boot into it, so uname -r must show the fixed version afterwards.
Locking down USB ports
Who should care most? Anything with a USB port that strangers can reach: kiosks, point-of-sale terminals, car head units, EV chargers, shared lab machines. A laptop is only at risk if someone gets a few seconds alone with it.
1. Don’t load storage drivers where you never need USB storage. From modprobe.d(5): blacklist stops automatic loading by device alias, and install … /bin/false also blocks explicit loads. This doesn’t help if the drivers are built into the kernel.
# /etc/modprobe.d/no-usb-storage.conf
blacklist usb-storage
blacklist uas
install usb-storage /bin/false
install uas /bin/false
2. Allow-list devices with USBGuard. From its README and rule language docs:
sudo sh -c 'usbguard generate-policy > /etc/usbguard/rules.conf' # allow what's plugged in now
sudo systemctl start usbguard
usbguard list-devices # new devices show up as "block"
usbguard allow-device -p 7 # 7 = the first number in list-devices
One trap: USBGuard’s docs show allow with-interface equals { 08:*:* } as an example. It allows any device whose only interface is mass storage. That stops a stick with a hidden keyboard, but a usb2shell device is plain mass storage, so on exposed ports allow your own devices by ID and serial instead of by class.
3. No USBGuard? The kernel’s own USB authorization can stop new devices from being used until you approve them. Drivesec lists this as a way “to stop scanning unauthorized devices”:
echo 0 > /sys/bus/usb/devices/usb1/authorized_default # per host controller
# or at boot: usbcore.authorized_default=0 (2 = only internal ports)
Sources
- usb2shell (Drivesec S.r.l., 30 Nov 2026): https://usb2shell.com/
- CVE record (Linux CNA): https://www.cve.org/CVERecord?id=CVE-2026-98232
- Fix: 3d676e458fe0; stable 39491a1ae930 (6.6), 60b0b8ce803e (6.12), 6233d0b3ef46 (6.18), 99a6e4a9176d (7.2)
- kernel.org ChangeLogs: 6.6.158, 6.12.112, 6.18.54, 7.2.8
- Debian tracker, Ubuntu CVE page (links above); LWN on CDL support: https://lwn.net/Articles/921087/
- Sashiko: https://netdev-ai.bots.linux.dev/sashiko/; USBGuard docs; kernel USB authorization docs; modprobe.d(5)
There’s also a video version of this post, which follows the plug-in station by station. If web security is more your thing, the last one in this series was about a card skimmer hiding in WebRTC.