Skip to main content

CVE-2025-21776: Vulnerability in Linux Linux

High
VulnerabilityCVE-2025-21776cvecve-2025-21776
Published: Thu Feb 27 2025 (02/27/2025, 02:18:21 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: USB: hub: Ignore non-compliant devices with too many configs or interfaces Robert Morris created a test program which can cause usb_hub_to_struct_hub() to dereference a NULL or inappropriate pointer: Oops: general protection fault, probably for non-canonical address 0xcccccccccccccccc: 0000 [#1] SMP DEBUG_PAGEALLOC PTI CPU: 7 UID: 0 PID: 117 Comm: kworker/7:1 Not tainted 6.13.0-rc3-00017-gf44d154d6e3d #14 Hardware name: FreeBSD BHYVE/BHYVE, BIOS 14.0 10/17/2021 Workqueue: usb_hub_wq hub_event RIP: 0010:usb_hub_adjust_deviceremovable+0x78/0x110 ... Call Trace: <TASK> ? die_addr+0x31/0x80 ? exc_general_protection+0x1b4/0x3c0 ? asm_exc_general_protection+0x26/0x30 ? usb_hub_adjust_deviceremovable+0x78/0x110 hub_probe+0x7c7/0xab0 usb_probe_interface+0x14b/0x350 really_probe+0xd0/0x2d0 ? __pfx___device_attach_driver+0x10/0x10 __driver_probe_device+0x6e/0x110 driver_probe_device+0x1a/0x90 __device_attach_driver+0x7e/0xc0 bus_for_each_drv+0x7f/0xd0 __device_attach+0xaa/0x1a0 bus_probe_device+0x8b/0xa0 device_add+0x62e/0x810 usb_set_configuration+0x65d/0x990 usb_generic_driver_probe+0x4b/0x70 usb_probe_device+0x36/0xd0 The cause of this error is that the device has two interfaces, and the hub driver binds to interface 1 instead of interface 0, which is where usb_hub_to_struct_hub() looks. We can prevent the problem from occurring by refusing to accept hub devices that violate the USB spec by having more than one configuration or interface.

AI-Powered Analysis

AILast updated: 06/30/2025, 08:57:54 UTC

Technical Analysis

CVE-2025-21776 is a vulnerability identified in the Linux kernel's USB hub driver subsystem. The flaw arises when the kernel attempts to handle USB hub devices that do not comply with the USB specification, specifically those presenting multiple configurations or interfaces beyond the norm. The vulnerability is triggered by a crafted USB device that has more than one configuration or interface, which causes the usb_hub_to_struct_hub() function to dereference a NULL or invalid pointer. This leads to a general protection fault (kernel panic) due to accessing a non-canonical memory address, effectively causing a denial of service (DoS) condition. The root cause is that the hub driver incorrectly binds to interface 1 instead of interface 0, where the usb_hub_to_struct_hub() function expects to find the hub structure. The Linux kernel developers have addressed this issue by modifying the USB hub driver to reject hub devices that violate the USB specification by having more than one configuration or interface. This prevents the kernel from processing malformed or malicious USB devices that could exploit this pointer dereference flaw. The vulnerability affects Linux kernel versions prior to the patch and is triggered by connecting a malicious or malformed USB device. There are no known exploits in the wild at the time of publication, and no CVSS score has been assigned yet. The vulnerability primarily impacts the availability of affected systems by causing kernel crashes and potential system reboots when the malicious USB device is connected.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions, especially those with USB ports exposed to untrusted environments or users. The impact is mainly a denial of service, where affected systems could crash or reboot unexpectedly upon connection of a malicious USB device. This could disrupt critical services, especially in environments where Linux servers or workstations are used for operational technology, industrial control systems, or critical infrastructure. Additionally, organizations with bring-your-own-device (BYOD) policies or shared USB device usage could be at higher risk if malicious devices are introduced. While the vulnerability does not directly lead to privilege escalation or data leakage, the resulting downtime and potential loss of availability could have significant operational and financial consequences. European organizations in sectors such as manufacturing, healthcare, finance, and government, which rely heavily on Linux-based systems, should be particularly vigilant. The vulnerability also raises concerns about supply chain security and physical security controls around USB device usage.

Mitigation Recommendations

1. Apply the latest Linux kernel patches that address CVE-2025-21776 as soon as they become available to ensure the USB hub driver rejects non-compliant devices. 2. Implement strict USB device control policies, including disabling unused USB ports or using USB port control software to restrict device types and enforce device whitelisting. 3. Employ endpoint security solutions that monitor and block unauthorized USB devices from connecting to critical systems. 4. Educate users about the risks of connecting unknown or untrusted USB devices, especially in environments with sensitive data or critical operations. 5. For high-security environments, consider using hardware-based USB port locks or disabling USB ports via BIOS/UEFI settings where feasible. 6. Monitor system logs for kernel panics or USB-related errors that could indicate attempted exploitation. 7. Incorporate USB device validation into asset management and security audits to detect and remove potentially malicious devices. 8. In virtualized or containerized environments, ensure that USB passthrough is carefully controlled and monitored to prevent exposure to malicious devices.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T08:45:45.763Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9832c4522896dcbe8791

Added to database: 5/21/2025, 9:09:06 AM

Last enriched: 6/30/2025, 8:57:54 AM

Last updated: 8/18/2025, 11:28:44 PM

Views: 18

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats