Home Security NewsUSB2Shell (CVE-2026-98232): Linux Kernel Flaw Lets Malicious USB Devices Get Root, How to Check and Patch

USB2Shell (CVE-2026-98232): Linux Kernel Flaw Lets Malicious USB Devices Get Root, How to Check and Patch

by Lakindu Jayasena
4 views 15 minutes read
USB2Shell Linux kernel vulnerability CVE-2026-98232: malicious USB device gets root on Linux

USB2Shell is a Linux kernel vulnerability that turns an ordinary USB port into a root shell. Plug in a specially built device, let the kernel do its usual automatic scan, and the attacker ends up with a command running as root. Nobody has to log in, mount anything or click a single prompt. It’s tracked as CVE-2026-98232 and affects kernels from 6.5 onward that haven’t picked up a fix that landed upstream in September 2026.

You need physical access to pull this off, so it won’t sweep across the internet. But “physical access” covers a lot more than a locked server room: kiosks, shop-floor PCs, lab and classroom machines, digital signage, loaner laptops, anything with a USB port that somebody can reach for ten seconds. Drivesec, the team behind the exploit, published its write-up on November 30, and fixed kernels are already out for Ubuntu, Debian and RHEL. For most of you this is a patch-and-reboot job. For kiosks and shared machines, it’s also a good excuse to lock down USB for good.

CVE IDCVE-2026-98232 (“USB2Shell”)
AffectedLinux kernel 6.5 and later with USB mass storage (usb-storage or uas); bug in the SCSI core, scsi_cdl_enable()
Fixed upstream6.6.158, 6.12.112, 6.18.54, 7.2.8 and mainline 7.3
SeverityNo NVD score yet; Red Hat 8.4 (Important); SUSE 6.8 (Moderate); Ubuntu priority Medium
Attack vectorPhysical: a malicious USB device, no login or user interaction
Exploited in the wildNo known exploitation as of December 1, 2026
CISA KEVNot listed as of November 30, 2026
WorkaroundPartial: block usb-storage/uas or enforce USB authorization (USBGuard)
PublishedOctober 6, 2026 (CVE); November 30, 2026 (research write-up)

TL;DR: Run uname -r. If the kernel is 6.5 or newer, install your distro’s kernel update that lists CVE-2026-98232 and reboot into it. Debian 12’s default 6.1 kernel, the Ubuntu 22.04 GA kernel (5.15) and RHEL 8 aren’t affected. Can’t reboot yet? Block the usb-storage and uas modules or turn on USBGuard on any machine with a USB port strangers can reach.

What happened: the USB2Shell timeline

The bug went from discovery to public exploit write-up in about three months, and the fix was in the kernel long before the details went public. Here’s the sequence, based on Drivesec’s write-up, the kernel CNA advisory and the distro trackers:

DateEvent
Aug 26, 2026Drivesec finds the flaw in the SCSI core’s Command Duration Limits code
Aug 28, 2026Root command execution working on real hardware
Sep 2, 2026Reported privately to the Linux SCSI maintainers
Sep 9, 2026Fix committed upstream (it ships in 7.3-rc4 and the stable branches)
Oct 6, 2026CVE-2026-98232 published by the Linux kernel CNA
Nov 20–24, 2026Red Hat ships fixed kernels for RHEL 9 and RHEL 10
Nov 30, 2026Drivesec publishes the full write-up and a demo video

There’s an interesting side story. Google’s Sashiko, an AI code-review system that now runs against kernel patches, flagged the same bug on the linux-scsi mailing list. Drivesec says it found the issue on its own, wrote the fix and built the working exploit; the AI spotted the flaw, people turned it into root. Either way, it’s another reminder that the gap between “a bug is visible in public” and “someone has a weaponized version” keeps shrinking.

How the USB2Shell Linux kernel vulnerability works

Command Duration Limits (CDL) is a fairly new storage feature, added to Linux in 6.5, that lets the host give individual disk commands a time budget. When the kernel scans a new disk that says it supports CDL, a function called scsi_cdl_enable() asks the drive for a settings page and reads the answer into a 64-byte buffer on the kernel stack.

