usb2shell (CVE-2026-98232): Check the Running Kernel
usb2shell (CVE-2026-98232) affects Linux 6.5 and later. Compare the running kernel's package version with the Debian and Ubuntu fixed versions, then reboot.
CVE-2026-98232 is a flaw in the kernel's SCSI code. When a USB storage device is plugged in, the automatic scan can read and write outside a 64-byte stack buffer. No mount or userspace access is needed. The researchers who disclosed it named it usb2shell and claim it leads to root command execution. The kernel CVE text says a QEMU test created a UID 0 owned marker file. An attacker needs physical access to a USB port; Ubuntu rates the CVSS 4.0 attack vector PHYSICAL and the priority medium. This page covers defense only. The vulnerable behavior was not reproduced. Kernel CNA record · Researcher page
[1] Check the affected range. The CNA record treats kernels 6.5 and later without the fix as affected, and lists the first fixed release per branch.
| Upstream branch | First fixed release |
|---|---|
| 6.6 | 6.6.158 |
| 6.12 | 6.12.112 |
| 6.18 | 6.18.54 |
| 7.2 | 7.2.8 |
| 7.3 and later | 7.3 |
Kernels older than 6.5 (the 6.1 kernel in Debian 12, the 5.15 kernel in Ubuntu 22.04) do not contain the code. The researchers say a system is exposed when usb-storage or uas is built in or loaded automatically. Judge a distribution kernel by its package version, not the upstream number. The table above has no 6.8 line for Ubuntu 24.04, so use the distribution tracker versions below for 6.8.
[2] Get the name of the running kernel and read the version of that package. The installed kernel and the running kernel can differ, so start with uname.
$ uname -runame -r looks like 6.12.113+deb13-amd64 on Debian and 6.8.0-149-generic on Ubuntu. Put linux-image- in front of it to get the package name, then read the version from the package.
$ dpkg-query -W "linux-image-$(uname -r)"The same field from the trixie package index (not from an installed server):
$ apt-cache show linux-image-6.12.113+deb13-amd64 | grep -E '^(Package|Version):'Package: linux-image-6.12.113+deb13-amd64Version: 6.12.113-1If dpkg-query finds no package, that does not mean the system is safe. It means you could not check. Cloud, OEM and self-built kernels use other package names. The Ubuntu tracker lists a separate fixed version for each kernel package, such as linux-aws, so do not judge those kernels by the generic version.
$ dpkg-query -W linux-image-6.12.113+deb13-amd64; echo "exit=$?"dpkg-query: no packages found matching linux-image-6.12.113+deb13-amd64exit=1dpkg-query shows the version of the package installed on disk. If a package with the same name was updated after the last boot, the running kernel may be older. Compare the boot time with the install and upgrade records for kernel packages.
$ uptime -s$ grep -hE ' (install|upgrade) linux-image-[0-9]' /var/log/dpkg.logEach record lists the date, time, action, package, old version and new version. The record below has the same format. It comes from installing and reinstalling a small package (tree) in a container. A reinstall is logged as upgrade even when the version is the same. [--log in dpkg(1)](https://manpages.debian.org/trixie/dpkg/dpkg.1.en.html)
$ grep -hE ' (install|upgrade) tree' /var/log/dpkg.log…2026-11-30 22:19:14 upgrade tree:amd64 2.2.1-1 2.2.1-1If the last record for the package that matches uname -r is later than the boot time, do not rely on the dpkg-query version. Reboot and check again. No record does not mean the package was not updated; it means nothing was found in this file. Older records may have moved to /var/log/dpkg.log.1 or a compressed file.
On Ubuntu 24.04, /proc/version_signature shows the running kernel's version in a form such as Ubuntu 6.8.0-149.149-generic … (only the format was checked on a real system). Drop the trailing -generic and compare 6.8.0-149.149 with the version in step [3]. Do not rely on this value alone for packages whose version ends in a suffix such as ~24.04.1, including HWE kernels.
[3] Compare the version you read with the fixed version. The first fixed versions below come from each tracker.
| Distribution | Package | Fixed version | Source |
|---|---|---|---|
| Debian 13 trixie | linux | 6.12.113-1 | Debian tracker (DSA-6568-1) |
| Debian 12 bookworm | linux (6.1, default kernel) | not affected (code not present) | Debian tracker |
| Debian 12 bookworm | linux-6.12 (linux-image-6.12-amd64) | 6.12.113-1~deb12u1 | Debian tracker (DLA-4850-1) |
| Ubuntu 24.04 | linux | 6.8.0-149.149 | Ubuntu CVE record |
| Ubuntu 24.04 | linux-hwe-7.0 | 7.0.0-42.42~24.04.1 | Ubuntu CVE record |
| Ubuntu 26.04 | linux | 7.0.0-42.42 | Ubuntu CVE record |
| Ubuntu 22.04 | linux (5.15, default kernel) | not affected | Ubuntu CVE record |
| Ubuntu 22.04 | linux-hwe-6.8 | 6.8.0-149.149~22.04.1 | Ubuntu CVE record |
Do not guess the kernel line from a metapackage name. The same linux-image-amd64 points to 6.12 on trixie and to 6.1 (candidate 6.1.192-3) on bookworm.
$ apt-cache depends linux-image-amd64 | sed -n 1,2plinux-image-amd64 Depends: linux-image-6.12.118+deb13-amd64Compare versions with dpkg --compare-versions, not string order. Inside the same 6.12 line, 90 is older than 113, but it sorts after it as a string.
$ [[ 6.12.90-1 > 6.12.113-1 ]] && echo "string order: 6.12.90-1 sorts after 6.12.113-1"; dpkg --compare-versions 6.12.90-1 lt 6.12.113-1 && echo "dpkg: 6.12.90-1 is older than 6.12.113-1"string order: 6.12.90-1 sorts after 6.12.113-1dpkg: 6.12.90-1 is older than 6.12.113-1Several kernel packages from the trixie index compared with 6.12.113-1. ge means the fixed version or newer, lt means older.
$ for p in linux-image-6.12.90+deb13-amd64 linux-image-6.12.111+deb13-amd64 linux-image-6.12.113+deb13-amd64 linux-image-6.12.118+deb13-amd64; do v=$(apt-cache show "$p" | awk "/^Version:/{print \$2; exit}"); if dpkg --compare-versions "$v" ge 6.12.113-1; then r=ge; else r=lt; fi; echo "$p $v $r"; donelinux-image-6.12.90+deb13-amd64 6.12.90-1 ltlinux-image-6.12.111+deb13-amd64 6.12.111-1 ltlinux-image-6.12.113+deb13-amd64 6.12.113-1 gelinux-image-6.12.118+deb13-amd64 6.12.118-1 geUbuntu 24.04 works the same way. uname -r shows 6.8.0-149-generic without the trailing .149, so compare the full package version (6.8.0-149.149).
$ for p in linux-image-6.8.0-134-generic linux-image-6.8.0-147-generic linux-image-6.8.0-149-generic linux-image-6.8.0-151-generic; do v=$(apt-cache show "$p" | awk "/^Version:/{print \$2; exit}"); if dpkg --compare-versions "$v" ge 6.8.0-149.149; then r=ge; else r=lt; fi; echo "$p $v $r"; donelinux-image-6.8.0-134-generic 6.8.0-134.134 ltlinux-image-6.8.0-147-generic 6.8.0-147.147 ltlinux-image-6.8.0-149-generic 6.8.0-149.149 gelinux-image-6.8.0-151-generic 6.8.0-151.151 geOn Debian 12 servers that use the linux-6.12 line, compare with 6.12.113-1~deb12u1 in the same way.
[4] If the version is older than the fixed one, update the kernel and reboot. A plain apt-get upgrade can hold back a new kernel package that has a different name, so read the plan first and allow new packages. The details are in the Debian 13.8 update guide.
$ sudo apt-get update$ sudo apt-get -s --with-new-pkgs upgrade$ sudo apt-get --with-new-pkgs upgradeAfter the install, the old kernel keeps running until the reboot. Reboot in a maintenance window, then repeat steps [2] and [3]. The boot time should be later than the kernel's install or upgrade time, and the running kernel's package version should be the fixed one or newer. If only a package with the same name was updated, uname -r may not change. To see whether a new kernel is waiting, see needrestart after an Ubuntu security update.
[5] Reduce exposure only while you must wait. These are not fixes, and the commands below were not tested here. On a remote server, secure console access (IPMI, KVM or the cloud console) first.
First check whether usb-storage and uas are loaded or built in.
$ lsmod | grep -E '^(usb_storage|uas) '$ grep -E 'usb-storage|/uas' /lib/modules/$(uname -r)/modules.builtinBlocking automatic loading does not work for built-in drivers or modules that are already loaded. For modules, create a file in /etc/modprobe.d/.
install usb-storage /bin/falseinstall uas /bin/falseblacklist tells modprobe to ignore a module's own device aliases; the man page does not say it stops loading by name. install module command runs the command instead of inserting the module. modprobe.d(5) This setting disables USB storage, so do not apply it to servers that boot from USB or use USB backup or root devices. To undo it, delete the file and reboot.
The other option is the kernel's USB authorization. Writing 0 to authorized_default of a host controller usbX leaves newly connected devices unauthorized until root authorizes them. Value 2 authorizes by default only devices on internal ports. Kernel documentation
Record the current values before you change them. Run these commands as root.
# grep . /sys/bus/usb/devices/usb*/authorized_default# for host in /sys/bus/usb/devices/usb*; do echo 0 > "$host/authorized_default"; doneThe documentation says only devices that root authorizes can be used, so a newly connected USB keyboard or mouse does not work until you authorize it. To undo the change, write the original value you recorded back to each controller (do not assume they were all 1). This value is the default for newly connected devices, so authorize a device that is already blocked by writing 1 to /sys/bus/usb/devices/<device>/authorized. The documentation's example writes the value from a boot script (rc.local) and authorizes devices with udev. Making the setting persistent was not tested. USBGuard, an allow-list tool, says it works on top of the same kernel feature; it was not tested either.
Where the check goes wrong
uname -rinside a container shows the host kernel. Judge a container by the kernel of its host.- The checker script on the researcher page was not downloaded or run, and this guide does not use it. Do not pipe a downloaded script straight into a shell.
- The fixed-version table was read on 2026-12-01. Versions can change, so look at the trackers again before you apply it.