USB2Shell CVE-2026-98232: Root From a USB Plug-In

By 12 min read
USB2Shell CVE-2026-98232, a Linux kernel flaw that gives a malicious USB device root

Plug a small programmable USB board into an unpatched Linux machine, and the kernel may run a command of the board’s choosing as root before anyone has typed a password. That is the claim behind USB2Shell, which Italian security firm Drivesec published on 30 November 2026 with a working proof of concept on a stock Debian kernel.

In short: USB2Shell (CVE-2026-98232) is a Linux kernel bug in how the SCSI layer scans new storage devices, present in Linux 6.5 and later, and it is fixed upstream since September 2026. Anyone running Linux on hardware with USB ports that strangers can reach should confirm their vendor kernel includes the fix, and block USB storage where it is not needed.

What is USB2Shell?

USB2Shell is a stack out-of-bounds read and write in scsi_cdl_enable(), a function in the Linux kernel’s SCSI core. A USB storage device that misreports a few length fields can make the kernel send it up to 64 bytes of kernel stack memory and clear bits in one stack byte at an offset the device chooses.

Drivesec chained those two small primitives into full root command execution. The firm named it after this year’s run of “2shell” and “4shell” bugs, such as PHP2Shell and Java4Shell, and calls it the physical version: a crafted device instead of a crafted request.

The Linux kernel CVE record was published by the kernel’s own CVE Numbering Authority on 6 October 2026. Drivesec held its full write-up until 30 November, almost three months after the fix landed.

Four headline figures for USB2Shell: Linux 6.5, 64 leaked bytes, one altered byte, zero logins
A small leak and a one-byte write were enough for a full chain. Data: Drivesec, Linux kernel CVE record.

Background: why a USB stick talks to the SCSI layer

What is Command Duration Limits?

Command Duration Limits (CDL) is a disk feature that lets the host attach time limits to read and write commands, so a slow command can be aborted instead of stalling everything behind it. The kernel patch series that added it describes seven duration limit descriptors for reads and seven for writes. Support arrived in Linux 6.5.

Why USB storage reaches this code

Linux treats USB mass storage as SCSI. The usb-storage and uas (USB Attached SCSI) drivers wrap the device so the SCSI core can probe it like any disk. When a new device says it is an ATA disk with CDL support, the scan calls scsi_cdl_enable() to read and write back a configuration page.

A MODE SENSE command asks a disk for one of its settings pages, and MODE SELECT writes a page back. The bug lives in the code that does that round trip.

Why this matters now

A run of recent kernel bugs shows how much attack surface sits in code most administrators never think about. The site recently covered NFS2ROOT, a 12-year-old nfsd heap overflow. USB2Shell is younger, but it is reached without any network service at all.

How does CVE-2026-98232 work?

The kernel advisory and Drivesec’s write-up agree on the mechanism. Here it is at a conceptual level, without exploit detail.

Step 1: the kernel trusts the device’s lengths

scsi_cdl_enable() reads the mode page into a 64-byte buffer on the kernel stack. It then computes where the page data starts and how long it is from three lengths the device itself returns: the total length, the header length and the block descriptor length.

A device can report a total shorter than the header plus descriptors. The unsigned subtraction then wraps around to a huge number, which the code caps at 64, and the computed start pointer can land past the end of the buffer.

Step 2: a leak and a one-byte write

During the automatic scan the function is called with “enable” set to false, so it clears the low two bits of one byte at the computed pointer. That pointer is outside the buffer, at an offset the device picks. Then scsi_mode_select() copies up to 64 bytes from outside the buffer into the MODE SELECT payload and sends them to the device.

So the attacker’s device learns the contents of kernel stack memory and gets one small, targeted change to it.

Step 3: from one byte to root

Drivesec says the leak let it defeat KASLR (kernel address space layout randomization, which hides where kernel code sits in memory). The chain then built fake kernel structures to turn the one-byte change into a controlled write. When the device is unplugged, the kernel runs a command the device supplied, as root.

Six-stage USB2Shell attack chain from plugging in a fake ATA disk to a root command
Every step happens inside the kernel's automatic scan, before userspace sees a disk. Data: Drivesec, Linux kernel CVE record.

What did the proof of concept show?

Drivesec ran the attack from a Cynthion, an open programmable USB tool, against a stock Debian 6.12.22+bpo-amd64 kernel with KASLR enabled. In its demonstration the first two attempts missed and the third ran whoami and uname as root.

The exploit is probabilistic, and Drivesec says failed attempts do not crash the target, so an attacker can retry. No success rate is published. Separately, the kernel CVE text describes a QEMU and Raw Gadget proof on Linux 7.3-rc1 that created a root-owned marker file with KASLR and NX enabled.

Is it disabled if CDL is off?

No. CDL is disabled by default in the kernel, but the vulnerable path is the scan that runs when CDL is reported as supported, with “enable” false. The bug does not depend on anyone turning the feature on.

Who is affected by USB2Shell?

