The Spectrum Dispatch News

technology

Linux Kernel USB Bug Allows Root Access from Plugged-In Malicious Devices

A vulnerability in Linux 6.5+ enables attackers to gain root command execution by inserting a crafted USB device into accessible ports on systems like car infotainment and EV

Linux Kernel USB Bug Allows Root Access from Plugged-In Malicious Devices

Researchers at Drivesec have disclosed a Linux kernel vulnerability, tracked as CVE-2026-98232, that allows attackers to execute commands as root by plugging in a malicious USB device. The vulnerability, termed “usb2shell” after a pattern of similar remote code execution bugs this year, affects systems running Linux 6.5 or later that have USB mass storage support enabled.

Linux Kernel USB Bug Allows Root Access from Plugged-In Malicious Devices

According to the disclosure, the bug resides in the Command Duration Limits (CDL) support added to Linux 6.5. When the kernel scans a new SCSI device claiming to be an ATA device with CDL support, it calls a function that reads a mode page from the device into a 64-byte stack buffer without properly validating the lengths provided by the device. This validation failure allows a crafted device to leak up to 64 bytes of kernel stack memory and write one byte at an offset of its choosing.

The vulnerability is particularly concerning because no user interaction or manual device mounting is required—the exploit triggers during the automatic device scan when the USB device is plugged in. This makes it dangerous for systems with USB ports accessible to the public, including point-of-sale terminals, kiosks, in-flight entertainment systems, industrial human-machine interfaces, smart-home hubs, car infotainment and telematics units, and EV chargers.

Drivesec’s research team built a proof-of-concept exploit using a Cynthion USB device that successfully achieved root command execution on a PC running a stock Debian kernel. The exploit chain uses the kernel stack leak to break KASLR (kernel address space layout randomization) and constructs fake kernel structures to convert the one-byte overwrite into a controlled write. When the device is unplugged, the kernel executes a command supplied by the device with root privileges.

Fixed kernel versions are available across stable branches: 6.6.158, 6.12.112, 6.18.54, 7.2.8, and 7.3 on mainline. Users unable to update immediately can mitigate exposure by disabling USB mass storage support where unnecessary or implementing USB allow-listing through tools like USBGuard. The upstream fix is available as commit 3d676e458fe0 for vendors who need to backport it to their kernels. Android devices running kernel 6.6 or later are affected by information leakage but protected by compiler bounds checks in builds tested.

Key facts

  • Vulnerability affects Linux 6.5+ systems with USB mass storage support enabled and USB ports accessible to physical access
  • No user interaction required; exploit triggers during automatic device scan when crafted USB device is inserted
  • Proof-of-concept achieved root command execution on physical hardware using a Cynthion USB device
  • Fixed in kernel versions 6.6.158, 6.12.112, 6.18.54, 7.2.8, and mainline 7.3
  • Vulnerable systems include car infotainment units, EV chargers, point-of-sale terminals, kiosks, industrial HMIs, and smart-home hubs

Sources

← All posts