Why "usb2shell"?#
This twelvemonth brought a motion of "2shell" and "4shell" bugs, among them PHP2Shell, Java4Shell, wp2shell and KindaRails2Shell. Those are distant bugs in extensively deployed software. usb2shell is the bodily version: alternatively of a crafted request, the attacker plugs in a crafted USB device.
Plenty of Linux systems have USB ports that strangers can reach: car infotainment and telematics units, EV chargers, point-of-sale terminals, kiosks, in-flight entertainment, manufacturing HMIs and smart-home hubs.
Who is affected#
A scheme is exposed whenever all of these are true:
- it runs Linux 6.5 or afterward without the fix;
- it has USB bulk retention assistance (usb-storage or uas), built in or loaded automatically;
- someone can plug a equipment into one of its USB ports.
No person communication or mount is needed, the bug fires during the automatic equipment scan.
| Stable branch | First fixed release |
|---|---|
| 6.6.y | 6.6.158 |
| 6.12.y | 6.12.112 |
| 6.18.y | 6.18.54 |
| 7.2.y | 7.2.8 |
| mainline | 7.3 |
On Android the bug is a leak only. Android kernels on 6.6 and afterward are affected and the equipment motionless gets kernel stack contents back, but the builds we checked (Android GKI, and the Samsung Galaxy A16 shipping kernel) use compiler limits checks that keep the compose inner the buffer.
How to inspect your devices#
Download the checker, peruse it, and run it:
curl -fsSLO https://usb2shell.com/tools/usb2shell-check.sh less usb2shell-check.sh sh usb2shell-check.sh
Distributions and equipment vendors frequently backport fixes without changing the type number. If the checker flags your kernel, inspect your vendor's advisory for CVE-2026-98232 or appearance for the fix commit in your origin tree.
How to fix it#
Update to a fixed kernel, or backport the upstream commit 3d676e458fe0 ("scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()") to your vendor kernel.
If you can't update yet, these decrease exposure:
| Mitigation | Effect |
|---|---|
| Don't build or auto-load usb-storage/uas anywhere bulk retention isn't needed | Removes the assault surface |
| USB allow-listing (USBGuard, authorized_default=0) | Stop scanning unauthorized devices |
The bug#
Command Duration Limits (CDL) assistance was added in Linux 6.5. When the kernel scans a new SCSI equipment that says it is an ATA equipment alongside CDL support, it calls scsi_cdl_enable(). That function says a manner leaf from the equipment into a 64-byte stack buffer and writes it back.
The lengths in the device's answer were used without checks:
len = min_t(size_t, sizeof(buf), data.length - data.header_length - data.block_descriptor_length); /* can cover -> 64 */ buf_data = buf + data.header_length + data.block_descriptor_length; /* can item former buf */
So a equipment can create the kernel dispatch it up to 64 bytes of kernel stack, and apparent one stack byte at an offset it picks. All of this happens during the automatic scan, before userspace sees any disk.
Proof of concept#
The PoC we built runs on a Cynthion USB equipment plugged into a PC alongside a inventory Debian 6.12.22+bpo-amd64 kernel.
The leak allows us to interrupt KASLR and the sequence builds counterfeit kernel structures to rotate the one-byte overwrite into a controlled write. When the equipment is unplugged, the kernel runs a command supplied by the device, as root. While the utilize is probabilistic, no collision is triggered on unsuccessful executions.
Timeline#
| Date | Event |
|---|---|
| 2026-08-26 | Drivesec's investigation squad finds the bug |
| 2026-08-28 | Root command implementation on bodily hardware |
| 2026-09-02 | Drivesec reports the matter privately to the scsi maintainers |
| 2026-09-04 | Drivesec sends the place to linux-scsi |
| 2026-09-09 | Fix committed (3d676e458fe0) |
| 2026-09-25 | CVE-2026-98232 reserved |
| 2026-10-06 | CVE-2026-98232 published by the Linux CNA |
| 2026-11-30 | Publication |
Credits#
While Sashiko AI Review archetypal reported the bug on linux-scsi, Drivesec's investigation squad established it independently, wrote the fix and built the utilize chain.
![]()
Our day job: intrusion evaluation at Drivesec.
Drivesec is an Italian innovation business specializing in the cybersecurity of connected products and IoT/OT systems. Born from cognition in the automotive and manufacturing sectors, it helps manufacturers build safety into the complete merchandise lifecycle, combining specialized expertise, evaluation and regulatory compliance.
Drivesec is committed to uninterrupted funding in know-how, additionally developed through key collaborations alongside universities and foremost investigation institutes.
Discover moreReferences#
- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-98232
- Upstream fix: 3d676e458fe0
- Stable backports: 39491a1ae930, 60b0b8ce803e, 6233d0b3ef46, 99a6e4a9176d
- Patch: https://patch.msgid.link/[email protected]
- linux-scsi report: https://lore.kernel.org/linux-scsi/[email protected]/
- Checker: usb2shell-check.sh