The problem: it trusted the length fields the drive sent back. A device that lies about those lengths can make the math wrap around, so the kernel’s pointer ends up outside that 64-byte buffer. Two things happen next. The kernel copies up to 64 bytes of its own stack back to the device, which leaks memory and helps defeat KASLR. And it clears the low two bits of one stack byte that the device gets to choose. That’s a tiny write, but Drivesec chained it into arbitrary kernel memory writes, built fake kernel structures and got an attacker-chosen command to run as root at the moment the device was unplugged.

Why does USB matter here? Because the usb-storage and uas drivers present USB drives to the kernel as SCSI disks. That means the vulnerable SCSI scan runs automatically the moment something is plugged in, before any user logs in and before anything is mounted. A locked screen, a logged-out session or a “never automount” policy doesn’t stop it.

The exploit isn’t perfect. Drivesec describes it as probabilistic, and its demo video shows two misses before the third attempt lands. The catch is that failed attempts don’t crash the machine, so an attacker can just keep trying. Their test rig was a Cynthion programmable USB tool against a stock Debian 6.12.22 backports kernel with KASLR enabled. Android phones on 6.6+ kernels are hit by the memory leak only; Google’s generic Android kernel and a Samsung Galaxy A16 kernel use compiler bounds checks that keep the write in bounds.

In my view the scary part isn’t the bug class. Stack length bugs are old news. It’s where this one runs: pre-authentication, during hardware enumeration, in code most of us treat as trusted by default.

Am I affected by CVE-2026-98232?

Work through the list below. If you tick the first box and any of the others, treat the machine as exposed until it’s patched.

Tick everything that applies to you

Any box ticked? Patch now. Ticks reset when you reload the page.

Start with the running kernel and whether the USB storage drivers are even in play:

Check the running kernel and USB storage drivers

uname -r
lsmod | grep -E 'usb_storage|uas'
# Built in? "=y" means you can't block it with modprobe
grep -E 'CONFIG_USB_STORAGE=|CONFIG_USB_UAS=' /boot/config-$(uname -r)

Version numbers alone won’t tell you much, because distros backport fixes into older-looking kernels. The reliable check is whether your vendor’s package changelog lists the CVE:

Debian / Ubuntu: look for the CVE in the installed kernel’s changelog

apt changelog linux-image-$(uname -r) 2>/dev/null | grep -m1 CVE-2026-98232 \
  || echo "CVE not found in changelog - check your distro advisory"

RHEL / AlmaLinux / Rocky: same idea with rpm

rpm -q --changelog kernel-core-$(uname -r) | grep -m1 CVE-2026-98232 \
  || echo "CVE not found in changelog - check your distro advisory"

Drivesec also publishes a check script on its site. It’s a reasonable first pass, but it can miss vendor backports, so treat its output as a hint rather than proof, and read any script before you run it as root. The table below summarizes the fixed versions I could confirm on December 1, 2026:

Distribution / branchFixed inReference
Upstream 6.6 LTS / 6.12 LTS6.6.158 / 6.12.112Kernel CNA advisory
Upstream 6.18 / 7.2 / mainline6.18.54 / 7.2.8 / 7.3Kernel CNA advisory
Ubuntu 26.04 LTS7.0.0-42.42Ubuntu CVE tracker
Ubuntu 24.04 LTS (GA / HWE 7.0)6.8.0-149.149 / 7.0.0-42.42~24.04.1Ubuntu CVE tracker
Ubuntu 22.04 LTSGA 5.15 not affected; HWE 6.8 fixed in 6.8.0-149.149~22.04.1Ubuntu CVE tracker
Debian 13 (trixie)6.12.113-1DSA-6568-1
Debian 12 (bookworm)Default 6.1 kernel not affected; linux-6.12 backport fixed in 6.12.113-1~deb12u1DLA-4850-1
RHEL 10 / RHEL 9FixedRHSA-2026:102168 / RHSA-2026:100662
RHEL 8Not affectedRed Hat CVE page
SUSEFix pending at time of writingSUSE CVE page

Ubuntu’s cloud and OEM kernels (linux-aws, linux-azure and friends) carry their own version numbers, so check the Ubuntu CVE page for your exact flavor.

