News › security
By The Linux Camp News, December 2, 2026
A length-validation flaw in scsi_cdl_enable() lets a crafted USB storage device read kernel stack and clear bits in a stack byte during automatic scan. Drivesec reports root command execution on a stock Debian kernel.
Drivesec published its usb2shell write-up on 2026-11-30, covering CVE-2026-98232, which the Linux CNA had published on 2026-10-06. The flaw is in scsi_cdl_enable() in the kernel's SCSI core. The upstream fix, commit 3d676e458fe0, titled Validate MODE SENSE lengths in scsi_cdl_enable(), was authored by Alberto Carboneri on 2026-09-04 and committed by Martin K. Petersen on 2026-09-09. 1 4 2
Command Duration Limits (CDL) support was added in Linux 6.5. According to Drivesec, when the kernel scans a new SCSI device that claims to be ATA with CDL support, it calls scsi_cdl_enable(), which reads a mode page from the device into a 64-byte stack buffer and writes it back. The fix's commit message explains the failure: the function used length fields from the device's MODE SENSE reply. If the device reports a total length shorter than its mode header plus block descriptors, the unsigned subtraction that computes the MODE SELECT length wraps, and the separately computed buf_data pointer can land beyond the buffer. On the scan path the function runs with enable set to false, so its read-modify-write of buf_data[4] can clear the low two bits of a stack byte at an offset the device selects. scsi_mode_select() can then copy up to 64 bytes from outside the buffer into the outgoing MODE SELECT payload, handing kernel stack contents to the device. 1 2 4
Drivesec says a system is exposed when three conditions hold: it runs Linux 6.5 or later without the fix, it has usb-storage or uas mass storage support built in or loaded automatically, and someone can plug a device into one of its USB ports. No mount or user action is needed because the bug fires during the automatic device scan. The commit message likewise says no filesystem mount or userspace access to the block device is required, and specifies that the device must identify as ATA and advertise CDL support. Drivesec names car infotainment and telematics units, EV chargers, point-of-sale terminals, kiosks and industrial HMIs among Linux systems whose USB ports strangers can reach. 1 2
The exploitation evidence in the packet comes from researcher demonstrations. Drivesec says its proof of concept runs on a Cynthion USB device against a stock Debian 6.12.22+bpo-amd64 kernel, uses the stack leak to break KASLR, and builds fake kernel structures to turn the one-byte overwrite into a controlled write; when the device is unplugged, the kernel runs a device-supplied command as root. Drivesec calls the exploit probabilistic and says failed attempts do not crash the system. The commit message separately describes a build-specific, one-vCPU QEMU/Raw Gadget proof on 7.3-rc1 that created a UID-0-owned marker during automatic enumeration with KASLR and NX enabled. CISA's KEV snapshot of 2026-11-30 did not list CVE-2026-98232, and CISA notes that absence from the catalog does not establish absence of exploitation. 1 2 7
Drivesec reports that on Android the bug is leak-only. Android kernels on 6.6 and later are affected and the device receives kernel stack contents, but the builds Drivesec checked, Android GKI and the Samsung Galaxy A16 shipping kernel, use compiler bounds checks that keep the write inside the buffer. That finding is scoped to the builds Drivesec examined. 1
As retrieved on 2026-12-02, the official CVE record lists 6.6.158, 6.12.112, 6.18.54 and 7.2.8 as unaffected from those points within their branches, and 7.3 as the original fix release. Drivesec's remedy is to update to a fixed kernel or backport 3d676e458fe0 into a vendor kernel. Drivesec also notes that distributions and device vendors often backport fixes without changing the version number. The inference is that a kernel version string alone does not settle whether the fix is present, which is why Drivesec advises checking the vendor's advisory for CVE-2026-98232 or looking for the fix commit in the source tree. 6 1
Where an update has to wait, Drivesec suggests two exposure reductions: do not build or auto-load usb-storage and uas where mass storage is not needed, which removes the attack surface, or use USB allow-listing such as USBGuard or authorized_default=0 so unauthorized devices are not scanned. The fix itself, per its commit message, caps the available length to the buffer size, validates and consumes the header and block-descriptor lengths before using the page, and requires the five bytes needed to reach the CDL field. 1 3
The bug was raised in public before Drivesec's private report. On 2026-07-17, the Sashiko AI Review bot, replying on linux-scsi to a patch validating mode sense lengths in cache_type_store, flagged a stack out-of-bounds read and write in scsi_cdl_enable as a critical pre-existing issue. Drivesec's timeline says its team found the bug on 2026-08-26, achieved root command execution on physical hardware on 2026-08-28 and reported privately to the SCSI maintainers on 2026-09-02. The fix credits Sashiko with a Reported-by tag and states the issue was independently found at Drivesec. 5 1 2 4