Title: USB2Shell — A Crafted USB Device Roots an Unattended Linux Machine During the Kernel’s Own Device Scan
Summary:
Drivesec researchers Z3r0n37 and Alberto247 published USB2Shell on November 30, 2026: a working exploit chain for CVE-2026-98232 in which a malicious USB storage device makes the Linux kernel run an attacker-chosen command as root — no login, no mounting, no click, because the bug fires inside the kernel’s automatic scan of a newly connected device. The flaw sits in scsi_cdl_enable(), the function that switches on Command Duration Limits, a storage feature added in Linux 6.5: when a device identifies as an ATA disk advertising CDL support, the function reads a mode page into a 64-byte stack buffer using length values the device itself reported, without checking them against the buffer size — an unsigned subtraction can wrap and point the write pointer past the buffer. Per the kernel’s own CVE announcement, a hostile device can read up to 64 bytes of kernel stack back through the outgoing MODE SELECT payload and clear the low two bits of a stack byte at an offset it picks. Drivesec turned that one-byte change into a controlled kernel write: the leak defeats KASLR, fake kernel structures do the rest, and when the device is unplugged the kernel runs its command as root. The exploit is probabilistic but attempts that fail leave the system intact, so the process can simply be repeated — on their test rig, a Cynthion USB tool against a stock Debian 6.12.22+bpo-amd64 kernel with KASLR on, the third attempt executed whoami and uname as root. A system is exposed when it runs Linux 6.5 or later without the fix, has the kernel’s USB mass-storage drivers (usb-storage or uas) present, whether compiled into the image or pulled in on demand, and has a USB port a stranger can reach — the practical worry is kiosks, payment terminals, car infotainment, EV chargers and smart-home hubs. Fixed kernels: 6.6.158, 6.12.112, 6.18.54, 7.2.8 and mainline 7.3, via upstream commit 3d676e458fe0 (“scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()”), committed September 9 after Drivesec’s private report on September 2; the Linux CNA published CVE-2026-98232 on October 6. Distro mapping matters: Debian’s tracker marks bookworm’s standard 6.1 kernel as not affected (vulnerable code not present) while trixie was fixed in 6.12.113-1 (DSA-6568-1), and Red Hat shipped the backport in a kernel it numbers 5.14 — check your vendor advisory rather than the upstream version. If you cannot update, stop usb-storage and uas from loading where mass storage is not needed, or gate ports with USB allow-listing (USBGuard or authorized_default=0); Drivesec’s checker script can help but can miss backported fixes. Two caveats worth knowing: on the discovery side, the Sashiko AI code-review system used by Google got there first, flagging the bug on linux-scsi, while Drivesec’s team — working from its own research, independently of that report — is credited with both the upstream fix and the exploit chain; and on Android (kernels 6.6+) the bug is a memory leak only, since the tested builds — Google’s generic kernel and a Samsung Galaxy A16 — carry compiler bounds checks that block the write step. No real-world attacks have been observed, the flaw is not in CISA’s KEV catalog as of publication, and physical access to every target limits scale — but the fix has been sitting in kernels since September, so an unpatched 6.5+ box with an open USB port is the exposure to close.
References:
- USB2Shell — Drivesec research write-up for CVE-2026-98232
- Linux kernel CVE announcement: CVE-2026-98232 — scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()
- Debian Security Tracker: CVE-2026-98232
- The Hacker News: USB2Shell Linux Kernel Flaw Lets Malicious USB Devices Gain Root Access Without Login