RC RANDOM CHAOS

Automatic Root Access via USB Device Flaw

· via Hacker News

Original source

Usb2shell: Root on Linux from a USB Plug-In

Hacker News →

Linux kernels 6.5 and later contain a vulnerability that allows physical attackers to gain root access by plugging a malicious USB device into any accessible port. The kernel triggers the flaw automatically during device enumeration, without requiring user interaction or mounting. Vulnerable systems range widely: automotive infotainment, EV chargers, point-of-sale terminals, industrial controllers, kiosks, and smart-home devices.

The flaw stems from insufficient validation in the Command Duration Limits (CDL) handler added in Linux 6.5. When the kernel detects a USB SCSI device claiming ATA support, it reads the device’s mode page into a 64-byte stack buffer without checking length values. A crafted device response leaks kernel stack memory and overwrites a single byte at an attacker-chosen offset. Researchers chained these primitives to bypass KASLR and execute arbitrary code as root when the device is unplugged.

Fixed kernels are available upstream with backports in several stable releases. Users can verify their systems using a provided checker script, and vendors may have backported the fix without changing version numbers. For systems unable to update immediately, restricting physical USB access reduces exposure.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.