# usb2shell: Linux Kernel SCSI Flaw (CVE-2026-98232) Enables Root Code Execution via Malicious USB Device

> A stack out-of-bounds flaw in scsi_cdl_enable() in the Linux kernel SCSI core (introduced with Command Duration Limits support in 6.5) lets a malicious USB device leak up to 64 bytes of kernel stack and overwrite one byte during the automatic device scan. Drivesec chained this into root command execution on stock Debian 6.12.22 without login or mount; no in-the-wild exploitation has been reported and a fix is available.

- **Author:** Threadlinqs Team
- **Published:** 2026-12-01T09:48:53Z
- **Last updated:** 2026-12-01T20:02:24.980Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7154
- **ID:** TL-2026-7154
- **Severity:** HIGH (CVSS 8.4)
- **Category:** VULNERABILITY
- **Status:** PATCHED
- **Detections:** 9 (1 shown free below) · **IOCs:** 15 (3 shown free below)
- **CVEs:** CVE-2026-98232

## Description

CVE-2026-98232 ("usb2shell") is a bug in the Linux kernel SCSI core function scsi_cdl_enable(), which was added with Command Duration Limits (CDL) support in Linux 6.5. When enabling CDL, the function reads an ATA feature mode page from the device with MODE SENSE into a 64-byte stack buffer and later writes it back. It trusts the length fields in the device's MODE SENSE response when locating the page. A device that reports a length shorter than its headers can make an unsigned subtraction wrap, so the buffer pointer lands outside the buffer. The result is a read of up to 64 bytes of kernel stack back to the device and a one-byte write to a stack offset the device chooses.

The flaw is reached during the kernel's automatic SCSI scan of a newly attached device, when a USB mass-storage device claims to be an ATA device that supports CDL. No login, file open, mount or user interaction is required, and disabling automatic mounting or locking the screen does not prevent the scan. Exposure requires an unfixed kernel 6.5 or later, usb-storage or uas support built in or auto-loaded, and an attacker with access to a USB port.

Drivesec researchers (Z3r0n37, Alberto247) demonstrated an exploit using a Cynthion USB device against a stock Debian 6.12.22+bpo-amd64 kernel with KASLR enabled. The leak is used to defeat KASLR; the chain then builds fake kernel structures to turn the one-byte overwrite into a controlled write and ends with a device-supplied command running as root (reported as executing when the device is unplugged). The exploit is probabilistic but failed attempts do not crash the system, so retries are possible; in one report the first two attempts failed and the third succeeded. Drivesec's write-up (published 2026-11-30) does not publish exploit code or link a PoC repository; it offers only a checker script, usb2shell-check.sh, which can miss vendor backports. Note that the hunt skeleton described a public PoC; the primary source reviewed describes a demonstrated exploit with code not released.

On Android (Generic Kernel Image and a Samsung Galaxy A16 build), compiler bounds checks keep the write in bounds, so only the memory leak was shown and root was not demonstrated. Sources do not list a CWE; CWE values here are analyst-assigned from the described behavior (unsigned wrap, out-of-bounds stack write and read). The Linux CNA published the CVE on 2026-10-06; Tenable lists CVSS v3.1 8.4 (AV:L). Google's Sashiko AI review reportedly first flagged the bug on linux-scsi, while Drivesec states it independently found it, wrote the fix and built the exploit. Higher-risk settings named by researchers are devices with reachable USB ports such as kiosks, payment terminals, car infotainment units, EV chargers and smart-home hubs; none has been shown compromised. The issue is not in CISA KEV as of reporting.

## MITRE ATT&CK

- T1091 Replication Through Removable Media
- T1059.004 Unix Shell
- T1211 Exploitation for Stealth
- T1200 Hardware Additions
- T1068 Exploitation for Privilege Escalation

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**usb2shell CVE-2026-98232: USB Mass Storage Device Claiming ATA Identity (SPL, Exploitation)** (`TL-2026-7154-SPL-001`)

Detects the exploitation precondition for usb2shell (CVE-2026-98232, scsi_cdl_enable() stack out-of-bounds in the Linux SCSI core). The kernel log shows usb-storage or uas binding to a newly attached USB device and, within 30 seconds on the same host, a SCSI INQUIRY result reporting vendor 'ATA'. Real ATA disks are handled by libata, so a USB mass-storage device that presents itself as ATA (needed to reach the CDL code path during the automatic SCSI scan) is anomalous and is a form of device masquerading. This is behavioural and does not depend on a specific USB VID/PID. No in-the-wild exploitation is reported, so treat hits as a hunt lead for malicious or emulated USB hardware such as a Cynthion.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1200, T1091, T1068, T1036
- **Data sources:** linux_kernel_syslog, splunk:index=os:sourcetype=syslog, sentinel:Syslog
- **Severity:** high
- **Confidence:** medium