Disclaimer: These steps are general guidance based on the vendors’ published advisories and are provided as-is. Every environment is different: test in a staging environment, take a full backup or snapshot first, and follow the vendor’s official documentation. SysOpsTechnix accepts no responsibility for outages, data loss or other damage resulting from applying these steps. See our Terms of Use.

How to fix USB2Shell: update the Linux kernel and reboot

USB2Shell patch flow: check the Linux kernel version, back up, update, reboot and verify the CVE-2026-98232 fix

There’s no clever configuration fix here. The bug lives in the kernel, so the only complete fix is a kernel that contains the patch, running. Upstream’s advice is to move to the latest stable release rather than cherry-picking the single commit, and that’s what the distros have done.

1. Back up and make sure you can get back in

Snapshot the VM or take a backup. More importantly for a kernel update, confirm you have out-of-band access (IPMI, iDRAC, iLO or your cloud provider’s serial console) in case the new kernel doesn’t come up cleanly. Keep the previous kernel installed so you can pick it from GRUB.

2. Install the fixed kernel

Ubuntu and Debian

sudo apt update
sudo apt full-upgrade
# or just the kernel meta-package, e.g. on Ubuntu:
sudo apt install --only-upgrade linux-image-generic

RHEL, AlmaLinux, Rocky Linux

sudo dnf upgrade --refresh 'kernel*'

SUSE / openSUSE (once the update is released)

sudo zypper refresh
sudo zypper patch

AlmaLinux and Rocky Linux rebuild Red Hat’s packages, so their fixed kernels follow RHEL’s. Confirm on their errata pages before you assume the update has reached your mirror. If you run your own kernel builds, move to 6.6.158, 6.12.112, 6.18.54, 7.2.8 or a later release on your branch.

3. Reboot into the new kernel

An installed kernel does nothing until you boot it. If you use live patching (Canonical Livepatch, kpatch or similar), check whether your provider explicitly covers CVE-2026-98232 before you skip the reboot; I couldn’t confirm live-patch coverage at the time of writing.

Check whether a reboot is pending, then reboot

# Debian/Ubuntu
[ -f /var/run/reboot-required ] && cat /var/run/reboot-required
# RHEL family
sudo dnf needs-restarting -r
sudo systemctl reboot

4. Verify the fix

Confirm the running kernel picked up the patch

uname -r
# Debian/Ubuntu
apt changelog linux-image-$(uname -r) 2>/dev/null | grep -m1 CVE-2026-98232
# RHEL family
rpm -q --changelog kernel-core-$(uname -r) | grep -m1 CVE-2026-98232

Then roll the same check across the fleet with whatever you already use (Ansible, Salt, your vulnerability scanner) so you’re not trusting a single test box. If you added the temporary USB blocks from the next section, decide deliberately whether to keep them. On kiosks and shared machines, I’d keep them. For more on locking down machines like these, see our guide on how to harden a small business server in a weekend.

Temporary mitigations if you can’t patch yet

Drivesec and the distros point to two interim measures: keep the USB storage drivers from loading where you don’t need them, and require approval before any new USB device gets a driver. Neither replaces the kernel update, but either one closes the door on machines with exposed ports.

Disable USB storage on Linux with modprobe

If nothing on the machine needs USB drives, stop usb-storage and uas from loading. This only works when they’re built as modules; if the config check above showed =y, skip to USBGuard.

/etc/modprobe.d/usb2shell-mitigation.conf

# Block USB mass storage until the CVE-2026-98232 kernel fix is installed
blacklist usb_storage
blacklist uas
install usb_storage /bin/false
install uas /bin/false

Unload the modules now and rebuild the initramfs

sudo modprobe -r uas usb_storage
# Debian/Ubuntu
sudo update-initramfs -u
# RHEL family
sudo dracut -f

This breaks every USB drive on the box, including backup disks and USB install media, so tell whoever relies on them first.

Allow-list USB devices with USBGuard

USBGuard keeps new devices unauthorized until a rule allows them, which means the storage driver never binds and the vulnerable scan never runs. Generate the starting policy with the keyboard, mouse and any other required devices plugged in, or you’ll lock yourself out of the console.

