Skip to main content
All incident reports
Incident report

Linux kernel USB2Shell flaw gives root to a malicious USB device, no login needed

A flaw in the Linux kernel lets a crafted USB device run an attacker's command as root on an unpatched machine, without a login or any user action. The bug, CVE-2026-98232, was fixed upstream in September; researchers at Drivesec have built a working exploit and say no real-world attacks have been found.

· First published · Last updated

The short version

  • The flaw. USB2Shell sits in the kernel's SCSI core, in code that enables Command Duration Limits. During automatic device scanning, a USB device presenting itself as an ATA disk can supply unchecked length values that lead to out-of-bounds access to a small kernel stack buffer.
  • The impact. According to the kernel advisory, a lying device can read up to 64 bytes of kernel stack memory and change one byte of it. Drivesec turned that byte into an arbitrary kernel write, defeated address randomisation and had the device's command run as root when it was unplugged.
  • Who is exposed. The flawed code arrived in Linux 6.5 and is in every release from then until the fix is applied. A machine also needs USB mass storage support through the usb-storage or uas driver and a USB port someone can physically reach.
  • Discovery. The bug was first flagged on the kernel mailing list by Sashiko, an AI code-review system Google built for the kernel and handed to the Linux Foundation. Drivesec says it found the same flaw independently, wrote the fix and built the exploit.
  • Status. The reporting identifies no real-world attacks or victims. It says the flaw was not in the US government's Known Exploited Vulnerabilities catalogue at publication; this is a time-bound account, not proof that exploitation has never occurred.

Timeline

DateEvent
SeptemberThe Linux kernel receives the upstream fix for the flaw.
OctoberThe flaw is published as CVE-2026-98232.
1 DecDrivesec's technical write-up and working exploit are publicly reported.

How the attack works

The kernel scans a USB storage device as soon as it is plugged in, before anyone signs in. The vulnerable code runs during that scan, so a locked screen, a logged-out session or a rule against mounting unknown drives does not help: the device is already talking to privileged kernel code.

Drivesec demonstrated the attack on a Debian machine running kernel 6.12.22 with address randomisation switched on, using a Cynthion, a small programmable USB tool. The exploit is probabilistic and the researchers published no success rate, but they note that a failed attempt does not crash the machine, so it can be retried.

Who is exposed

Upstream version numbers do not map cleanly onto what distributions ship, because distributions backport both features and fixes. Debian's standard version 12 kernel never contained the flawed code, according to its security tracker, and Red Hat delivered the fix in a kernel it numbers 5.14. Administrators should check their own distribution rather than the upstream number.

On Android the researchers found only a memory leak, not root. Kernels on version 6.6 and newer hand the device some kernel memory, but the builds they checked, including Google's generic Android kernel and the kernel on a Samsung Galaxy A16, use a compiler check that blocks the memory-changing step.

The researchers point to equipment where strangers can reach a USB port as the practical concern: self-service kiosks, payment terminals, car infotainment units, EV chargers and smart-home hubs. None has been shown compromised, and the article presents them as examples of where an open port matters rather than a list of affected products.

Discovery and disclosure

Sashiko, the AI review system, reported the flaw on the kernel mailing list. Drivesec says it found the same flaw on its own, wrote the fix and built the working exploit, and that the AI did not write the exploit. Google says Sashiko has been credited in 528 Linux kernel CVE fixes this year, while cautioning that it is "too early to make strong claims" about how much credit the tool deserves.

A physical attack is hard to carry out across many machines, and the fix has been available since September. The researchers' checking script can miss fixes a vendor has backported, so its result should be treated as a hint rather than proof.

Analysis

The important boundary is device enumeration, before a filesystem is mounted. A policy that stops staff opening files from unknown drives does not address the reported path: the kernel has already parsed the device's storage replies. For equipment with reachable USB ports, assess whether an untrusted device can reach the storage drivers at all, alongside checking the kernel fix. Kiosks and payment terminals are examples of where to investigate, not confirmed affected products.

The demonstrated root result has a narrower scope than the Linux installed base. It was shown on a particular Debian kernel and required a crafted device plus physical access. The reported Android tests produced a memory leak rather than root, and the researchers gave no general success rate. Treat this as a demonstrated exploitation path to assess on relevant builds, without assuming every Linux or Android device offers the same outcome.

Vendor patch status matters more than a simple version comparison. The report contrasts an unaffected standard Debian 12 kernel with a Red Hat backport carrying an older version number, and warns that the researchers' checker can miss backported fixes. Record the actual vendor package and its advisory status before deciding a machine is exposed or remediated; the checker alone cannot settle either conclusion.

What is not known yet

  • Who might use the flaw, and whether anyone has already tried it against equipment in public places.
  • The exploit's real success rate, which the researchers did not publish.
  • Whether an Android device can be pushed past the memory leak to full root access.
  • Whether every distribution and vendor has backported the complete fix.
  • Whether any kiosk, payment terminal, charger or hub has actually been affected.

What to do

If you run Linux systems

  1. Update to a kernel release that contains the fix, or apply the upstream fix commit, checking your distribution's own advisory rather than the upstream version number.
  2. If you cannot update immediately, stop the usb-storage and uas drivers from loading on machines that do not need to read USB storage.
  3. Require devices to be approved before the kernel loads a driver for them, using allow-listing such as USBGuard or the authorized_default=0 setting.
  4. Treat the researchers' checking script as a hint only, because it can miss fixes a vendor has backported.

If you operate equipment with reachable USB ports

  1. Restrict physical access to USB ports on kiosks, payment terminals, chargers and similar devices where strangers can reach them.
  2. Confirm that the device's kernel carries the fix before leaving it in a public location.

For everyone else

  1. Keep kernel patches current on any machine with an exposed USB port: this flaw needs no user action to trigger, only a plugged-in device.

Update log

  • Clarified the device-scanning flaw and added analysis of physical access, patch verification and the demonstrated exploit's limits.
  • First published.

Sources

New incident reports by email

One email a week with the reports published since the last one.

We email you about this topic only; unsubscribe any time. See our Privacy Policy.

Want us to look at your domain?

Give us one apex domain and we'll send back a written snapshot of what is already visible from outside. No call required.