### Splunk SPL

```spl
index=os sourcetype=syslog earliest=-24h ("usb-storage" OR "scsi host" OR "Direct-Access" OR "USB Mass Storage")
| eval usb_msd=if(match(_raw, "usb-storage|: uas|USB Mass Storage device detected"), 1, 0)
| eval ata_claim=if(match(_raw, "scsi \d+:\d+:\d+:\d+:\s+Direct-Access\s+ATA\s"), 1, 0)
| where usb_msd=1 OR ata_claim=1
| bin _time span=30s
| stats sum(usb_msd) as usb_msd_events, sum(ata_claim) as ata_vendor_claims, values(eval(if(ata_claim=1, _raw, null()))) as scsi_inquiry_lines by host, _time
| where usb_msd_events>0 AND ata_vendor_claims>0
| table _time host usb_msd_events ata_vendor_claims scsi_inquiry_lines
```

### Microsoft KQL

```kql
let lookback = 24h;
let corr_window = 30s;
let usb_msd = Syslog
| where TimeGenerated > ago(lookback)
| where Facility == "kern" or ProcessName == "kernel"
| where SyslogMessage matches regex @"usb-storage|scsi host\d+: uas|USB Mass Storage device detected"
| project Computer, MsdTime = TimeGenerated, MsdMsg = SyslogMessage;
let ata_claim = Syslog
| where TimeGenerated > ago(lookback)
| where Facility == "kern" or ProcessName == "kernel"
| where SyslogMessage matches regex @"scsi \d+:\d+:\d+:\d+:\s+Direct-Access\s+ATA\s"
| project Computer, AtaTime = TimeGenerated, AtaMsg = SyslogMessage;
usb_msd
| join kind=inner ata_claim on Computer
| where AtaTime between (MsdTime .. (MsdTime + corr_window))
| summarize FirstSeen = min(MsdTime), LastSeen = max(AtaTime), UsbMessages = make_set(MsdMsg, 5), AtaInquiry = make_set(AtaMsg, 5) by Computer
| project FirstSeen, LastSeen, Computer, UsbMessages, AtaInquiry
```

### Sigma

```yaml
title: Linux USB Mass Storage Driver Attach Message (usb2shell building block)
id: 3f6a9c1e-52b7-4d8a-a1c4-9e07b2d85a11
name: usb2shell_usb_msd_attach
status: experimental
description: Kernel log message showing usb-storage or uas binding to a newly attached USB device. Building block for the CVE-2026-98232 correlation below.
references:
    - https://usb2shell.com/
    - https://www.tenable.com/cve/CVE-2026-98232
author: Threadlinqs Team
date: 2026-12-01
logsource:
    product: linux
    service: syslog
detection:
    selection:
        Message|contains:
            - 'USB Mass Storage device detected'
            - ': usb-storage'
            - ': uas'
    condition: selection
falsepositives:
    - Any legitimate USB drive insertion
level: informational
---
title: Linux SCSI Inquiry Reporting ATA Vendor (usb2shell building block)
id: b2d41e87-6c3a-4f19-8e52-1a7c0d93f421
name: usb2shell_ata_inquiry_claim
status: experimental
description: Kernel SCSI scan line reporting a Direct-Access device with vendor ATA. Building block for the CVE-2026-98232 correlation below.
references:
    - https://usb2shell.com/
author: Threadlinqs Team
date: 2026-12-01
logsource:
    product: linux
    service: syslog
detection:
    selection:
        Message|contains|all:
            - 'Direct-Access'
            - ' ATA '
    condition: selection
falsepositives:
    - Internal SATA disks detected at boot
level: informational
---
title: USB Mass Storage Device Claiming ATA Identity - usb2shell CVE-2026-98232
id: e84d17a3-90b2-4c65-b3f8-6d12a5c7e031
name: usb2shell_usb_ata_spoof
status: experimental
description: Detects a USB mass-storage attach followed within 30 seconds on the same host by a SCSI scan result with vendor ATA. This is the precondition for reaching scsi_cdl_enable() in the Linux SCSI core (usb2shell, CVE-2026-98232). Requires a backend that maps Message and Hostname for linux syslog.
references:
    - https://usb2shell.com/
    - https://www.tenable.com/cve/CVE-2026-98232
author: Threadlinqs Team
date: 2026-12-01
tags:
    - attack.initial_access
    - attack.t1200
    - attack.t1091
    - attack.defense_evasion
    - attack.t1036
    - attack.privilege_escalation
    - attack.t1068
    - cve.2026.98232
correlation:
    type: temporal
    rules:
        - usb2shell_usb_msd_attach
        - usb2shell_ata_inquiry_claim
    group-by:
        - Hostname
    timespan: 30s
falsepositives:
    - Hosts that boot with internal SATA disks while a USB drive is already attached
    - USB-to-SATA bridge adapters that pass through ATA identity strings
level: high

```