Drivesec lists three conditions that must all be true:

  1. The system runs Linux 6.5 or later without the fix.
  2. USB mass storage support (usb-storage or uas) is built in or loads automatically.
  3. Someone can plug a device into one of its USB ports.

Fixed versions

Branch First fixed upstream release
6.6.y 6.6.158
6.12.y 6.12.112
6.18.y 6.18.54
7.2.y 7.2.8
mainline 7.3

The upstream fix is commit 3d676e458fe0, “scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()”, committed on 9 September 2026. Drivesec wrote and submitted the patch itself.

Distribution status

Upstream numbers do not map cleanly onto distribution kernels, which backport features and fixes. Three examples from vendor trackers:

  • Debian 12 (bookworm): the default linux 6.1 package is marked not affected because the vulnerable code is not present. The optional linux-6.12 package was affected and is fixed in 6.12.113-1~deb12u1 (DLA-4850-1). Note that Drivesec’s test target, a +bpo kernel, is a Debian backports build.
  • Debian 13 (trixie): fixed in 6.12.113-1 (DSA-6568-1).
  • Red Hat and derivatives: Red Hat ships a fix even though RHEL 9 kernels are numbered 5.14, because CDL was backported. SUSE’s page lists the fixed SUSE Liberty Linux 9 kernel as 5.14.0-741.24.1.el9_9.

Android

Drivesec says Android kernels on 6.6 and later are affected but only leak memory. The builds it checked, Android GKI and the Samsung Galaxy A16 shipping kernel, use compiler bounds checks that keep the write inside the buffer.

Where exposure is real

The practical risk is any Linux box whose USB port a stranger can reach. Drivesec names car infotainment and telematics units, EV chargers, point-of-sale terminals, kiosks, in-flight entertainment, industrial HMIs and smart-home hubs. These are examples of where an open port matters, not confirmed vulnerable products.

Red Hat adds a less obvious case: anyone who can attach virtualized devices to a guest. On a virtual machine, an emulated USB or SCSI device can play the role of the malicious stick.

How severe is it? The vendors disagree

Red Hat rates CVE-2026-98232 at 8.4, Important, with a local attack vector and high impact on confidentiality, integrity and availability. SUSE rates it 5.7, Moderate, with a physical attack vector and low integrity and availability impact.

Bar chart comparing Red Hat's 8.4 and SUSE's 5.7 CVSS scores for CVE-2026-98232
The gap comes mostly from whether the attack vector is scored as local or physical. Data: Red Hat and SUSE CVE pages.

Both readings are defensible. If your fleet is servers in locked racks, SUSE’s view fits. If it is kiosks, chargers or VMs where tenants control attached devices, Red Hat’s is closer. SecurityOnline listed an EPSS score of 0.2 percent, which reflects the physical access requirement and the lack of known attacks.

How does USB2Shell compare with other recent physical and kernel bugs?

  USB2Shell NFS2ROOT FastUnlock WPSplinter
Target Linux 6.5+ kernel Linux nfsd Windows 11 lock screen Broadcom router WPS daemon
Access needed Physical USB port Network, TCP 2049 Physical, keyboard Wi-Fi range
Result Root command Root (lab) Limited non-admin account Code execution on router
CVE CVE-2026-98232 CVE-2026-99362 None at disclosure None (Broadcom declined)
Known in-the-wild use None reported None reported None reported None reported

FastUnlock also needed someone at the keyboard, but it only gave a limited account. USB2Shell goes straight to root. WPSplinter is the closest in spirit: an attacker nearby, no credentials, and embedded devices that rarely get updates.

How do you detect a USB2Shell attempt?

No vendor has published indicators of compromise, and Drivesec has not described what its device looks like in logs. Detection therefore means watching the attack surface. The relevant MITRE ATT&CK technique is T1200, Hardware Additions.

Log sources to watch

  • Kernel log (journalctl -k or dmesg): every new USB device, driver binding to usb-storage or uas, and new SCSI disks are logged at plug-in. On kiosks and embedded units that should never see storage, any such entry is worth an alert.
  • udev events: forward device add and remove events to your log pipeline so a brief plug-in that leaves no mounted disk is still recorded.
  • USBGuard audit log: if USBGuard runs, it records every device it allows or blocks with its attributes.

Behaviours worth flagging

  • A USB device that identifies as an ATA disk with CDL support. CDL was designed for large hard drives, so it is unusual on a thumb drive.
  • Several rapid connect and disconnect cycles of the same device, which fits a probabilistic exploit that retries.
  • A root-owned process or new file created right after a USB disconnect, with no interactive session.

Checking exposure

Drivesec publishes a checker script, usb2shell-check.sh, and asks users to read it before running it. The firm and The Hacker News both caution that it can miss fixes a vendor has backported, so treat its result as a hint. Your vendor’s advisory for CVE-2026-98232 is the authority.

