Skip to content
Usb2shell Linux Kernel Flaw Lets

Usb2shell Linux Kernel Flaw Lets

thehackernews.com • December 1, 2026

A crafted USB device can make an unpatched Linux machine run an attacker's command as root, without anyone logging in, mounting a drive, or clicking anything, researchers at Drivesec showed yesterday.

The flaw, dubbed " USB2Shell ," is in the Linux kernel, which scans a USB storage device the moment it is plugged in, before anyone signs in. It was fixed in the kernel in September and published as CVE-2026-98232 in October, so only machines that have not taken the update are exposed.

The researchers ran the attack on one test machine, where it did not always work, and no real-world attacks have been found.

The flaw is in the kernel's SCSI core, in a function that turns on a storage feature called Command Duration Limits. When a USB device claims to be an ATA disk that supports the feature, the kernel copies information from the device into a small buffer on its stack. It uses the length values the device itself provides and does not check them against the buffer size.

Because this happens during the automatic scan that runs the moment a device is connected, a locked screen, a logged-out session, or a rule against mounting unknown drives does not stop it. The device is already talking to privileged kernel code before any of those protections apply.

A device that lies those lengths can read up to 64 bytes of kernel stack memory and change a single byte of it, according to the kernel advisory .

On their test machine, the researchers turned that single-byte change into the ability to write to any location in kernel memory. They defeated KASLR, which randomizes where kernel code sits so attackers cannot predict it, built fake kernel data structures, and made the device's chosen command run as root the moment it was unplugged.

The flaw was introduced in Linux 6.5 and is present in every release from 6.5 onward until the fix is applied. A system is only exposed if it has USB mass storage support, via the usb-storage or uas driver, and a USB port that someone can reach.

The researchers' technical write-up describes running the attack against a Debian machine running kernel 6.12.22, with KASLR switched on, using a Cynthion, a small programmable USB tool.

There is no published success rate. "While the exploit is probabilistic, no crash is triggered on failed executions," the researchers say, meaning a failed attempt does not crash the machine, and the attacker can try again.

Those upstream numbers do not map cleanly onto what distributions ship, because distributions backport both features and fixes. Debian's standard version 12 kernel never contained the flawed code, according to its security tracker , while Red Hat delivered the fix in a kernel it numbers 5.14. Check your own distribution rather than relying on the upstream number.

Update to a kernel that includes the fix, or backport the upstream fix commit . If you cannot update right away:

Stop the usb-storage and uas drivers from loading on machines that do not need to read USB storage.

Require devices to be approved before the kernel loads a driver for them, using USB allow-listing such as USBGuard or the authorized_default=0 setting.

The researchers offer a script to check a system, but it can miss fixes a vendor has backported, so treat its result as a hint rather than proof.

The bug was first flagged not by a person but by Sashiko, an AI code-review system Google built for the Linux kernel and gave to the Linux Foundation. Sashiko reported it on the kernel mailing list. Drivesec says it found the same flaw on its own, wrote the fix, and built the working exploit, and the AI did not write the exploit.

Google says Sashiko has been credited in 528 Linux kernel CVE fixes this year, according to a project retrospective , while cautioning that it is "too early to make strong claims" how much credit the tool deserves.

On Android, the researchers found only a memory leak, not root. Phone kernels on version 6.6 and newer are affected and hand the device some kernel memory, but the builds the researchers checked, including Google's generic Android kernel and the kernel on a Samsung Galaxy A16, use a compiler check that blocks the memory-changing step.

No attacks using the flaw have been found, and no victims have been identified. The flaw has not been added to the U.S. government's Known Exploited Vulnerabilities catalog as of publication. A physical attack is hard to carry out across many machines, and the fix has been available since September.

The researchers point to equipment where strangers can reach a USB port as the practical concern: self-service kiosks, payment terminals, car infotainment units, EV chargers, and smart- hubs. None has been shown compromised. They are examples of where an open port matters, not a list of affected products.

The full story

This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.

usb2shell: Malicious USB Device Can Gain Root on Unpatched Linux Kernels (CVE-2026-98232) Drivesec researchers published usb2shell, a proof-of-concept showing that a crafted USB device can execute commands as root on unpatched Linux systems during the kernel's automatic device scan, without login, mounting, or user action. The flaw, tracked as CVE-2026-98232, is in the SCSI core's Command Duration Limits handling, introduced in Linux 6.5, where device-supplied mode page lengths are used without validation, allowing a 64-byte kernel stack disclosure and a one-byte out-of-bounds write. The researchers defeated KASLR on a stock Debian 6.12.22 kernel using a Cynthion USB device and reported the exploit is probabilistic, with failed attempts not crashing the system. Systems are exposed if they run Linux 6.5 or later without the fix, include USB mass storage support (usb-storage or uas), and have a reachable USB port; the research names kiosks, EV chargers, point-of-sale terminals, and industrial panels as examples of such systems. Fixed releases are listed as 6.6.158, 6.12.112, 6.18.54, 7.2.8, and mainline 7.3, with upstream commit 3d676e458fe0; distributions may backport fixes without changing version numbers, so vendor advisories should be checked. Android kernels on 6.6 and later leak kernel memory, but the builds checked (Android GKI and Samsung Galaxy A16) use bounds checks that prevent the write. Reporting states no real-world attacks have been identified, and the exploit was demonstrated only on a test machine. 6 sources 70

Extracted Entities