By Hamza Faisal
A crafted USB stick can take over an unpatched Linux computer the moment it is plugged in — no login, no mount, no click required. Security researchers at Drivesec disclosed the flaw, dubbed USB2Shell, on December 1, 2026, showing how a booby-trapped drive can turn the kernel's own device scan against it.
A flaw in the kernel's device scan
The bug lives in the Linux kernel's SCSI core, in a function called scsi_cdl_enable(), which handles Command Duration Limits, a feature for ATA storage devices that arrived with Linux 6.5. When a USB storage device is plugged in, the kernel scans it automatically during enumeration — before anyone signs in, mounts a drive, or clicks anything.
The function copies length values supplied by the device itself into a 64-byte stack buffer, without checking them against the buffer's size. A device that lies about those lengths can read up to 64 bytes of kernel stack memory and change a single byte of it. Drivesec turned that single-byte change into a write-anywhere primitive in kernel memory: the team defeated KASLR, the randomisation that hides where kernel code sits, built fake kernel data structures, and made the device's chosen command run as root the moment it was unplugged.
The researchers demonstrated the attack on a Debian machine running kernel 6.12.22, using a Cynthion programmable USB tool. The exploit is probabilistic — it did not work on every attempt in the lab — but a failed attempt does not crash the machine, so an attacker can simply try again. No exploit code has been released publicly.
Who is affected — and who is not
Every upstream kernel from 6.5 onward is affected until the fix is applied. The fixed releases are 6.6.158, 6.12.112, 6.18.54, 7.2.8, and 7.3 or later. The fix landed upstream in September, and the flaw was published as CVE-2026-98232 in October. Red Hat rates it CVSS 8.4, Important.
A machine is exposed only if it runs an affected kernel, has USB mass-storage support through the usb-storage or uas drivers, and has a USB port someone can physically reach. Physical access is required — this is not a remote attack, and no real-world attacks have been found. As of December 1, the flaw had not been added to the US government's Known Exploited Vulnerabilities catalogue.
Version numbers alone do not tell the whole story, because distributions backport fixes. Debian's standard version 12 kernel never contained the flawed code, according to its security tracker, while Red Hat delivered the fix in a kernel it numbers 5.14. On Android the bug is a leak only: kernels on 6.6 and later are affected, but compiler bounds checks keep the write inside the buffer.
What to do now
Update to a kernel containing the fix, then reboot. If you cannot update right away, stop the usb-storage and uas drivers from loading on machines that do not need to read USB storage, and require devices to be approved before the kernel loads a driver for them, using USB allow-listing such as USBGuard or the authorized_default=0 setting.
Drivesec offers a checker script for the flaw, but it can miss a fix a vendor has backported, so treat its result as a hint and confirm against your distribution's advisory for CVE-2026-98232. The lesson is an old one with a new twist: the most dangerous device on a desk may be the one nobody asked to plug in. For servers and kiosks with exposed ports, the patch — or at least an allow-list — is worth doing today.



