usb2shell-check CVE-2026-98232
Linux Kernel · SCSI Core (scsi_cdl_enable) • Physical USB Vector

usb2shell & CVE-2026-98232

A stack out-of-bounds vulnerability in the Linux kernel's SCSI Command Duration Limits (CDL) initialization routine, triggered automatically when a USB mass storage device is plugged in—requiring no user login, mount action, or interaction.

bash — usb2shell-check.sh
      ▌  ▞▀▖   ▌     ▜▜      ▌        ▌  
▌ ▌▞▀▘▛▀▖ ▗▘▞▀▘▛▀▖▞▀▖▐▐▄▄▖▞▀▖▛▀▖▞▀▖▞▀▖▌▗▘
▌ ▌▝▀▖▌ ▌▗▘ ▝▀▖▌ ▌▛▀ ▐▐   ▌ ▖▌ ▌▛▀ ▌ ▖▛▚ 
▝▀▘▀▀ ▀▀ ▀▀▘▀▀ ▘ ▘▝▀▘ ▘▘  ▝▀ ▘ ▘▝▀▘▝▀ ▘ ▘

Version: v1.0.0
By: @Pauloxc6
[*] Checking Connection With: usb://host@linux
[+] Not Vulnerable!

Vulnerability Overview

Summary based on the official technical disclosure at usb2shell.com

PoC Demonstration · Cynthion + Debian Kernel Open MP4 ↗
01 · Affected Scope

Linux 6.5 and Newer

Command Duration Limits (CDL) support was introduced in Linux 6.5. Unpatched kernels from 6.5 up to the fixed stable releases are exposed during automatic SCSI device probing.

02 · Attack Vector

Physical USB Access

Requires brief physical access to an active USB port on systems with usb-storage or uas enabled (kiosks, POS terminals, EV chargers, automotive IVI, industrial HMIs).

03 · Impact

Stack Leak & Root Exec

Leaks up to 64 bytes of kernel stack memory (defeating KASLR) and clears 1 stack byte at a controlled offset, chained to achieve root command execution on unhardened kernels.

Interactive Audit Tool

Kernel Version & Exposure Simulator

Enter the output of uname -r and your host USB configuration to evaluate CVE-2026-98232 exposure.

Presets:

Upstream Fixed Releases

Kernel Branch First Patched Release Status / Notes
< 6.5 Not Affected SCSI CDL support was introduced in Linux 6.5
6.6.y (LTS) 6.6.158 Stable backport (39491a1ae930)
6.12.y (LTS) 6.12.112 Stable backport (60b0b8ce803e)
6.18.y 6.18.54 Stable backport (6233d0b3ef46)
7.2.y 7.2.8 Stable backport (99a6e4a9176d)
mainline 7.3+ Upstream fix commit 3d676e458fe0
Deep Dive

Root Cause in scsi_cdl_enable()

When a USB device presents itself as an ATA device supporting Command Duration Limits, the kernel reads a MODE SENSE page into a 64-byte stack buffer without validating the device-supplied header lengths.

drivers/scsi/scsi.c Unvalidated MODE SENSE lengths
/* 64-byte stack buffer */
unsigned char buf[64];

/* Unsigned underflow wraps to a large value -> clamped to 64 */
len = min_t(size_t, sizeof(buf),
            data.length - data.header_length -
            data.block_descriptor_length);

/* Pointer advances past buf[64] into adjacent kernel stack */
buf_data = buf + data.header_length +
           data.block_descriptor_length;

If header_length + block_descriptor_length exceeds data.length, the subtraction wraps around, setting len = 64 while buf_data points beyond buf[64]. The kernel subsequently transmits 64 bytes of kernel stack back to the USB device and clears a single byte at a chosen stack offset.

Interactive Stack Frame Visualizer Offset: +72 bytes (OOB)
buf[0 .. 63]
Intended 64-byte stack buffer for MODE SENSE response
Stack Frame [+64 .. +128]
Saved registers, pointers & return context (KASLR leak + 1-byte zeroing)

Local Checker Usage

usb2shell-check.sh

Inspect your host kernel branch, loaded usb_storage / uas modules, and authorized_default USB bus policies:

# Run local vulnerability & USB driver scan
bash usb2shell-check.sh -s

# Run with debug tracing enabled
bash usb2shell-check.sh -d -s

Note: Distribution vendors often backport upstream commit 3d676e458fe0 without incrementing the upstream kernel version number. Always verify your distro's security tracker.

Remediation & Hardening

  • 1. Update Kernel or Backport Fix

    Upgrade to Linux 6.6.158, 6.12.112, 6.18.54, 7.2.8, or 7.3+ (commit 3d676e458fe0).

  • 2. Block USB Mass Storage Drivers

    On systems that do not require USB storage, prevent usb-storage and uas from loading via modprobe blacklisting (install usb-storage /bin/true).

  • 3. Enforce USB Allow-Listing

    Deploy USBGuard or set /sys/bus/usb/devices/usb*/authorized_default to 0 to block automatic scanning of untrusted physical USB devices.

Disclosure Timeline (2026)

2026-08-26
Vulnerability discovered by Drivesec research team
2026-09-02 / 09-09
Reported to linux-scsi; fix committed (3d676e458fe0)
2026-10-06
CVE-2026-98232 published by the Linux CNA
2026-11-30
Public technical advisory & PoC details released