Skip to main content
Vulnerability Database/CVE-2026-98232

CVE-2026-98232: Linux Kernel SCSI Information Disclosure

CVE-2026-98232 is an information disclosure flaw in the Linux kernel SCSI subsystem that allows malicious USB devices to extract stack memory contents during device enumeration. This post covers technical details, impact, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98232 Overview

CVE-2026-98232 is an out-of-bounds read vulnerability in the Linux kernel SCSI core subsystem. The flaw resides in the scsi_cdl_enable() function, which trusts length fields returned by a MODE SENSE command to locate the ATA feature mode page in a 64-byte stack buffer. A malicious SCSI target can report a total length shorter than its mode header and block descriptors, causing an unsigned subtraction to wrap. The resulting buf_data pointer references memory outside the stack buffer.

Critical Impact

A USB storage device identifying as an ATA target with Command Duration Limits (CDL) support can trigger stack memory disclosure during automatic enumeration, without any filesystem mount or userspace access to the block device.

Affected Products

  • Linux kernel SCSI core subsystem (drivers/scsi/scsi.c) — pre-patch versions
  • Linux kernel builds exposing the CDL (Command Duration Limits) code path
  • Any distribution shipping an affected upstream kernel with USB mass storage support

Discovery Timeline

  • Independently identified during security research at Drivesec S.r.l.
  • 2026-10-06 - CVE-2026-98232 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-98232

Vulnerability Analysis

The scsi_cdl_enable() function uses length fields returned by a MODE SENSE reply to locate the ATA feature mode page inside a 64-byte stack buffer. The code performs an unsigned subtraction to compute the length used by the subsequent MODE SELECT call. When a target reports a total length smaller than the combined mode header and block descriptor lengths, the subtraction wraps to a large unsigned value and buf_data is advanced beyond the end of buf.

During automatic bus scanning, the enable parameter is false. The code still performs a read-modify-write on buf_data[4], clearing the low two bits of a target-selected out-of-bounds stack byte. scsi_mode_select() then copies up to 64 bytes starting from outside the buffer into the outgoing MODE SELECT payload, which is transmitted to the attacker-controlled device. This leaks adjacent kernel stack contents to the target.

Root Cause

The root cause is missing validation of attacker-controlled length fields drawn from a MODE SENSE response, combined with unsigned arithmetic that wraps on underflow. The function does not cap the available length to the actual buffer size and does not verify that the mode header and block descriptor lengths fit inside the response before indexing further bytes.

Attack Vector

The vulnerability is reachable over USB. A rogue USB storage device identifies itself as an ATA device and advertises CDL support. Standard enumeration performed by the kernel triggers scsi_cdl_enable() with crafted length fields, forcing the out-of-bounds read and leaking stack memory back to the device through the outgoing MODE SELECT payload. No mount, no login, and no privileged userspace action is required — physical USB access is sufficient.

See the upstream fixes for implementation details: Kernel Git Commit 39491a1, Kernel Git Commit 3d676e4, Kernel Git Commit 60b0b8c, Kernel Git Commit 6233d0b, and Kernel Git Commit 99a6e4a.

Detection Methods for CVE-2026-98232

Indicators of Compromise

  • USB mass storage devices enumerating as ATA targets that advertise CDL support on hosts that do not normally expose such hardware.
  • Kernel log entries from the SCSI subsystem showing truncated or inconsistent MODE SENSE responses during device scan.
  • KASAN or slab/stack sanitizer reports flagging out-of-bounds access inside scsi_cdl_enable().

Detection Strategies

  • Monitor dmesg and journald for SCSI scan anomalies tied to USB attach events, especially repeated attach/detach cycles from the same vendor/product ID.
  • Correlate USB device insertions with kernel subsystem errors on endpoints that normally do not use removable storage.
  • Deploy kernels built with KASAN in test environments to surface the stack out-of-bounds access during fuzzing of USB storage firmware.

Monitoring Recommendations

  • Alert on new USB vendor/product IDs attaching to servers, kiosks, and operator workstations.
  • Track kernel version inventory to confirm that patched builds are deployed before unknown USB devices are permitted.
  • Centralize kernel logs in a security data lake to retain SCSI enumeration telemetry for retrospective analysis.

How to Mitigate CVE-2026-98232

Immediate Actions Required

  • Apply the upstream Linux kernel patches that cap the available length to the buffer size and validate the mode header and block descriptor lengths before accessing the CDL field.
  • Restrict physical and USB port access on servers and sensitive endpoints; disable automatic enumeration of unknown USB mass storage where feasible.
  • Rebuild and redeploy custom or embedded kernels that include the SCSI core after merging the referenced stable commits.

Patch Information

The fix caps the usable length to the actual buffer size, validates and consumes the mode header and block descriptor lengths before indexing the page, and requires the five bytes needed to access the CDL field. Patches are available in the stable tree via commits 39491a1, 3d676e4, 60b0b8c, 6233d0b, and 99a6e4a linked in the Technical Details section. Downstream distributions should ship rebuilt kernels incorporating these commits.

Workarounds

  • Use USB device authorization (/sys/bus/usb/devices/*/authorized) or usbguard policies to block unknown mass storage devices until kernels are patched.
  • Blacklist or unload the uas and usb_storage modules on systems that do not require removable storage.
  • Physically disable or lock down exposed USB ports on unattended endpoints to prevent rogue device attachment.
bash
# Example: block unauthorized USB devices with usbguard
sudo apt-get install usbguard
sudo usbguard generate-policy > /etc/usbguard/rules.conf
sudo systemctl enable --now usbguard

# Example: disable USB mass storage modules until patched
echo 'blacklist uas'          | sudo tee /etc/modprobe.d/block-usb-storage.conf
echo 'blacklist usb_storage' | sudo tee -a /etc/modprobe.d/block-usb-storage.conf
sudo update-initramfs -u

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.