Skip to content
Hacker Posts
VulnerabilityCVE-2026-98232

Linux kernel SCSI flaw CVE-2026-98232 lets a rogue USB get root

CVE-2026-98232, dubbed USB2Shell, is an out-of-bounds flaw in the Linux kernel SCSI core a malicious USB device can exploit for code execution before login. Fixed upstream in September.

Hacker Posts DeskPublished 3 min read

CVE-2026-98232, which the discovering researchers call USB2Shell, is an out-of-bounds flaw in the Linux kernel's SCSI core. A USB device that claims to be an ATA disk supporting Command Duration Limits (CDL) can feed the kernel bogus length values that get copied into a small stack buffer without bounds checking. The code path runs automatically when the device is plugged in — before any login — so a plugged-in device is enough.

What the bug does

The defect is in scsi_cdl_enable(), the function that turns on the CDL storage feature. It reads length fields returned by a MODE SENSE response to locate the ATA feature mode page inside a 64-byte stack buffer, and trusts those lengths. A malicious device supplies oversized values, letting it read up to 64 bytes of kernel stack and overwrite one byte. The flaw is reachable through the usb-storage and uas mass-storage drivers.

Researchers at Drivesec chained the read-and-one-byte-write primitive into arbitrary kernel memory writes, defeated KASLR, and ran a device-chosen command as root when the device was unplugged. Their demo ran on Debian with kernel 6.12.22, KASLR enabled, driven by a Cynthion USB tool. The exploit is probabilistic, and Drivesec says failed attempts do not crash the machine — so an attacker can simply retry.

Affected and fixed versions

The flawed code was introduced in Linux 6.5 and affects every release from 6.5 onward until the fix. It was patched upstream in September — commit 3d676e458fe0, titled "scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()" — and published as CVE-2026-98232 on October 6. Distribution status varies because of backporting:

  • Debian 12 never shipped the flawed code.
  • Red Hat carries the fix in its 5.14-numbered kernel.
  • Android (kernel 6.6+) is only exposed to a memory leak, not root — a compiler check blocks the memory-write step, per Drivesec's testing on a generic Android kernel and a Samsung Galaxy A16.

Check your distribution's advisory directly rather than assuming by upstream version number.

Exploitation status

No in-the-wild exploitation has been reported; the flaw is not in CISA's KEV catalog. The only working exploit is Drivesec's. Severity scoring is unsettled — Tenable lists a CVSS v2 base of 7.2, TuxCare rates it 8.4, and NVD's analysis was still pending at publication — so treat the number as provisional and judge by your threat model instead.

Action checklist

  1. Patch the kernel to a build carrying commit 3d676e458fe0, or your distribution's backport. This is the clean fix.
  2. Where USB storage is not needed, block the drivers. Blacklist usb-storage and uas, or set authorized_default=0 on USB hubs and approve devices explicitly.
  3. Deploy USBGuard on endpoints that handle untrusted physical access — kiosks, shared workstations, lab machines — to enforce a device allowlist.
  4. Treat exposed physical ports as a control gap. The attack needs a device plugged in; port blockers and BIOS/boot policy still matter for machines an attacker can touch.

Context

CVE-2026-98232 is a physical-access bug, not a remote one — the risk is an "evil maid," a hostile peripheral, or a planted drive, not internet scanning. It is also the second notable flaw this cycle surfaced with AI assistance: Google's Sashiko code-review system first reported the issue on the Linux kernel mailing list, after which Drivesec says it independently found the bug, wrote the fix, and built the exploit. As with the AI-assisted discovery of the Rejetto HFS flaw, the tooling is a sourcing detail; the root cause is an old one — unvalidated attacker-controlled lengths copied into a fixed stack buffer.