blog

A USB stick can get root on newer Linux machines. Check the ones people can reach

If you have a Linux machine somewhere people can get to it (a server in the office cupboard, a till, a kiosk, a Linux laptop), check it has had a kernel update and a reboot since October. A flaw published in full yesterday lets a USB stick take it over just by being plugged in.

Your cloud servers are almost certainly fine. Nobody can walk up to them with a USB stick.

What happened

On 30 November an Italian security firm, Drivesec, published a write-up called Usb2shell. It describes CVE-2026-98232, a bug in the part of the Linux kernel that talks to storage devices. It's on the Hacker News front page today, which is usually when people start paying attention.

In plain English, when you plug in a USB drive, Linux asks it a few questions to work out what it is. A specially built device can give answers that confuse the kernel, and Drivesec showed it could use that to "run a command of its choice as root". Root is full control of the machine.

The worrying part is how little it needs. The page says "No user interaction or mount is needed". Nobody has to log in, open a file or click anything. It fires during the kernel's automatic check of a new device, so a machine sitting at a login screen, or with no screen at all, is still in scope.

The good news is that, according to Drivesec's timeline, it was reported privately in early September and fixed in the kernel a week later. The distributions have had fixes out for a while. What's new is the full public write-up, which makes building the device easier.

Does it affect you?

You're in scope if all three of these are true.

The machine runs Linux 6.5 or later. The code with the bug arrived in 6.5, so older kernels don't have it. That rules out a lot of small business servers:

  • Ubuntu 22.04 and 20.04 on their standard kernels are listed as not affected. Ubuntu 22.04 with the newer "HWE" kernel is affected and fixed.
  • Ubuntu 24.04 is affected and fixed in kernel 6.8.0-149. Ubuntu 26.04 is fixed in 7.0.0-42.
  • Debian 12 on its standard 6.1 kernel doesn't have the vulnerable code, according to Debian's security tracker. If someone put the newer 6.12 kernel on it, it's affected and needs updating. Debian 13 is affected and fixed.

USB storage support is switched on. On a normal install it is.

Someone could plug something in. This is the one that matters most. Drivesec's own list of exposed devices includes point-of-sale terminals and kiosks. I'd add the server under the desk, the Linux box running the CCTV, and any office machine in a room visitors pass through.

What to do this week

1. Make a list. Which Linux machines do you have that aren't in a data centre?

2. Check the kernel on each one. Log in and run:

uname -r

That shows the kernel running now. If it's below 6.5, this flaw isn't your problem. If it's 6.5 or above, compare it with the fixed versions on your distribution's page above. Bear in mind distributions often backport fixes without changing the main version number, so the full package version matters, not just the first two numbers.

3. Update and reboot. On Ubuntu and Debian:

sudo apt update && sudo apt full-upgrade

Then reboot. A new kernel does nothing until you restart, and that's the step people skip.

4. If you can't update yet, stop USB storage loading. Drivesec's advice is to stop the usb-storage and uas modules loading where you don't need them. This is my suggestion for how, rather than theirs. Create a file called /etc/modprobe.d/no-usb-storage.conf containing:

install usb-storage /bin/false
install uas /bin/false

Then reboot. Be careful with this one. If that machine backs up to a USB drive, the backups will stop. Keyboards and mice still work, because they don't use those modules.

5. Think about the ports themselves. A locked cupboard or a locked room does more for this than any setting. If the till is on the shop floor, a USB port blocker costs a few pounds.

The bigger point

Drivesec's page credits an AI review tool with first reporting the bug on the kernel mailing list, and says Drivesec found it independently. That fits a pattern. Dev Partners wrote recently about Linux handling a wave of AI-found bug fixes, and more of these will turn up in hardware-level code that hasn't had much attention.

Most of what I write here is about attacks over the internet. This one is a reminder that "physical access" can just mean a visitor, or a found USB stick someone plugs in to see whose it is.

The fix is boring. Know which machines you have, keep them updated, reboot them, and keep the ones that matter behind a locked door. If the office server also runs a bespoke app your business relies on, the team at Dev Partners look after existing software and the updates underneath it.

And if you'd like someone to go round the office and list what's plugged in where, that's part of what I do with office networks and servers.