usb2shell — a Linux kernel vulnerability exploited through malicious USB devices. A joke vulnerability, Terminal2Shell

Details have been disclosed about a Linux kernel vulnerability (CVE-2026-98232), codenamed usb2shell, that allows code to be executed with root privileges when a specially crafted USB device is connected to a computer. The researchers who discovered the flaw demonstrated a successful attack on a Debian 13 system running its default configuration, using a programmable Cynthion USB device. The vulnerability could be used to compromise unattended devices with locked screens or to embed malicious changes in the firmware of legitimate devices, enabling them to install backdoors on the systems they are connected to.

The vulnerability is caused by a buffer overflow in the SCSI subsystem’s scsi_cdl_enable() function, which is called when scanning connected USB storage devices that support CDL (Command Duration Limits). The issue occurs while processing data returned in response to the “MODE SENSE” command. The data is copied into a fixed 64-byte buffer and then sent back to the device using the size reported by the device, without checking whether it matches the amount of data actually transferred. This behavior can leak up to 64 bytes of kernel stack contents to the device. In addition, processing the “MODE SELECT” command causes an integer overflow that can be exploited to write one byte beyond the stack buffer.

The issue affects Linux kernels starting with version 6.5 (2023) and has been fixed in releases 6.6.158, 6.12.112, 6.18.54, 7.2.8, and 7.3. On Android platforms running kernels 6.6 and later, the vulnerability can only leak kernel stack contents; compile-time checks block the out-of-bounds write. The status of fixes in various distributions can be checked on the following pages: Debian, Ubuntu, SUSE/openSUSE, RHEL, Gentoo, Arch, Fedora. As a workaround, you can prevent the usb-storage and uas kernel modules from loading automatically when USB devices are connected, or use the USBGuard package to enable these modules only when trusted USB devices are connected.

Also worth noting is the publication of the tongue-in-cheek “vulnerability” Terminal2Shell, which pokes fun at creating dedicated websites for vulnerabilities and giving them flashy names such as Ruby2Shell, PHP2Shell, Upload2Shell, Broccoli2Shell, wp2shell, React2Shell, NFS2Root, NGINX2Root, and Java4Shell. Terminal2Shell has supposedly affected every operating system since 1971, including Unix v1, and allows unauthenticated, unrestricted access to the command interpreter. The attack has a 100% success rate and can be exploited instantly simply by opening a terminal emulator. The “vulnerability” stems from the architecture of terminal emulators, which automatically launch a command interpreter process and pass it commands entered on the keyboard.

Millions of successful Terminal2Shell exploitation attempts are reportedly being recorded every day. More than 2 billion devices worldwide are believed to be vulnerable. A possible sign of a successful attack is the appearance of “$”, “%”, “>”, or “#” after opening a terminal. As workarounds, it is recommended to close the terminal immediately, disconnect the keyboard, or set the “SHELL=/bin/false” environment variable.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster