USB2Shell (CVE-2026-98232): Análisis Defensivo de la Vulnerabilidad en SCSI CDL del Kernel Linux y Endurecimiento USB

Análisis técnico de USB2Shell (CVE-2026-98232): cómo la falta de validación MODE SENSE en scsi_cdl_enable() expone y corrompe la pila del kernel Linux 6.5+, el parche 3d676e458fe0 y la mitigación con USBGuard.

USB2Shell (CVE-2026-98232) Vulnerabilidad SCSI CDL en el Kernel Linux
🛡️
Vulnerability Intelligence: CVE ID: CVE-2026-98232 ("USB2Shell") - Vulnerabilidad de Validación de Longitud en SCSI CDL del Kernel Linux (CWE-191 Subdesbordamiento de Entero, CWE-125 Lectura Fuera de Límites y CWE-787 Escritura Fuera de Límites) Severity: ALTO (EXPOSICIÓN Y CORRUPCIÓN DE PILA DEL KERNEL DURANTE LA ENUMERACIÓN USB) (CVSS 8.4 Alto (Vector Físico AV:P, Impacto Total en Privilegios del Kernel)) Threat Actor: Z3r0n37 y Alberto247 (Drivesec) — Divulgado a finales de noviembre de 2026 Status: Parche Upstream Fusionado (Commit 3d676e458fe0); Portado a Ramas LTS y Estables Affected Systems: Kernel Linux 6.5 hasta 6.6.157, 6.12.111, 6.18.53 y 7.2.7 (almacenamiento USB / SCSI CDL habilitado) Fixed In: Linux 6.6.158, 6.12.112, 6.18.54, 7.2.8 y 7.3+

A finales de noviembre de 2026, los investigadores de seguridad Z3r0n37 y Alberto247 de Drivesec divulgaron públicamente CVE-2026-98232 —conocida como "USB2Shell"—, una vulnerabilidad de seguridad de memoria de alta gravedad en el subsistema SCSI del kernel de Linux (drivers/scsi/scsi.c). A diferencia de los dispositivos BadUSB tradicionales que emulan teclados (HID) y requieren una sesión gráfica desbloqueada, USB2Shell afecta a la ruta automática de enumeración SCSI del kernel al conectar un periférico de almacenamiento masivo USB. Debido a que el fallo se produce dentro de scsi_cdl_enable() durante la detección inicial de hardware —antes del inicio de sesión o el montaje de sistemas de archivos—, los equipos bloqueados, servidores sin pantalla, quioscos públicos, cargadores de vehículos eléctricos y paneles industriales con kernels Linux 6.5+ sin parchear están expuestos. Desactivar el montaje automático (automount) no mitiga esta vulnerabilidad.

Arquitectura de USB2Shell (CVE-2026-98232) en SCSI CDL del Kernel Linux
Figura 1: Arquitectura técnica de CVE-2026-98232 (USB2Shell): enumeración automática USB en scsi_cdl_enable(), subdesbordamiento aritmético en MODE SENSE sobre buf[64] y corrección en el commit 3d676e458fe0.

1. Causa Raíz en drivers/scsi/scsi.c :: scsi_cdl_enable()

Introducida en Linux 6.5, la característica Command Duration Limits (CDL) permite asignar límites de latencia a comandos de almacenamiento. Cuando un dispositivo USB se identifica como un disco ATA compatible con CDL, el kernel ejecuta automáticamente scsi_cdl_enable(sdev, false) durante el escaneo, utilizando un búfer local en la pila de 64 bytes (char buf[64]) para consultar y actualizar la página de modo 0x0A / subpágina 0xF2.

Antes del parche, la función confiaba sin validación en los campos data.length, data.header_length y data.block_descriptor_length devueltos por el periférico en la respuesta MODE SENSE:

  1. Subdesbordamiento de Entero (CWE-191): Si el dispositivo reporta longitudes de cabecera o descriptores de bloque mayores que data.length, la resta sin signo se desborda hacia un valor elevado y min_t(size_t, sizeof(buf), ...) fija len = 64.
  2. Lectura y Escritura Fuera de Límites en la Pila (CWE-125 / CWE-787): El puntero buf_data sobrepasa los 64 bytes de buf[] en la pila del kernel. La operación buf_data[4] &= ~0x03 altera bits fuera de límites y scsi_mode_select() envía hasta 64 bytes de memoria de la pila del kernel de vuelta al dispositivo USB, filtrando punteros del kernel (debilitando KASLR).

2. Parche Upstream en el Kernel Linux (Commit 3d676e458fe0)

