usb2shell (CVE-2026-98232): Malicious USB Device Can Gain Root on Linux the Moment It Is Plugged In

A Linux kernel bug in SCSI CDL handling lets a crafted USB storage device run commands as root during plug-in, with no login or mount; update the kernel and reboot.
A newly disclosed Linux kernel flaw lets a specially built USB device take root control of a computer the moment it is plugged in. Nobody has to log in, open a file or mount the drive. The bug is tracked as CVE-2026-98232 and its finders, the Italian security firm Drivesec, have named it usb2shell. Red Hat scores it 8.4 out of 10 (Important).
The fix has been in the kernel since September and major Linux distributions have already shipped patched kernels. Drivesec published its full write-up on 30 November 2026. No attacks in the wild have been reported, but researchers have shown it can give root on real hardware, so laptops, desktops and kiosks should be updated.
What the flaw is
When you plug in a USB storage device, the Linux kernel talks to it through the SCSI layer to learn what kind of device it is. Since Linux 6.5, the kernel also checks whether the device supports Command Duration Limits (CDL), a feature of modern ATA hard drives. This check is done by a function called scsi_cdl_enable().
The kernel trusted the length values the device sent back in its answer (a "MODE SENSE" reply) without checking them. A malicious device can lie about those lengths. That lets it:
- read up to 64 bytes of kernel stack memory, which helps defeat memory protections, and
- change one byte on the kernel stack at a position it chooses (an out-of-bounds write).
With careful engineering, the researchers turned that into running their own commands as root. It does not work on every attempt, but it did work on physical test machines.
The fix is titled "scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()". It makes the kernel check the lengths before using them.
Why it matters
- No user action. The attack runs during the kernel's automatic scan of the new device, before anything is mounted. Turning off auto-mount does not stop it.
- Locked screens are not a defence. A logged-out or locked machine still scans USB devices.
- Physical access is needed. The attacker, or someone they trick, has to plug the device in. Red Hat notes it can also be triggered by anyone who can attach virtual devices to a virtual machine.
- Cheap to deliver. The "drive" can be a small programmable USB board that looks like a normal stick.
The highest risk is for laptops that travel, shared or public computers, kiosks, point-of-sale systems, and Linux-based devices in cars and factories.
Who is affected
- Linux 6.5 and newer kernels without the fix. This is when CDL support was added.
- Red Hat Enterprise Linux 9 and 10 are affected and have fixed kernels. RHEL 9 is affected even though it uses an older 5.14 kernel, because the CDL code was backported to it.
- Ubuntu 24.04 LTS and 26.04 LTS are affected and fixed. Ubuntu 22.04 is only affected if you use the newer 6.8 "HWE" kernel. Ubuntu 20.04 and older are not affected.
- Debian 12 (bookworm) with its standard 6.1 kernel is not affected. Debian 13 (trixie) and newer, and the optional 6.12 kernel for Debian 12, are affected and fixed.
- Android devices with 6.6 or newer kernels are reported to be exposed only to the memory leak part of the bug, not root.
Timeline
- 26 August 2026 – Drivesec finds the bug while testing USB devices.
- 2 September 2026 – Reported privately to the Linux SCSI maintainers.
- 9 September 2026 – Fix committed to the kernel.
- 6 October 2026 – CVE-2026-98232 published.
- 20 November 2026 – Red Hat ships fixed RHEL 9 kernels.
- 30 November 2026 – Drivesec publishes its full technical write-up and names the bug usb2shell.
Fixed kernel versions
- Upstream stable: 6.6.158, 6.12.112, 6.18.54, 7.2.8, and mainline 7.3.
- Ubuntu 24.04 LTS: linux 6.8.0-149.149 or later.
- Ubuntu 26.04 LTS: linux 7.0.0-42.42 or later.
- Debian 13 (trixie): linux 6.12.113-1 or later (DSA-6568-1).
- RHEL 9: kernel 5.14.0-741.24.1.el9_9 (or 5.14.0-687.69.1.el9_8 for 9.8 EUS).
- RHEL 10: kernel 6.12.0-264.19.1.el10_3.
Install the update and reboot. The running kernel stays vulnerable until you restart. Check with uname -r.
If you can't patch right away
- Block unknown USB devices with USBGuard, or set
authorized_default=0on USB controllers so new devices are not scanned until you approve them. - Stop USB storage drivers from loading on machines that never need USB drives: blacklist the
usb-storageanduasmodules. - Lock down physical access to servers, kiosks and unattended machines, and disable unused USB ports in the BIOS/UEFI where possible.
- Don't plug in unknown USB sticks, including "free" ones handed out at events or found in car parks.
- If you use Drivesec's checker script, read it before running it. It treats any kernel older than 6.5 as safe, which is wrong for RHEL 9.
