Usb2shell: Root on Linux from a USB Plug-In
Source Entity
Hacker News

A critical stack out-of-bounds vulnerability, CVE-2026-98232, in the Linux SCSI core allows attackers to gain root access via malicious USB storage devices. Users are urged to update their kernels immediately or disable USB storage modules to mitigate the threat.
The Threat of Usb2shell: Understanding CVE-2026-98232
The recent discovery of CVE-2026-98232, dubbed "Usb2shell," marks a significant concern for Linux security, demonstrating how a seemingly benign action—plugging in a USB storage device—can lead to total system compromise. This vulnerability exists within the Linux SCSI core, specifically in the scsi_cdl_enable() function. When the kernel automatically scans a newly connected device, this out-of-bounds bug is triggered, exposing the system to potential exploitation.
Technical Mechanics of the Exploit
At its core, the vulnerability allows an attacker to read up to 64 bytes of kernel stack memory and overwrite a single byte on the stack. While this may sound limited, researchers have successfully leveraged this primitive to achieve root command execution on a stock Debian kernel. This exploit remains effective even with Kernel Address Space Layout Randomization (KASLR) enabled, which is typically a robust defense against memory corruption attacks. The attack vector requires only brief physical access to a USB port, making it a potent tool for local adversaries.
Scope and Impact
The vulnerability affects Linux kernels starting from version 6.5. Because the Linux SCSI core is fundamental to the operating system's interaction with external storage, the attack surface is vast. Any system that supports automatic scanning of USB storage devices is inherently at risk. This includes everything from enterprise servers and desktop workstations to embedded systems and IoT devices running affected kernel versions.
Mitigation and Remediation
The primary defense against Usb2shell is a kernel update. The vulnerability has been addressed in versions 6.6.158, 6.12.112, 6.18.54, 7.2.8, and 7.3. For organizations or users who cannot immediately apply these updates, the recommended workaround is to prevent the automatic loading of the usb-storage and uas (USB Attached SCSI) kernel modules. By blacklisting these drivers, administrators can effectively neutralize the risk of the kernel triggering the vulnerable code path during device enumeration.
Broader Security Implications
This exploit highlights the persistent danger of "BadUSB"-style attacks, where hardware interfaces serve as conduits for kernel-level compromises. It underscores the necessity of strict physical access controls and the importance of hardening kernel interfaces that handle untrusted input. As the Linux ecosystem continues to grow, the complexity of the SCSI subsystem remains a frequent target for researchers looking for memory safety issues. Users are encouraged to prioritize kernel patching as part of their standard security hygiene to prevent exploitation by similar future vulnerabilities.