--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -1010,13 +1010,27 @@ int scsi_cdl_enable(struct scsi_device *sdev, bool enable)
 	if (sdev->is_ata) {
 		ret = scsi_mode_sense(sdev, 0x08, 0x0a, 0xf2, buf, sizeof(buf),
 				      5 * HZ, 3, &data, NULL);
 		if (ret)
 			return -EINVAL;
 
-		len = min_t(size_t, sizeof(buf),
-			    data.length - data.header_length -
-			    data.block_descriptor_length);
-		buf_data = buf + data.header_length +
-			data.block_descriptor_length;
+		avail = min_t(size_t, data.length, sizeof(buf));
+		if (data.header_length > avail)
+			return -EINVAL;
+		offset = data.header_length;
+		avail -= data.header_length;
+
+		if (data.block_descriptor_length > avail)
+			return -EINVAL;
+		offset += data.block_descriptor_length;
+		avail -= data.block_descriptor_length;
+
+		if (avail < 5)
+			return -EINVAL;
+
+		buf_data = buf + offset;
+		len = avail;

3. Guía de Remediación y Endurecimiento USB

1. Actualización del Kernel

Actualice todos los sistemas Linux con kernel 6.5 o superior a las versiones parcheadas: 6.6.158, 6.12.112, 6.18.54, 7.2.8 o 7.3+ (Windows y macOS no están afectados).

2. Listas Permitidas con USBGuard y Bloqueo de Módulos

# Configurar USBGuard para rechazar dispositivos de almacenamiento masivo USB no autorizados
sudo apt install usbguard
sudo usbguard generate-policy > /etc/usbguard/rules.conf
echo 'reject with-interface one-of { 08:*:* }' | sudo tee -a /etc/usbguard/rules.conf
sudo systemctl enable --now usbguard

En quioscos, servidores sin pantalla o entornos industriales (ICS) donde no se requieren discos USB externos, añada usbcore.authorized_default=0 en GRUB y bloquee los módulos usb-storage y uas:

cat << 'EOF' | sudo tee /etc/modprobe.d/disable-usb-storage.conf
install usb-storage /bin/false
blacklist usb-storage
install uas /bin/false
blacklist uas
EOF
sudo update-initramfs -u

Read more

ColibriSec Weekly Security Roundup — Week of December 4, 2026 Threat Intelligence Matrix

Security Roundup: CISA KEV Acronis/HFS/TYPO3 Wave, Agentic AI CyberStrikeAI & DoorDash Attacks, TeamCity & HPE CVSS 10.0, Linux 21-Year Netfilter & USB2Shell, Woolworths 14M & Roche 169GB Breaches (Week of December 4, 2026)

Executive Summary: The week of November 28 to December 4, 2026 marks a decisive operational inflection point across enterprise security, kernel engineering, autonomous AI threats, sovereign cyber legislation, and global data breaches. Between November 30 and December 3, the U.S. Cybersecurity and Infrastructure Security Agency (CISA) expanded its Known

By James Luther
CISA KEV Wave: Acronis CVE-2026-87887, Rejetto HFS CVE-2026-61500 & TYPO3 CVE-2026-125160

CISA KEV Nov 30–Dec 3 Wave: Acronis Backup Zero-Day (CVE-2026-87887), Rejetto HFS Math.random() RCE (CVE-2026-61500) & TYPO3 Path Disclosure (CVE-2026-125160)

📌Security Roundup Series: Week of December 4, 2026 • 7 min read deep dive🚨Vulnerability Intelligence: CVE ID: CVE-2026-87887 (Acronis), CVE-2026-61500 (Rejetto HFS) & CVE-2026-125160 (TYPO3) (CWE-863 Incorrect Authorization / CWE-338 Weak PRNG / CWE-209 Error Info Exposure) Severity: CRITICAL (ACTIVE EXPLOITATION IN WILD / MANDATORY CISA KEV BOD 26-04) (CVSS 9.8 Critical

By James Luther
JetBrains TeamCity CVE-2026-136858 and HPE Networking Central COP CVSS 10.0 Architecture

Enterprise CI/CD & Network Control-Plane Criticals: JetBrains TeamCity Build Agent Hijack (CVE-2026-136858) & HPE Networking Central On-Premises CVSS 10.0 SSH Backdoor

📌Security Roundup Series: Week of December 4, 2026 • 7 min read deep dive🚨Vulnerability Intelligence: CVE ID: CVE-2026-136858 (TeamCity) & CVE-2026-137285 / CVE-2026-137286 (HPE Central COP) (CWE-287 Improper Authentication / CWE-798 Use of Hard-coded Credentials) Severity: CRITICAL (TEAMCITY ACTIVELY EXPLOITED < 24H / HPE CVSS 10.0 HARD-CODED SSH) (CVSS 10.0 Critical

By James Luther
Linux Netfilter CVE-2026-139281, USB2Shell CVE-2026-98232 & RongYuan Keyboard Port 3814 Architecture

Linux Kernel & Peripheral Hardware Siege: 21-Year Netfilter IPv6 Firewall Bypass (CVE-2026-139281), USB2Shell (CVE-2026-98232) & 283-Brand RongYuan Keyboard Port 3814 CSWSH RCE

📌Security Roundup Series: Week of December 4, 2026 • 8 min read deep dive🚨Vulnerability Intelligence: CVE ID: CVE-2026-139281 (Linux Netfilter), CVE-2026-98232 (USB2Shell) & RongYuan Port 3814 CSWSH (CWE-681 Integer Truncation / CWE-191 Integer Underflow / CWE-306 Missing Auth & Wildcard CORS) Severity: CRITICAL (21-YEAR FIREWALL BYPASS, PRE-LOGIN KERNEL CORRUPTION & 283-BRAND BROWSER-TO-FIRMWARE

By James Luther