USB2Shell Linux Kernel Flaw Can Enable Pre-Login Privileged Code Execution via Malicious USB

· Original article ↗

Summary

USB2Shell (CVE-2026-98232) is a Linux kernel flaw in USB storage handling. Malformed device-supplied lengths can trigger out-of-bounds access; a build-specific proof of concept achieved privileged execution. The article details fixes and mitigations.

Key points

  • In the kernel SCSI storage subsystem, scsi_cdl_enable() trusts device-supplied length fields when processing Command Duration Limits data in a 64-byte stack buffer.
  • Malformed lengths can cause arithmetic underflow and out-of-bounds access, potentially disclosing kernel stack memory and altering a byte beyond the intended buffer.
  • The kernel CVE announcement documents a proof of concept that achieved privileged command execution with kernel address randomization and non-executable memory protections enabled; results depend on the build and environment.
  • A vulnerable kernel must be reachable by an attacker-controlled storage device. The scan can occur before sign-in or drive mounting, so a locked screen or disabled automount does not prevent processing.
  • Upstream fix points include 6.6.158, 6.12.112, 6.18.54, 7.2.8 and 7.3. Distribution fixes vary by package, kernel flavor and support stream; use the applicable vendor advisory.
  • Until updates are available, the article recommends restricting USB device authorization with controls such as USBGuard, considering disabling USB storage drivers where feasible, and limiting physical access to exposed ports.
  • After updating, reboot into the corrected kernel and verify the running build. For appliances, check the manufacturer's firmware fix status; device identifiers alone do not authenticate USB hardware.

Article Details

Vulnerability Types
  • Integer underflow
  • Out-of-bounds read
  • Out-of-bounds write
Exploitation Status
unknown
Exploit Availability
public_poc
Patch Status
available
Workarounds
  • Use USBGuard or Linux USB authorization policies to block newly attached devices unless explicitly approved.
  • Where USB storage is unnecessary, assess disabling the usb-storage and uas drivers.
  • Restrict physical access to exposed USB ports while updates are pending.

MITRE ATT&CK

CVE

Vendors

Products

Tools

Industries

Related Articles