**Known false positives:**

- Hosts that boot with internal SATA disks while a USB drive is already attached put both message types in the same 30s window
- USB-to-SATA bridge enclosures and some docks pass the underlying disk's ATA vendor string through the SCSI INQUIRY

**Tuning notes:** Adjust index/sourcetype to wherever kernel ring-buffer or journald kernel messages land. Exclude the first 5 minutes after boot (use uptime or a boot-time lookup) and known USB-SATA bridge adapters by VID:PID. Widen the 30s window if scan messages arrive late. Fixed kernels (6.6.158, 6.12.112, 6.18.54, 7.2.8, 7.3) are not exploitable, but the anomaly is still worth review. Vendor backports may not change the version number.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- usb2shell CVE-2026-98232: Kernel Fault or scsi_cdl_enable Reference Near USB Storage Activity (KQL, Exploitation) (locked: unlock with TL Creds)
- usb2shell CVE-2026-98232: USBGuard or USB Authorization Control Tampering (KQL, Post-Exploitation) (locked: unlock with TL Creds)
- usb2shell CVE-2026-98232: [indicator] Download or Execution on Linux Hosts (KQL, Recon) (locked: unlock with TL Creds)
- usb2shell CVE-2026-98232: Cynthion or USB Research Hardware Enumerated on Linux Host (Sigma, Exploitation) (locked: unlock with TL Creds)
- usb2shell CVE-2026-98232: Root Shell or Network Tool Spawned By Kernel Thread (Sigma, Post-Exploitation) (locked: unlock with TL Creds)
- usb2shell CVE-2026-98232: usb-storage or uas Driver Loaded on Hosts Where USB Mass Storage Is Blocked (Sigma, Attack Surface) (locked: unlock with TL Creds)
- usb2shell CVE-2026-98232: Root Command Launched From Kernel Thread Around USB Unplug (SPL, Post-Exploitation) (locked: unlock with TL Creds)
- usb2shell CVE-2026-98232: Repeated USB Device Re-Attach Pattern Consistent With Probabilistic Exploit Retries (SPL, Retry/Stealth) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (3 of 15)

Defanged, TLP:CLEAR.

- Domain: `usb2shell[.]com`
- File hash: `3d676e458fe0c566f5a62753dc696b6a862fc412`
- File hash: `39491a1ae93054fea10b4030180e5c797b2c0343`

Full set of 15 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [usb2shell - CVE-2026-98232 (Drivesec disclosure)](https://usb2shell.com/)
- [New USB2shell Attack Lets Hackers Gain Root Access with a Malicious USB](https://cybersecuritynews.com/new-usb2shell-attack/)
- [USB2Shell Linux Kernel Flaw Lets Malicious USB Devices Run Commands as Root](https://thehackernews.com/2026/12/usb2shell-linux-kernel-flaw-lets.html)
- [Tenable: CVE-2026-98232](https://www.tenable.com/cve/CVE-2026-98232)
- [Debian Security Tracker: CVE-2026-98232](https://security-tracker.debian.org/tracker/CVE-2026-98232)
- [Upstream fix: scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()](https://git.kernel.org/stable/c/3d676e458fe0c566f5a62753dc696b6a862fc412)
- [Stable backport 39491a1ae930](https://git.kernel.org/stable/c/39491a1ae93054fea10b4030180e5c797b2c0343)
- [Stable backport 60b0b8ce803e](https://git.kernel.org/stable/c/60b0b8ce803e3c2b2a9e5485ab3f88599fb4c7a4)
- [Stable backport 6233d0b3ef46](https://git.kernel.org/stable/c/6233d0b3ef4623df0d6934dc8b93b161e9854f6b)
- [Stable backport 99a6e4a9176d](https://git.kernel.org/stable/c/99a6e4a9176da456904b67dcbae6e77d122782b7)
- [EUVD-2026-93160](https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-93160)
- [SUSE: CVE-2026-98232](https://www.suse.com/security/cve/CVE-2026-98232/)
- [Red Hat Bugzilla 2546355: CVE-2026-98232](https://bugzilla.redhat.com/show_bug.cgi?id=2546355)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7154
