Back to Newsroom

Threat intel5 min read

USB2Shell: a plugged-in USB device can get root on Linux

CVE-2026-98232 in the Linux kernel's SCSI code lets a malicious USB storage device run a command as root during automatic scanning, with no login. Fixed since September; details are now public.

4Tify Team

USB2Shell: a plugged-in USB device can get root on Linux

A flaw in the Linux kernel lets a specially built USB device run a command as root on an unpatched machine, without anyone logging in, mounting a drive or clicking anything. Tracked as CVE-2026-98232 and nicknamed USB2Shell, it was fixed in the kernel in September. The full technical details went public on 30 November, so any device still running an unpatched kernel is now a known target.

What happened

The bug is in the kernel's SCSI core, in scsi_cdl_enable(), the function that switches on a disk feature called Command Duration Limits (CDL). When a storage device is plugged in, the kernel asks it for a block of settings and copies the answer into a 64-byte buffer on the stack. It trusts the length values the device reports. A device that lies about those lengths can push the kernel's pointer outside the buffer.

The CVE record describes two effects. The kernel clears two bits of a stack byte that the device chooses, outside the buffer. It then sends up to 64 bytes of neighbouring kernel stack memory back to the device. That is a small write plus a memory leak, and the device controls both.

All of this happens during the automatic scan that runs the moment a USB storage device is connected. A locked screen, a logged-out session or a disabled automounter does not stop it, because the device is already talking to kernel code before any of those apply.

From a bit flip to root

The published attack chain uses the leaked memory to defeat KASLR, the protection that hides where kernel code sits in memory, and turns the small write into control of the kernel. The hardware demonstration used a Cynthion, an open-hardware USB tool, plugged into a Debian machine running the backports kernel 6.12.22 with KASLR enabled. When the device was unplugged, the command it carried ran as root. The CVE record describes the same result in a virtual machine on Linux 7.3-rc1, with KASLR and NX both on.

The attack does not work every time and no success rate has been published. A failed attempt does not crash the machine, so an attacker with the device in the port can simply try again.

No attacks using the flaw have been reported, and it is not in CISA's Known Exploited Vulnerabilities catalog. NVD has not scored it yet. Red Hat rates it Important (CVSS 8.4), while Ubuntu gives it Medium priority.

Who is affected

The flawed code arrived with CDL support in Linux 6.5. The upstream fixed versions are:

  • 6.6.158 for the 6.6 series
  • 6.12.112 for the 6.12 series
  • 6.18.54 for the 6.18 series
  • 7.2.8 for the 7.2 series, and 7.3 onward

A machine is exposed only if it runs an affected kernel without the fix, has USB mass storage support (the usb-storage or uas driver) and has a USB port someone can reach.

Distribution kernels don't follow the upstream numbers, so check your vendor's status rather than uname -r:

  • Debian 12's standard 6.1 kernel never had the flawed code. Debian 13 is fixed in 6.12.113-1 (DSA-6568-1), and the 6.12 backport kernel for Debian 12 in 6.12.113-1~deb12u1 (DLA-4850-1).
  • Red Hat Enterprise Linux 9 is fixed in kernel-5.14.0-741.24.1.el9_9 and RHEL 10 in kernel-6.12.0-264.19.1.el10_3. RHEL 6, 7 and 8 are not affected.
  • Ubuntu 24.04 LTS is fixed in 6.8.0-149.149 and 26.04 LTS in 7.0.0-42.42. Ubuntu 22.04 and older are not affected.

On Android, kernels 6.6 and newer still leak stack memory to the device. The builds that were checked, Google's Generic Kernel Image and the kernel on a Samsung Galaxy A16, use a compiler bounds check that blocks the memory write, so root was not shown there.

Patched servers and desktops are the easy part. The harder cases are machines whose USB ports strangers can reach and whose kernels are rarely updated: self-service kiosks, payment terminals, car infotainment units, EV chargers and smart-home hubs. None of these has been shown to be compromised. They are examples of where an open port matters.

What to do now

  1. Install your distribution's kernel update and reboot. If you build your own kernels or ship Linux devices, backport upstream commit 3d676e458fe0.
  2. Check the fix status for CVE-2026-98232 in your vendor's tracker, since vendors backport fixes without changing the version number. A version check alone can mislead you in both directions.
  3. On machines that never need USB storage, stop the usb-storage and uas modules from loading. Blacklisting is not enough if the driver is built into the kernel, so check CONFIG_USB_STORAGE and CONFIG_USB_UAS.
  4. Where USB has to stay on, require approval before the kernel binds a driver to a new device, with USBGuard or the usbcore.authorized_default=0 setting.
  5. Ask the suppliers of kiosks, terminals and other embedded Linux devices whether their firmware carries the fix, and when.

Finding which of your systems run an affected kernel is the kind of question our vulnerability scanning answers. It matches installed kernel packages against advisories like this one, so unpatched machines show up before someone reaches their USB port. The full CVE entry is also on NVD.

NEWSLETTER

The week’s news,
every Friday.

A short email with what we published that week. You can unsubscribe from any of them.

FRIDAY DIGEST · SAMPLE4TIFY NEWSROOM

This week in security

  • 01Public exploit out for vBulletin flaw that needs no login
  • 02EAGERBEE, ShadowRelay and PhantomNet backdoors hit Russia and Belarus
  • 03European Commission IT outage leaves staff without VPN and email

+ 6 MORE IN THIS ISSUE · UNSUBSCRIBE IN ONE CLICK

ONE OFFER

More than one product?
Get one offer.

Tell us what you need to protect and your budget, monthly or yearly. We combine the products into one offer and one contract, sized to that budget, and we stay with you after it is signed.

Ask for an offer Just tell us how many assets you have and what you want to spend.