What should defenders do now?

  1. Install a fixed kernel and reboot. Use your distribution’s update, or backport commit 3d676e458fe0 for custom and embedded kernels. Patching is the only complete fix.
  2. Prioritise reachable ports. Kiosks, payment terminals, chargers, vehicle units, shop-floor HMIs and lab machines first; locked data-centre servers later.
  3. Remove USB storage where it is not needed. Blacklist or do not build usb-storage and uas on devices that never read USB drives. This removes the attack surface outright.
  4. Deauthorize new USB devices by default. USBGuard, or writing 0 to authorized_default for each USB host controller, stops the kernel configuring a device until it is approved. Writing 2 authorizes only devices on internal ports.
  5. Check virtualization hosts. Review who can attach USB or SCSI devices to guests, per Red Hat’s note.
  6. Ask your embedded suppliers. For products running vendor kernels, request a statement on CVE-2026-98232 and the fixed firmware version.

The catch: allow-listing is not a full answer

The kernel’s own documentation on USB authorization warns that anyone with a device gadget kit can fake descriptors and device information. A Cynthion is exactly that kind of kit.

So an allow-list that trusts a vendor and product ID can be fooled by a device that copies an approved one. Default-deny still helps, because a device must match a rule before its driver loads. It is a speed bump against a determined attacker, not a replacement for the patch.

Who found it: Drivesec or an AI?

Both, according to the sources. Drivesec’s credits say Sashiko AI Review first reported the bug on the linux-scsi mailing list, while its own team found it independently, wrote the fix and built the exploit chain. The kernel CVE text also says the issue was independently found by Drivesec.

The Hacker News reports that Sashiko is an AI code-review system Google built for the kernel and gave to the Linux Foundation. It also reports that Google credits Sashiko in 528 kernel CVE fixes this year, while Google itself cautions that it is too early to make strong claims about that credit. The AI did not write the exploit.

Timeline of the USB2Shell disclosure from discovery in August to publication on 30 November 2026
The fix was public for almost three months before the exploit details. Data: Drivesec.

Open questions

  • Reliability: Drivesec gives no success rate, only that the exploit is probabilistic and does not crash on failure.
  • Real products: no kiosk, charger or vehicle unit has been shown vulnerable. Which embedded vendors ship 6.5+ kernels with USB storage enabled is unknown.
  • Severity: Red Hat and SUSE score the same bug three points apart, and NVD analysis was still pending in SecurityOnline’s summary.
  • Exploit release: Drivesec published the mechanism and a checker. Whether full device firmware will become public is not stated.

The bottom line

USB2Shell turns a few seconds at a USB port into root on unpatched Linux 6.5 and later, with no login and no mount. The fix has existed since September, so the risk sits mainly in kiosks, chargers, vehicles and other embedded systems that update slowly. Patch them, strip USB storage where it is not needed, and treat USB allow-lists as a delay rather than a defence.

Sources

This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.

Frequently asked questions

What is USB2Shell?

USB2Shell is the name Drivesec gave to CVE-2026-98232, a Linux kernel flaw in the SCSI core. A crafted USB storage device can leak kernel stack memory and corrupt one stack byte while the kernel scans it, which Drivesec chained into running a command as root.

Which Linux versions are affected by CVE-2026-98232?

Upstream Linux 6.5 and later, until the fix. The first fixed releases are 6.6.158, 6.12.112, 6.18.54, 7.2.8 and 7.3. Distribution kernels carry their own version numbers and backports, so check your vendor's advisory instead of comparing version strings.

Does USB2Shell need the user to log in or mount the drive?

No. The bug is reached during the kernel's automatic scan of a newly connected device, before userspace sees a disk. A locked screen, a logged-out session or disabled automount does not stop it.

Is USB2Shell being exploited in the wild?

No attacks or victims had been reported as of 1 December 2026, and the flaw was not in CISA's Known Exploited Vulnerabilities catalog at that time. Drivesec has published a technical write-up and a checker script, not a ready-to-use device firmware.

Is Debian 12 vulnerable to USB2Shell?

Debian's tracker marks the default bookworm kernel (Linux 6.1) as not affected because the vulnerable code is not present. The newer linux-6.12 kernel available to bookworm was affected and is fixed in 6.12.113-1~deb12u1. Debian 13 trixie is fixed in 6.12.113-1.

What is the CVSS score of CVE-2026-98232?

Vendors disagree. Red Hat scores it 8.4 (Important) with a local attack vector, while SUSE scores it 5.7 (Moderate) with a physical attack vector and lower integrity and availability impact.

Are Android phones affected by USB2Shell?

Partly. Drivesec says Android kernels on 6.6 and later still leak kernel stack contents to the device, but the builds it checked, including Android GKI and a Samsung Galaxy A16, use compiler bounds checks that block the memory write, so it found no route to root.

How do I mitigate USB2Shell without rebooting into a new kernel?

Stop the usb-storage and uas drivers from loading on machines that do not need USB storage, and deauthorize new USB devices by default with USBGuard or the authorized_default sysfs setting. Both reduce exposure, but a patched kernel is the fix.

Keep reading

USB2ShellCVE-2026-98232Linux kernelUSB securityphysical securitykernel vulnerabilityUSBGuard