Category
News
Published
Reading time
3 minutes
Discussion
No comments yet

News

usb2shell: A Rigged USB Device Gets Root on Linux

A rigged USB device can make Linux systems from kernel 6.5 onward run a command as root without anyone clicking anything. Current kernels are fixed, and you can check older ones with a few commands.

The usb2shell.com website in Firefox in front of a purple and blue wallpaper, with the address bar, the usb2shell lettering and the ID CVE-2026-98232 in focus.

Security researchers at the Italian company Drivesec have disclosed a vulnerability in the Linux kernel under the name usb2shell. A rigged USB device is all it takes to run a command with root privileges on an unpatched machine. Nobody has to log in, mount a drive or click anything. Kernels from version 6.5 onward are affected, and the vulnerability is tracked as CVE-2026-98232.

The bug sits in the automatic detection of mass storage devices. If a device poses as a hard drive with a certain extra feature, the kernel takes length values from its reply without checking them. That lets the device see parts of kernel memory and overwrite a single byte. Drivesec turned this into an attack that runs a command as root on Debian when the device is unplugged. By the way, the first to report the bug on the kernel mailing list was an AI code review tool.

Drivesec is thinking less about desktops than about devices whose USB ports strangers can reach: car infotainment, EV chargers, point-of-sale terminals, kiosks or industrial controls. The bug has been fixed since September, and the first safe kernels are 6.6.158, 6.12.112, 6.18.54, 7.2.8 and 7.3. Distributions often backport fixes without changing the version number, though. So the version is only a first hint.

Terminal2 lines
uname -r
7.3.6-arch1-1

If you run Arch Linux like I do (in German), you got the fixed kernel a while ago. My notebook with Arch Linux, my home server and a notebook with TUXEDO OS all run kernel 7.3 and are therefore safe. For older kernels, Drivesec offers a short check script. Read it before you run it: it only compares the version number and looks for drivers for USB mass storage.

Terminal3 lines
curl -fsSLO https://usb2shell.com/tools/usb2shell-check.sh
less usb2shell-check.sh
sh usb2shell-check.sh

If there’s no new kernel in sight and a device doesn’t need USB sticks or drives, you can block the two mass storage drivers for good. The following command does that, but from the next reboot on, your own sticks won’t work there either. Alternatively, USBGuard only lets in devices you have approved beforehand and blocks everything unknown.

Terminal
printf 'install usb-storage /bin/false\ninstall uas /bin/false\n' | sudo tee /etc/modprobe.d/usb2shell.conf

It just goes to show that IT security doesn’t start with the software. If you build devices for public spaces, you also have to make sure that their inputs and interfaces aren’t publicly accessible. That’s easy enough with a kiosk. With car infotainment or a photo printer at the drugstore, where customers are supposed to plug in their sticks in the first place, it gets harder, if not impossible.

Comments

Nothing here yet.

Leave a Reply

Your email address will not be published.

Markdown is supported: **bold**, _italic_, [link text](URL), `Code`, lines starting with - for lists, 1. for numbered lists, triple backticks for code blocks.

Security check: runs automatically, nothing for you to do.

Lines are wider than the screen. Turn your phone sideways to see more – or switch on Wrap.

Linux und Ich — usb2shell: A Rigged USB Device Gets Root on Linux
https://linuxundich.de/en/usb2shell-linux-kernel-usb-vulnerability-root/ — printed on December 1, 2026