Even a Linux device that is locked or has no user login can still have its root privileges stolen by a malicious USB drive.
On November 30, the cybersecurity research team Drivesec disclosed a Linux kernel vulnerability known as USB2Shell (CVE-2026-98232). Researchers have successfully demonstrated the ability to execute commands with root privileges in a real hardware environment. The entire attack process requires no mounting of disks, opening files, or any user interaction; the vulnerability is triggered when the operating system automatically scans for USB storage devices.
This vulnerability stems from the SCSI Command Duration Limit (CDL) feature introduced in Linux 6.5, affecting systems that do not yet include a fix and have USB mass storage support enabled. Currently, fixes are available on the Linux mainline and several stable kernel branches.
As a crucial technological foundation for global digital infrastructure, Linux applications have long surpassed traditional servers and personal computers, penetrating into industrial control, automotive systems, smart homes, charging infrastructure, payment terminals, and various self-service devices. Compared to traditional computers, these devices often feature long operating times, extended upgrade cycles, and the potential for physical interfaces to be exposed to public environments.
GCSA believes that the most concerning aspect of USB2Shell is not the traditional attack vector of USB flash drives, but rather that the attack occurs before user authentication and file access. Even if the operating system deploys strict login authentication, file access control, and endpoint security policies, it may not be able to cover the risks that arise during the interaction between the kernel and external hardware.
For device manufacturers and operators using Linux, in addition to timely patching of kernel vulnerabilities, they should also re-examine the default trust mechanism of external interfaces and incorporate hardware access control, kernel security updates and device lifecycle management into a unified security system.
Original Analysis Report
Linux USB2Shell vulnerability CVE-2026-98232: Malicious USB drives can gain root access on unlogged machines during the automatic scanning phase. Kernel versions 6.5 and above require an upgrade.
Daily Security Insights (Threat Intelligence) | December 2, 2026 | All times in this article are Tokyo time (UTC+9)
On November 30th, Drivesec researchers Z3r0n37 and Alberto247 published CVE-2026-98232 (which they call USB2Shell) on usb2shell.com. In the SCSI Command Duration Limits (CDL) handling introduced in Linux 6.5,scsi_cdl_enable()reads the device's returned MODE SENSE into a 64-byte stack buffer without validating the length field. This unvalidated length can underflow, causingbuf_datato overflow the buffer. Thus, a malicious USB storage device can read up to 64 bytes of the kernel stack during the kernel's automatic scanning phase and clear bits or bytes from the stack at its chosen offset. Even if no one is logged in, mounted the disk, or clicks any interface, as long as your machine is running an unpatched Linux 6.5 or later kernel,usb-storageor `uasis compiled into the kernel or automatically loaded, and the attacker can plug the device into a USB port, this path is already established. Drivesec states on their research site that they demonstrated root command execution on Debian 6.12.22+bpo-amd64 and Cynthion devices with a real USB port and KASLR enabled.
I. Event Summary
Table 1: Timeline of CVE-2026-98232
| Time (Tokyo time UTC+9) | event | Source/Evidence |
|---|---|---|
| 8-26 | Drivesec research team discovered the flaw. | usb2shell.com Timeline |
| 8-28 | Implement command execution as root on physical hardware. | usb2shell.com Timeline |
| 9-02 | Report privately to the SCSI maintainers | usb2shell.com Timeline |
| 9-04 | Send a patch to linux-scsi (Patch author's time: 9-04 13:54 UTC, Tokyo time 22:54) | usb2shell.com Timeline / Submission Instructions |
| 9-10 11:23 | The fix has been merged into the main storyline. Submission 3d676e458fe0 (Submitted by Martin K. Petersen, time: 9-09 22:23 − 04:00; official website timeline date is 9-09) | git.kernel.org commit 3d676e458fe0 |
| 9-25 19:25 | CVE-2026-98232 (9-25 10:25:14 UTC) is retained. | CVE record retention time |
| 10-06 17:45 | The Linux CNA released the CVE (10-06 08:45:05 UTC). | CVE record release time |
| 11-30 | The research site usb2shell.com is publicly available. | usb2shell.com Timeline |
The submission notes label the issue asFixes: 1b22cfb14142(“scsi: core: Allow enabling and disabling command duration limits”), consistent with the official statement that “CDL support was introduced in Linux 6.5”. The CVE record lists this submission as the affected starting point; versions prior to 6.5 are unaffected. The official credits state that Sashiko AI Review first reported this vulnerability on linux-scsi, the Drivesec research team independently discovered it, wrote the fix, and established an exploit chain; the submission record also lists Sashiko AI Review as the Reported-by, with Alberto Carboneri as the patch author and Pimen Flavian Dei as a co-developer.
II. Why are there risks?
In short: the length returned by the device is directly used to locate the page in the 64-byte stack buffer. Once the length is made so that "the pattern header plus the block descriptor is shorter than the total length", the unsigned subtraction will wrap around, and the pointer and subsequent copy will no longer fall in the buffer.
This path occurs during the automatic enumeration phase and does not require mounting or login.
For a system to be exposed to this vulnerability, the official documentation states that all of the following conditions must be met simultaneously: it must be running Linux 6.5 or later without a patch; it must have USB mass storage support (usb-storageoruascompiled into the kernel, or automatically loaded); and an attacker must be able to plug the device into one of the USB ports. Both the official documentation and the CVE logs state that no file system mounting or user-space access to the disk is required. The vulnerability is detected when the kernel automatically scans for newly connected USB storage devices.

Figure 1: Prerequisites and automatic scan path for CVE-2026-98232 (based on usb2shell.com and Linux CNA documentation)
The unchecked length can cause buf_data to point outside the buffer.
When the kernel scans for a SCSI device that claims to be ATA and declares support for CDL, it callsscsi_cdl_enable(). This function reads the device's MODE SENSE response onto the stackchar buf[64], and then usesdata.length,data.header_length, anddata.block_descriptor_lengthfrom the response to locate the ATA feature mode page. The calculation before the fix was:
len = min_t(size_t, sizeof(buf), data.length - data.header_length - data.block_descriptor_length);andbuf_data = buf + data.header_length + data.block_descriptor_length;
The submission notes are clear: the target device can report a total length shorter than the mode header plus block descriptor. The unsigned subtraction used to calculate the MODE SELECT length will wrap around, and the separately calculatedbuf_datacan also point outsidebuf. The official documentation comments on the same code snippet: the subtraction might wrap to 64,buf_datamight point outside the buffer.
When automatic scanning is enabled (set to false), the two least significant bits of out-of-bounds bytes will be cleared during each read/write operation.
The CVE record and submission instructions continue: During the automatic scan phase, the passedenableis false, so reading and modifyingbuf_data[4]can clear the lower two bits of the target selected out-of-bounds stack byte; subsequently,scsi_mode_select()can copy up to 64 bytes from outside the buffer to the upcoming MODE SELECT payload, handing over the contents of the stack to the device. The official website summarizes these two things as: the device can allow the kernel to send up to 64 bytes of kernel stack to it, and clear one stack byte at the offset selected by the device. All of this happens during the automatic scan, before the user space can see any disk.
The fix includes limiting the length to within the buffer and requiring 5 bytes remaining before accessing a CDL field.
The submission 3d676e458fe0 first limits the available length tomin(data.length, sizeof(buf)), then sequentially consumes and verifies the mode header length and block descriptor length. If any step exceeds the remaining space, it directly returns-EINVAL. Finally, it requires at least 5 bytes to remain before allowingbuf_datato be pointed to at that offset and accessing the CDL fields. In this way, no matter how much the device fills the length field, the pointer and subsequent copying will not fall outside the 64-byte stack buffer.

Figure 2: Official submission 3d676e458fe0's length check of scsi_cdl_enable() (diff original text)
III. What are the possible consequences?
On unpatched Linux 6.5 and later systems, a malicious storage device plugged into a USB port can read up to 64 bytes of the kernel stack during automatic scanning and rewrite bits or bytes on the stack at its chosen offset. Drivesec stated on its research site that they demonstrated this by executing commands as root on a stock Debian kernel6.12.22+bpo-amd64using a real USB port and with KASLR enabled. The mainline commit notes also record that in upstream commit cee9395acd80 (Linux 7.3-rc1), a QEMU/Raw Gadget verification for a specific build and a single vCPU, with KASLR and NX enabled, executed a fixed verification command during the automatic enumeration phase and created a tag file with UID 0 as the owner.
Regarding Android, the official conclusion is that in the Android GKI and the Samsung Galaxy A16 factory kernel they examined, the compiler's boundary checks confine writes to the buffer, thus primarily manifesting as a leak—the device can still retrieve the kernel stack contents, but the out-of-bounds write no longer occurs. Android kernels 6.6 and above are still affected.
This path requires brief contact with the USB port. The official website lists common applications of this type of interface in scenarios such as in-vehicle infotainment and telematics units, charging facilities, point-of-sale terminals, self-service kiosks, in-flight entertainment, industrial human-machine interfaces, and smart home hubs.
IV. What you should do now

Figure 3: Linux host processing sequence: First confirm whether the repair is included, then upgrade or tighten the USB.
1. First, confirm whether the kernel already includes the fix:Distributions and device vendors often move fixes back into existing branches without changing the version number, so don't just rely onuname -r. The official website provides a check script:https://usb2shell.com/tools/usb2shell-check.sh. Read it before running it. If the script indicates your kernel is still affected, check the vendor's announcements regarding CVE-2026-98232, or look for commit3d676e458fe0in the source code tree.
2. Upgrade to a fixed version:On the stable branch, the first fixed versions listed on the official website and CVE records are 6.6.158, 6.12.112, 6.18.54, and 7.2.8, with the mainline version being 7.3. Alternatively, the upstream commit3d676e458fe0(“scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()”) can be ported to the vendor kernel. The corresponding stable branches in the CVE records are39491a1ae930,60b0b8ce803e,6233d0b3ef46, and99a6e4a9176d.
3. When upgrades are not feasible, mitigate the USB storage attack surface:On machines that do not require large-capacity storage, do not compile or automatically loadusb-storageanduas. The official documentation states that doing so will eliminate this attack surface.
4. Restrict automatic scanning of unauthorized devices:Use a USB whitelist, such as USBGuard, or setauthorized_default=0to prevent the kernel from automatically scanning unauthorized devices.
5. Android devices:If the kernel is based on 6.6 or higher, kernel stack contents may still be leaked to the device. Please check whether the device or GKI vendor has included the above commits, and do not ignore updates simply because "writes are restricted to the buffer".
V. Recommendations for Subsequent Use
For devices that expose USB ports and run custom or distribution kernels for extended periods, include "whether the kernel contains a certain security commit" in the acceptance test, rather than just checking the version string. For self-service terminals, in-vehicle systems, and industrial hosts that do not require large-capacity storage, do not automatically loadusb-storage/uasby default, and whitelist allowed devices for access.
VI. Main Information Sources
- Drivesec: usb2shell (CVE-2026-98232 Research Station):
https://usb2shell.com/ - CVE-2026-98232 (Linux CNA):
https://www.cve.org/CVERecord?id=CVE-2026-98232 - Upstream fix submission 3d676e458fe0: scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable():
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3d676e458fe0c566f5a62753dc696b6a862fc412 - Stable branch shift 39491a1ae930:
https://git.kernel.org/stable/c/39491a1ae93054fea10b4030180e5c797b2c0343 - Stable branch shift 60b0b8ce803e:
https://git.kernel.org/stable/c/60b0b8ce803e3c2b2a9e5485ab3f88599fb4c7a4 - Stable branch shift 6233d0b3ef46:
https://git.kernel.org/stable/c/6233d0b3ef4623df0d6934dc8b93b161e9854f6b - Stable branch shift 99a6e4a9176d:
https://git.kernel.org/stable/c/99a6e4a9176da456904b67dcbae6e77d122782b7 - Drivesec's patch archive submitted to linux-scsi:
https://patch.msgid.link/[email protected]
From control terminals on industrial production lines to charging facilities on city streets, and smart devices used by ordinary consumers, Linux is becoming an important link between the physical and digital worlds.
USB2Shell reminds us that as computing power is embedded in more and more public utilities and everyday items, device security is no longer solely the responsibility of individual users. Whether manufacturers continuously provide security updates and whether operators establish effective maintenance mechanisms will directly impact public trust in digital life.
The boundary between the digital and physical worlds is disappearing, and security governance must also cross this boundary.
Copyright and Disclaimer
This article was published by the GCSA Global Cybersecurity Alliance. Copyright of original content belongs to GCSA; copyright of third-party content cited or reproduced belongs to the original rights holder. Please indicate the source and retain the original link when reprinting.
This article is for cybersecurity research and informational purposes only and does not constitute investment, legal, or financial advice. The related technical analysis, risk assessments, and attack attributions are based on existing evidence. The scope of GCSA's independent verification is as disclosed in this article, and the conclusions may be updated as new evidence emerges.
Follow GCSA on social media for the latest updates.
GCSA X (Twitter):
GCSA Telegram:
GCSA WeChat Official Account:
https://mp.weixin.qq.com/s/ouyL9NwrDDjhMumvehdOmw
Source:Global Cybersecurity Alliance (GCSA)
Website:www.gcsa.org
소식을 이메일로 받기
개인정보를 존중합니다. 자세한 내용은 개인정보 처리방침