Linux

Content type: News

5 min read

Linux kernel flaw grants root via USB without login, mount or click (CVE-2026-98232)

News
Reading
5 min
Tables
2
Code
2
In short

The vulnerability CVE-2026-98232, dubbed usb2shell, uses a malicious USB device to execute commands as root during the Linux kernel's automatic device scan, without anyone needing to log in, mount a disk or click anything.

The Drivesec finding

Italian cybersecurity firm Drivesec published details of CVE-2026-98232 on November 30, 2026, a Linux kernel flaw it dubbed usb2shell. The name is a play on the wave of "2shell" and "4shell" bugs that marked 2026, such as PHP2Shell, Java4Shell, wp2shell and KindaRails2Shell: all of them were remote flaws in widely used software. usb2shell is the physical version of that family. Instead of a malicious request over the network, the attack arrives through a USB device plugged into the port.

Drivesec's research team (researchers identified as Z3r0n37 and Alberto247) found the bug on August 26, 2026, and, two days later, already had command execution as root on physical hardware. The private report was sent to the SCSI maintainers on September 2, the patch went to the linux-scsi mailing list on September 4, and the fix was committed on September 9. Drivesec credits Sashiko AI Review with having originally reported the bug on the linux-scsi mailing list, but states it found the issue independently, in addition to having written the fix and built the exploit chain.

Who is exposed

The bug lives in the Command Duration Limits (CDL) support, a feature added to the Linux kernel in version 6.5. A system is exposed when three conditions coincide at the same time:

  1. Runs Linux 6.5 or higher without the fix applied.
  2. Has USB mass storage support (usb-storage or uas), built in or automatically loaded.
  3. Someone can plug a physical device into one of the USB ports.

No user interaction is required: the bug triggers during the automatic device scan, even before any user-space software sees the disk. That detail is what makes CVE-2026-98232 relevant for anyone designing embedded systems: automotive infotainment and telematics units, electric vehicle chargers, point-of-sale terminals, kiosks, in-flight entertainment systems, industrial interfaces (HMIs) and smart home hubs often have USB ports accessible to strangers.

How the bug works

When the kernel scans a new SCSI device that announces itself as ATA with CDL support, it calls scsi_cdl_enable(). That function reads a mode page sent by the device itself into a 64-byte buffer on the kernel stack, and then writes it back. The problem is that the sizes reported in the device's response were used without validation:

c
len = min_t(size_t, sizeof(buf),
    data.length - data.header_length -
    data.block_descriptor_length); /* can wrap -> 64 */
buf_data = buf + data.header_length +
    data.block_descriptor_length; /* can point past buf */

With forged values in those fields, a USB device can make the kernel return up to 64 bytes of the stack (a kernel memory leak) and also clear a specific byte of the stack, at an offset chosen by the attacker. All of this happens during the automatic scan, before any authentication.

The proof of concept

Drivesec built a proof of concept using a Cynthion device plugged into a PC running a stock Debian 6.12.22+bpo-amd64 kernel. The initial leak is used to break KASLR (kernel address space layout randomization), and the exploit chain builds fake kernel structures to turn the single-byte write into a controlled write. When the USB device is disconnected, the kernel executes a command defined by the device itself, as root.

The exploit is probabilistic: the image published by Drivesec shows two attempts that fail and repeat without crashing the system, until the third attempt executes whoami and uname as root. This means that, even without succeeding on the first try, the attacker can try multiple times without leaving an obvious crash trace in the log.

usb2shell terminal showing the exploitation log for CVE-2026-98232, culminating in confirmation of root execution via whoami and uname
usb2shell terminal showing the exploitation log for CVE-2026-98232, culminating in confirmation of root execution via whoami and uname. Reprodução: usb2shell.com.

The specific case of Android

On Android, the impact is smaller. Android kernels at 6.6 or higher are affected and the device still gets back the contents of the kernel stack (the leak still applies), but the builds tested by Drivesec (Android GKI and the Samsung Galaxy A16's stock kernel) use compiler-enforced bounds checks that prevent the write from going outside the buffer. In other words, in these builds the bug leaks memory but does not turn into code execution.

How to check and fix

Drivesec published a script to identify vulnerable kernels:

bash
curl -fsSLO https://usb2shell.com/tools/usb2shell-check.sh
less usb2shell-check.sh
sh usb2shell-check.sh

It's worth reading the script before running it, as with any binary downloaded from the internet that's meant to check the security of your own kernel. Distributions and device makers often backport fixes without changing the displayed version number, so if the checker flags a vulnerability, the next step is to look up the vendor's advisory for CVE-2026-98232 or locate the fix commit in the specific code tree.

The versions already fixed by stable branch are:

Stable branchFirst fixed version
6.6.y6.6.158
6.12.y6.12.112
6.18.y6.18.54
7.2.y7.2.8
mainline7.3

The upstream fix is commit 3d676e458fe0 ("scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()"), with backports recorded in commits 39491a1ae930, 60b0b8ce803e, 6233d0b3ef46 and 99a6e4a9176d. Anyone maintaining a vendored kernel who can't update the entire version can apply this patch in isolation.

What changes for embedded systems designers

For those who can't update the kernel right away, Drivesec lists two practical mitigations:

MitigationEffect
Don't build or automatically load usb-storage / uas where mass storage isn't neededRemoves the attack surface
USB allowlisting (USBGuard, authorized_default=0)Stops scanning unauthorized devices

That's the key point for DevOps and architecture teams working with embedded Linux: security policy can't assume a physical USB port is a trusted channel just because it's off the network. In products like point-of-sale terminals, electric vehicle chargers or industrial HMIs, the USB port usually exists for legitimate reasons (firmware updates, diagnostics, maintenance), but it rarely goes through the same attack-surface review that an internet-exposed API receives.

CVE-2026-98232 reinforces a point that network bugs don't teach: validating input isn't just about sanitizing what comes in over HTTP. Any data coming from a peripheral, including a descriptor that the hardware itself controls, can be hostile. For architectures running Linux 6.5 or higher on hardware with a physically accessible USB port, checking the kernel version against the table above and reviewing whether usb-storage/uas really need to be loaded is work for today, not for whenever there's spare time.

Translated from the Brazilian Portuguese original · Read the original