<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/usb2shell-root-on-linux-from-a-usb-plug-in-iju8hha6g" -->

---
title: Usb2shell: Root on Linux from a USB Plug-In | daily.dev
description: Plugging in a malicious USB device can make a vulnerable Linux kernel run a command as root, with no login, mount or click needed (CVE-2026-98232). The bug is...
canonical: https://daily.dev/posts/usb2shell-root-on-linux-from-a-usb-plug-in-iju8hha6g
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Usb2shell: Root on Linux from a USB Plug-In | daily.dev
og:description: Plugging in a malicious USB device can make a vulnerable Linux kernel run a command as root, with no login, mount or click needed (CVE-2026-98232). The bug is...
og:url: https://daily.dev/posts/usb2shell-root-on-linux-from-a-usb-plug-in-iju8hha6g
og:image: https://api.daily.dev/og/posts/ijU8hha6G.png
og:image:alt: Usb2shell: Root on Linux from a USB Plug-In
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Usb2shell: Root on Linux from a USB Plug-In

**[Hacker News](https://daily.dev/sources/hn)** · 4 min read · 0 upvotes · 0 comments

## Summary

Plugging in a malicious USB device can make a vulnerable Linux kernel run a command as root, with no login, mount or click needed (CVE-2026-98232). The bug is in scsi_cdl_enable(), which handles CDL support added in Linux 6.5. It trusts length fields from the device's reply and uses a 64-byte stack buffer. A device can leak kernel stack and clear one stack byte at a chosen offset. Fixed in 6.6.158, 6.12.112, 6.18.54, 7.2.8 and mainline 7.3. Without a kernel update, avoid building or auto-loading usb-storage and uas where mass storage isn't needed, or allow-list USB devices.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://usb2shell.com/>

## Questions this post answers

### Which Linux kernel versions are affected by CVE-2026-98232 and which releases fix it?

Linux 6.5 and later without the fix are affected when USB mass storage support (usb-storage or uas) is present and someone can plug in a device. First fixed releases are 6.6.158, 6.12.112, 6.18.54, 7.2.8, and mainline 7.3. Vendors often backport the fix without changing the version number, so check vendor advisories.

_Keeping on top of kernel CVEs like this is easier with daily.dev._

### How can I mitigate the Linux USB scsi_cdl_enable root exploit if I can't update my kernel yet?

Stop building or auto-loading usb-storage and uas where mass storage isn't needed, which removes the attack surface. You can also use USB allow-listing, such as USBGuard or authorized_default=0, so unauthorized devices aren't scanned. The permanent fix is a patched kernel or backporting commit 3d676e458fe0 to a vendor kernel.

_Developers hardening embedded Linux devices follow security fixes like this on daily.dev._

### What causes the Linux kernel scsi_cdl_enable() vulnerability?

When the kernel scans a new SCSI device claiming to be an ATA device with Command Duration Limits support, scsi_cdl_enable() reads a mode page into a 64-byte stack buffer and writes it back, using device-supplied lengths without checks. A device can make the kernel send up to 64 bytes of kernel stack and clear one stack byte at a chosen offset.

_Understanding kernel memory-safety bugs like this stays easier with daily.dev._

## Community take

How the wider developer community reacted, aggregated from 1 discussion and 56 comments across hackernews (as of 2026-12-01).

**TL;DR:** The flaw is seen as a genuinely impressive physical-access exploit (root via a crafted USB device, no login needed), though many argue it's overstated as a remote threat and note the naming/hype around it is a running joke.

**Sentiment:** 10% positive · 55% mixed · 35% skeptical

**The case for**

- It's a legitimately clever exploit of the SCSI driver rather than a trivial 'rubber ducky' keyboard emulation trick.
- It works against locked screens and pre-login systems, which some find genuinely impressive.
- Bugs like this being found and patched is reassuring since it shows the process works if you keep systems updated.
- Isolating USB handling in a disposable VM (as in QubesOS) is cited as a good mitigation model.

**The pushback**

- Physical access already lets an attacker emulate a keyboard/mouse to get a shell, so some see this as not much scarier than existing attack surface.
- The monolithic kernel design running all drivers in privileged mode is blamed for enabling this class of bug.
- Details on how a single-bit kernel write escalates to full code execution are seen as thin/underspecified.
- The 'X2shell' naming trend is mocked as clickbait-ish and overused.
- Remote-looking USB peripherals (like remote KVM dongles) could let this be exploited without truly needing physical presence, undercutting the 'needs physical access' reassurance.

**By community**

- hackernews (mixed): Discussion splits between those impressed by the exploit's technical depth and physical-access reach, and those downplaying it as old news dressed up with a cute name, with side debates on WebUSB, QubesOS, and kernel architecture.

**Hottest debate:** Whether this is a serious, novel attack vector or just a dressed-up restatement of the well-known 'physical access = game over' USB trust problem.

**Open questions**

- How exactly does the single-bit kernel stack write get amplified into full arbitrary code execution?
- Can WebUSB be leveraged to reflash a device's firmware to deliver this exploit remotely?
- Is Android's USB stack vulnerable to the same issue?

**Highlights**

> The exploit discloses up to 64 bytes of kernel stack, and allows the attacker to zero (IIUC) the two least significant bits at any arbitrary offset.  So you can, in essence, re-target a pointer to attacker-controlled data.  My understanding is they forged some internal structures to amplify that two-bit write into a more powerful write primitive.
> — [stackghost on hackernews](https://news.ycombinator.com/item?id=50709689)

> Unless you changed the USB authorization policy to default deny [0] with some userspace filter for whitelisting specific devices, e.g. USBGuard [1], any USB device can pretend to be any other USB device. There's no need to exploit the mass storage device driver when you can just pretend to be a keyboard and open a terminal. It's likely also possible to detect when the system is idle and do this when nobody is watching. [0] https://www.kernel.org/doc/Documentation/usb/authorization.t... [1] https://usbguard.github.io/
> — [mrob on hackernews · 1 comments](https://news.ycombinator.com/item?id=50707847)

> An excellent endorsement for the QubesOS security model. USB devices are attached to a disposable, unprivilleged VM and only the data to/from the device is passed through to other VMs. So the scope of an exploit in how the kernel handles the USB device is limited to a VM that is insulated from the rest of the system.
> — [negura on hackernews · 2 comments](https://news.ycombinator.com/item?id=50708737)

> So, a lot of people are assuming that this only works in-person ... however, with devices like a GL.iNet Comet Remote KVM which emulates a USB device, nothing stops someone from doing a remote exploit of a kvm node (likely running a 4.19.x or 6.1.x. linux kernel) which then allows an exploit of the node it is plugged into. This is just another tool in the sandbox of someone who already has a lot of remote exploit tools. ie: Just because it required physical USB access doesn't mean it's not remote-exploitable in some/many cases.
> — [imoverclocked on hackernews](https://news.ycombinator.com/item?id=50709860)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=50706614) · 133 points · 56 comments

## Similar posts on daily.dev

- [Specially Crafted NTFS File-System Image Allows Root Access On Linux With NTFS3 Driver](https://daily.dev/posts/specially-crafted-ntfs-file-system-image-allows-root-access-on-linux-with-ntfs3-driver-e4yqxmyra) · Phoronix · 3 upvotes · 1 comments
- [You gave me a u32. I gave you root. \(io](https://daily.dev/posts/you-gave-me-a-u32-i-gave-you-root-io-evofdoyif) · Hacker News · 2 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux)

[View this post on daily.dev](https://daily.dev/posts/usb2shell-root-on-linux-from-a-usb-plug-in-iju8hha6g)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Usb2shell: Root on Linux from a USB Plug-In","url":"https://daily.dev/posts/usb2shell-root-on-linux-from-a-usb-plug-in-iju8hha6g","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/usb2shell-root-on-linux-from-a-usb-plug-in-iju8hha6g"},"datePublished":"2026-11-30T23:49:03.852Z","dateModified":"2026-12-01T02:34:59.124Z","description":"Plugging in a malicious USB device can make a vulnerable Linux kernel run a command as root, with no login, mount or click needed (CVE-2026-98232). The bug is...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/usb2shell-root-on-linux-from-a-usb-plug-in-iju8hha6g","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Usb2shell: Root on Linux from a USB Plug-In"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/usb2shell-root-on-linux-from-a-usb-plug-in-iju8hha6g#faq","mainEntity":[{"@type":"Question","name":"Which Linux kernel versions are affected by CVE-2026-98232 and which releases fix it?","acceptedAnswer":{"@type":"Answer","text":"Linux 6.5 and later without the fix are affected when USB mass storage support (usb-storage or uas) is present and someone can plug in a device. First fixed releases are 6.6.158, 6.12.112, 6.18.54, 7.2.8, and mainline 7.3. Vendors often backport the fix without changing the version number, so check vendor advisories. Keeping on top of kernel CVEs like this is easier with daily.dev."}},{"@type":"Question","name":"How can I mitigate the Linux USB scsi_cdl_enable root exploit if I can't update my kernel yet?","acceptedAnswer":{"@type":"Answer","text":"Stop building or auto-loading usb-storage and uas where mass storage isn't needed, which removes the attack surface. You can also use USB allow-listing, such as USBGuard or authorized_default=0, so unauthorized devices aren't scanned. The permanent fix is a patched kernel or backporting commit 3d676e458fe0 to a vendor kernel. Developers hardening embedded Linux devices follow security fixes like this on daily.dev."}},{"@type":"Question","name":"What causes the Linux kernel scsi_cdl_enable() vulnerability?","acceptedAnswer":{"@type":"Answer","text":"When the kernel scans a new SCSI device claiming to be an ATA device with Command Duration Limits support, scsi_cdl_enable() reads a mode page into a 64-byte stack buffer and writes it back, using device-supplied lengths without checks. A device can make the kernel send up to 64 bytes of kernel stack and clear one stack byte at a chosen offset. Understanding kernel memory-safety bugs like this stays easier with daily.dev."}}]}
```

