usb2shell Linux Root Flaw: Should You Disable USB Ports?

usb2shell Linux Root Flaw: Should You Disable USB Ports?

usb2shell (CVE-2026-98232) is a Linux kernel bug where a malicious USB storage device can run a command as root while the kernel scans it, with no login, mount or click. The fix is a kernel update plus a reboot, not switching off ports. My opinion: patch first, and only use USB allow-listing as a stopgap on machines you can't update yet.

If you run Linux on shared computers, this one is worth an afternoon. The fix is already out, so the job is mostly checking kernels and rebooting.

Everything here comes from the public usb2shell.com write-up (30 November 2026) and the Debian security tracker. I have not tested the flaw myself. I also found no advisory from Ugandan or East African bodies as of December 2026, so the local angle below is my reasoning, not a quoted source.

What is the usb2shell flaw, in plain words?

CVE-2026-98232 is a stack out-of-bounds bug in the Linux SCSI core, in a function called scsi_cdl_enable(). A malicious USB storage device can trigger it during the kernel’s automatic device scan. According to usb2shell.com, that can end with a command running as root, with no login, mount or click.

The device lies about what it is. It claims to be an ATA drive that supports Command Duration Limits. The kernel reads data from it into a 64-byte buffer and trusts the length values the device supplies.

That lets the device leak up to 64 bytes of kernel stack and overwrite one stack byte at an offset it chooses. The researchers chain this with a way around KASLR (kernel address randomisation) to get a controlled write. Debian’s tracker says a proof of concept ran a command in a QEMU guest and created a root-owned file during enumeration.

Severity ratings vary. Tenable lists it as high and TuxCare gives CVSS 8.4, but I only saw those as search snippets: Tenable, TuxCare.

Does this matter for cyber cafes, schools and offices?

It matters wherever a Linux machine lets other people plug in their own USB devices. That could be a cafe, a school lab or a front desk PC. This is my reasoning, not a finding from the sources.

The write-up describes a malicious USB device, so the attacker needs to get one into a port. Treat a locked screen as no protection, because the bug fires during the automatic scan.

Windows PCs are not affected by this one. It is a Linux kernel bug. Many Ugandan cafes and offices run Windows, so check what your machines actually run before you worry.

Is every Linux machine affected?

No. Three things to know:

  • Version range: usb2shell.com says Linux 6.5 and later. Debian’s tracker says the flaw was present in 7.3-rc1. Don’t try to settle that. Just check whether your kernel has the fix (next section).
  • Debian bookworm: the tracker marks it “not affected” because the vulnerable code is not present. Trixie and unstable are the ones with fixes listed.
  • Android: the write-up says that in the builds tested (Android GKI and the Samsung Galaxy A16 kernel) it is only a leak, because compiler bounds checks block the write. It says nothing about Tecno or Infinix phones.

I could not find Ubuntu, RHEL, Fedora or Raspberry Pi OS status in my sources. Red Hat’s bug entry exists, so look there if you run RHEL-family systems.

How do I fix it?

  1. Find your kernel version. Run uname -r.
  2. Compare it with the fixed kernels. usb2shell.com lists 6.6.158, 6.12.112, 6.18.54, 7.2.8 and 7.3 mainline.
  3. Check your distro’s advisory for CVE-2026-98232. Vendors may backport the fix without changing the version number, so a low number does not always mean you are exposed.
  4. Update the kernel with your distro’s normal tools, then reboot. The new kernel does nothing until you boot into it.

On Debian trixie, the tracker lists a fix in 6.12.113-1 (DSA-6568-1) and a security update at 6.12.118-1. Either way, 6.12.118-1 or newer is past both. Unstable is fixed in 7.3.6-1.

The upstream fix is commit 3d676e458fe0, “scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()”. Debian gives the full hash: 3d676e458fe0c566f5a62753dc696b6a862fc412.

Practical tip for a metered connection: kernel updates are a download. If you manage several identical machines, update one first and confirm it boots cleanly. Reboot during a quiet hour, not mid-session in a cafe.

What can I do if I can’t patch yet?

usb2shell.com gives two groups of mitigation, both only for the gap before you update:

  • Keep usb-storage and uas out. Don’t build or auto-load them where mass storage isn’t needed.
  • Allow-list USB devices. Use USBGuard or authorized_default=0.

USBGuard is a Linux-only framework that allows or blocks USB devices by their attributes, using the kernel’s USB authorisation feature. The README gives these commands:

sudo sh -c 'usbguard generate-policy > /etc/usbguard/rules.conf'
sudo systemctl enable usbguard.service

Here is my caution, and it is my own advice. The policy is built from what is plugged in when you run it, so run it with only your keyboard and mouse connected. I did not get the allow-device command or the default-policy setting from the docs. So do not roll this out on a shared PC you can’t reach another way. Try it on one test machine with SSH access first.

For the module block and authorized_default=0, the sources give no exact syntax. Use your distro’s documentation instead of guessing.

Should I disable USB ports on shared computers?

My opinion: patch first. A kernel update closes the hole, and the sources list allow-listing only as a stopgap. They don’t say to disable ports.

If your cafe or lab depends on customers’ flash drives, switching off ports costs you business for a bug that has a fix. Where a machine doesn’t need storage at all, such as a reception PC, blocking storage is a reasonable choice. Again, that is my view, not something the write-up recommends.

What are the common mistakes?

  • Thinking it needs a click or a mount. The scan is automatic, so a locked screen or disabled auto-mount doesn’t help, per usb2shell.com.
  • Trusting the version number alone. Backports mean you must check the vendor advisory.
  • Assuming all Linux is equally exposed. Debian bookworm is “not affected”, and Android was only a leak in the tested builds.
  • Mixing it up with other USB flaws. The pam_usb bugs, CVE-2026-44712 and CVE-2026-44713, are unrelated and fixed in pam_usb 0.8.7, per Tenable and Mend.io (search snippets only).
  • Updating but not rebooting. The old kernel keeps running.

Is anyone exploiting it?

I can’t say. A write-up with a proof of concept is public. TheHackerWire showed no confirmed exploit and no CISA KEV listing when it was indexed, but that predates the 30 November write-up. Plan as if the technique is public.

Frequently asked questions

What is CVE-2026-98232?

It is a stack out-of-bounds bug in the Linux SCSI core, nicknamed usb2shell. A malicious USB storage device can trigger it during the automatic device scan and potentially run a command as root.

Do I need to open or mount the USB drive to be hit?

No. According to usb2shell.com, it needs no login, mount or click, because it fires during the kernel's automatic scan.

Is Windows affected by usb2shell?

The sources describe a Linux kernel bug and don't mention Windows or macOS.

Which kernels have the fix?

usb2shell.com lists 6.6.158, 6.12.112, 6.18.54, 7.2.8 and 7.3 mainline. Vendors may backport the fix without changing the version number, so check your distro's advisory.

Is USBGuard a replacement for patching?

No. The sources treat allow-listing as a stopgap. The fix is the kernel update and a reboot.

Sources

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *