USB2Shell demo turns a USB plug-in into Linux root access

USB2Shell demo turns a USB plug-in into Linux root access

Add CyberWorldOpsto your preferred sources on Google
USB2Shell demo turns a USB plug-in into Linux root access
Vulnerabilities

Illustrative image generated with AI

A crafted USB device can make an unpatched Linux computer run an attacker’s command with root privileges, giving it full control without a login, a mounted drive or a click. Drivesec disclosed its USB2Shell demonstration on November 30, showing how CVE-2026-98232 can be exploited during the kernel’s automatic scan of newly connected storage hardware.

The exposed systems need vulnerable kernel code, USB mass-storage support through the usb-storage or uas driver, and a way for an attacker to connect a device. Locking the screen or preventing users from mounting unfamiliar drives does not stop the scan. The upstream fix was committed in September, before the demonstration became public.

As of December 1, The Hacker News reported no known attacks or identified victims, and the flaw was absent from the US government’s Known Exploited Vulnerabilities catalog.

Which systems are exposed

Drivesec says the vulnerable feature entered upstream Linux in version 6.5. Systems running that code without the fix are exposed if USB mass-storage support is built in or loads automatically when a device connects.

Equipment with publicly reachable ports is the practical concern. The researchers cite kiosks, payment terminals, car infotainment and telematics systems, EV chargers, in-flight entertainment, industrial human-machine interfaces and smart-home hubs as examples of places where an attacker might reach a port. These are potential deployment scenarios, rather than confirmed affected product lines.

Red Hat’s advisory also identifies a virtualization route: an attacker able to attach an emulated device to a guest instance could reach the vulnerable scanning process. Red Hat rates the flaw Important, with a CVSS v3.1 severity score of 8.4, because successful exploitation can disclose kernel memory or execute code with the highest privileges without user interaction.

Android has a narrower demonstrated impact. Drivesec says Android kernels based on Linux 6.6 and later are affected, but the builds it checked—Android’s Generic Kernel Image and the Samsung Galaxy A16 shipping kernel—use compiler bounds checks that prevent the memory-changing step. The crafted device can still receive kernel stack contents; the researchers demonstrated a memory leak rather than root access on those builds.

How the device reaches privileged code

The flaw sits in the kernel’s SCSI core, which handles storage-device commands. When a newly connected device identifies itself as an ATA disk supporting Command Duration Limits, a storage-command timing feature, the kernel calls scsi_cdl_enable().

That function reads device-supplied settings into a 64-byte buffer on the kernel stack, memory used for temporary working data. It trusted length fields returned by the device without checking whether they fit the buffer.

The upstream fix description explains that malformed lengths can make an unsigned subtraction wrap to a large value and place a pointer outside the buffer. During automatic scanning, the resulting operation can clear the low two bits of a device-selected stack byte and send up to 64 bytes of stack memory back to the device.

This happens before ordinary software sees a usable disk. No filesystem mount or application access to the storage device is necessary.

Drivesec built its physical proof of concept with a Cynthion programmable USB device and a stock Debian 6.12.22+bpo-amd64 kernel. The memory leak defeated KASLR, a protection that randomizes kernel code locations. The researchers then constructed fake kernel data structures to turn the restricted one-byte modification into a controlled write to kernel memory. Unplugging the device triggered a command supplied by it, running as root.

The demonstration shows two unsuccessful attempts followed by a third that runs whoami and uname with root privileges. Drivesec describes the exploit as probabilistic and says unsuccessful attempts do not crash the machine, allowing retries; it has not published an overall success rate.

The upstream commit separately documents a build-specific virtual-machine proof against Linux 7.3-rc1. Using QEMU and Linux’s Raw Gadget USB emulation interface, that proof ran a fixed command during automatic device enumeration and created a file owned by root, with kernel address randomization and non-executable-memory protection enabled.

Discovery and fixes

Drivesec dates its independent discovery to August 26 and root command execution on physical hardware to August 28. It privately reported the issue to SCSI maintainers on September 2 and submitted its patch on September 4. The fix was committed on September 9; the CVE identifier was reserved on September 25 and published by the Linux CVE Numbering Authority on October 6.

The researchers and upstream commit credit Sashiko AI Review with first reporting the bug on the kernel mailing list. Drivesec says it independently found the issue, wrote the fix and built the exploit chain; the AI did not write the exploit. The Hacker News describes Sashiko as a Google-built kernel review system given to the Linux Foundation and reports Google’s claim that it received credit in 528 kernel CVE fixes this year, alongside Google’s caution that it is too early to make strong claims about the tool’s contribution.

Administrators should install a vendor kernel containing the fix. Drivesec lists these first fixed upstream releases:

  • Linux 6.6 branch: 6.6.158.
  • Linux 6.12 branch: 6.12.112.
  • Linux 6.18 branch: 6.18.54.
  • Linux 7.2 branch: 7.2.8.
  • Mainline: 7.3.

Distribution package numbers need separate checking because vendors backport features and fixes. Debian’s security tracker says the standard Debian 12 Bookworm linux package never contained the vulnerable code. It lists fixes in 6.12.113-1 for Trixie, 6.12.113-1~deb12u1 for Bookworm’s separate linux-6.12 package, and 7.2.8-1 for unstable. Red Hat likewise warns that version-only scanners can misclassify backported packages.

For vendor-maintained kernels, Drivesec recommends backporting commit 3d676e458fe0, titled “scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()”. It caps and validates the returned lengths before accessing the feature data.

Until an update is possible, operators can remove USB storage support or prevent usb-storage and uas from loading where storage peripherals are unnecessary. Drivesec also recommends authorizing devices before driver attachment through USBGuard or authorized_default=0. Its checker script can help identify potentially exposed systems, but administrators should verify flagged results against their vendor’s advisory or the presence of the fix because backports can escape the checker.

Security dossiers

Read next

Sources

CVEs covered in this article

Back to home

Latest Cybersecurity News

All cybersecurity news →