Install and enable USBGuard

# Debian/Ubuntu: sudo apt install usbguard
# RHEL family:   sudo dnf install usbguard
sudo sh -c 'usbguard generate-policy > /etc/usbguard/rules.conf'
sudo chmod 600 /etc/usbguard/rules.conf
sudo systemctl enable --now usbguard
sudo usbguard list-devices

For headless kiosks and appliances, the kernel’s own usbcore.authorized_default=0 boot parameter does something similar without a daemon: new USB devices stay unauthorized until something authorizes them through sysfs. It also blocks keyboards, so it’s only practical on machines nobody types on. And don’t forget the low-tech options: port blockers and disabling unused ports in firmware still work.

If you manage more than a handful of machines, push the modprobe file and the USBGuard policy out through configuration management rather than by hand, and alert if the usbguard service stops. A mitigation that quietly disappears after the next rebuild is worse than none, because everyone thinks the gap is closed.

Signs of compromise

No real-world attacks have been reported and there are no published indicators of compromise, so there’s no magic log line to grep for. What you can do is look for USB storage devices nobody remembers plugging in, especially on machines in public or semi-public spaces:

Review recent USB storage enumeration in the kernel log

sudo journalctl -k --since "2026-08-01" | grep -iE 'usb-storage|uas|Direct-Access'
# Older systems without a persistent journal
sudo grep -iE 'usb-storage|uas' /var/log/kern.log* /var/log/messages* 2>/dev/null

It’s also worth a quick look at what’s connected right now. Anything presenting itself as a disk on a kiosk or signage player that shouldn’t have one deserves a physical check. Small programmable boards can hide inside a keyboard, a hub or even a cable, so inspect the hardware, not just the logs.

List USB devices currently attached

lsusb
lsusb -t   # shows which driver (usb-storage, uas) each device is bound to

Cross-check what you find against who had physical access. Then look for the usual post-exploitation footprints: new local accounts or SSH keys, unexpected cron jobs or systemd units, new setuid binaries, and processes running as root that you can’t explain. Because the attacker’s command runs as root at unplug time, there may be nothing in the auth log at all.

If anything looks wrong, treat it as an incident rather than a patching task. Isolate the machine, image the disk for analysis, rebuild from known-good media onto a patched kernel and rotate any credentials or keys that lived on it. A root-level kernel compromise isn’t something you clean up in place.

USB2Shell FAQ

What is USB2Shell?

USB2Shell is the name Drivesec gave CVE-2026-98232, a Linux kernel vulnerability in the SCSI core’s Command Duration Limits code. A malicious USB device that pretends to be a CDL-capable ATA disk can leak kernel memory and, as Drivesec showed, get a command to run as root without anyone logging in.

Can USB2Shell be exploited remotely?

Not over the network. The attacker needs to connect a crafted USB device. Red Hat notes one more angle worth keeping in mind: anyone who can attach emulated storage devices to a virtual machine could reach the same code path inside the guest.

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

Kernels from 6.5 onward, until the fix. Upstream fixed it in 6.6.158, 6.12.112, 6.18.54, 7.2.8 and 7.3. Distribution kernels carry backports with their own numbering, so check your vendor’s advisory rather than the upstream version.

How do I disable USB storage on Linux?

Blacklist and block the usb_storage and uas modules in /etc/modprobe.d/, unload them and rebuild the initramfs, as shown above. If they’re built into the kernel, use USBGuard or the usbcore.authorized_default boot parameter instead.

Is my Android phone affected?

According to Drivesec, Android kernels 6.6 and newer are exposed to the memory leak but not the root exploit, because Google’s generic kernel and the Samsung kernel they tested use compiler bounds checks. Install your phone’s security updates as usual.

Does a locked screen protect me?

No. The bug fires during automatic device scanning, before any login or mount, so a locked or logged-out session makes no difference. Only a patched kernel or USB device control helps.

If you’re tracking this month’s other kernel issues, our write-ups on NFS2ROOT (CVE-2026-99362) and the KVM guest-to-host escape CVE-2026-99312 cover the same patch-and-reboot routine.

Sources

Related Articles

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.