Back News.Lavx.Hu usb2shell: A malicious USB device can gain root on unpatched Linux systems (CVE-2026-98232)
Drivesec's research team built a proof of concept showing that a crafted USB device can run commands as root on a stock Debian Linux kernel during the automatic device scan. The flaw, CVE-2026-98232, affects Linux 6.5 and later until a fix is installed.
Drivesec's research team has published usb2shell , a proof of concept showing that a crafted USB device can run commands as root on Linux. The attacker needs no login and no mounted disk. The kernel triggers the bug as soon as the device is plugged in and scanned. The flaw is tracked as CVE-2026-98232 .
The name comes from a run of remote bugs this year with names like PHP2Shell, Java4Shell and wp2shell. usb2shell is the physical counterpart. Instead of sending a crafted web request, an attacker plugs in a crafted device. Many devices with USB ports sit in places where strangers can reach them, including car infotainment and telematics units, EV chargers, point-of-sale terminals, kiosks, in-flight entertainment systems, industrial control panels and smart- hubs.
A system is at risk when all three of these conditions hold:
It runs Linux 6.5 or later without the fix.
It includes USB mass storage support, either built in or loaded automatically through usb-storage or uas .
Someone can plug a device into one of its USB ports.
No user action or mount is required. The bug fires during the automatic device scan.
The fixed releases are 6.6.158 for the 6.6 branch, 6.12.112 for 6.12, 6.18.54 for 6.18 and 7.2.8 for 7.2. The fix is in mainline 7.3. Android is different. Devices on kernels 6.6 and later still leak kernel memory, but the builds the team checked, including Android GKI and the Samsung Galaxy A16 kernel, use compiler bounds checks that keep the write inside the buffer.
Distributions and device vendors often backport fixes without changing the version number. A version check alone can therefore give a false result. The team offers a checker script you can read before you run it:
If the script flags your kernel, check your vendor's advisory for CVE-2026-98232 or your source tree for the upstream fix commit, 3d676e458fe0 .
Linux 6.5 added support for Command Duration Limits (CDL), a SCSI feature. When the kernel scans a new SCSI device that identifies itself as an ATA device with CDL support, it calls scsi_cdl_enable() . That function reads a mode page from the device into a 64-byte stack buffer and writes it back.
The code used the lengths in the device's without checking them:
The subtraction can wrap around, which makes the length 64. The computed pointer can also land beyond the end of the buffer. A device that crafts these values can make the kernel send up to 64 bytes of its own stack back to the device. It can also clear a single byte at an offset the device chooses. Both steps happen before userspace sees any disk.
The team's chain runs on a Cynthion USB device plugged into a PC with a stock Debian 6.12.22+bpo-amd64 kernel. The memory leak reveals enough kernel addresses to defeat KASLR. The chain then builds fake kernel structures that turn the single-byte overwrite into a controlled write. When the device is unplugged, the kernel runs a command the device supplies, as root.
The exploit is probabilistic. In the demo, the first two attempts miss and retry without a crash, and the third runs whoami and uname as root. The team reports that failed attempts do not crash the machine. That detail matters for an attacker, who can retry, and for a defender, who may see no obvious sign of an attack.
2026-08-26: Drivesec's research team finds the bug.
2026-08-28: The team achieves root command execution on physical hardware.
2026-09-02: Drivesec reports the issue privately to the SCSI maintainers.
2026-09-04: Drivesec sends the patch to linux-scsi.
2026-09-09: The fix is committed as 3d676e458fe0 .
2026-09-25: CVE-2026-98232 is reserved.
2026-10-06: The Linux CNA publishes CVE-2026-98232.
2026-11-30: Drivesec publishes usb2shell.
Sashiko AI Review first reported the bug on the linux-scsi list, according to the linux-scsi report . Drivesec's team found the bug independently, wrote the fix and built the exploit chain. The patch submission is public.
The fix is to update to a fixed kernel or to backport upstream commit 3d676e458fe0 , "scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()", into a vendor kernel. Stable backports also exist as 39491a1ae930 , 60b0b8ce803e , 6233d0b3ef46 and 99a6e4a9176d .
If you cannot update yet, you can reduce exposure in two ways. First, do not build or auto-load usb-storage and uas on systems that do not need mass storage. That removes the attack surface entirely. Second, use USB allow-listing, such as USBGuard with authorized_default=0 , so the kernel never scans unauthorized devices.
For systems with USB ports that strangers can reach, the allow-listing step matters most. A kiosk or charger that can scan an unknown device can give that device root, so patch those first.
Source : usb2shell: Root on Linux from a USB Plug-In (CVE-2026-98232) , usb2shell.com
