CVE-2025-21776

Source
https://cve.org/CVERecord?id=CVE-2025-21776
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21776.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-21776
Downstream
Related
Published
2025-02-27T02:18:21.503Z
Modified
2026-03-12T02:17:37.044293Z
Summary
USB: hub: Ignore non-compliant devices with too many configs or interfaces
Details

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 usbhubtostructhub() to dereference a NULL or inappropriate pointer:

Oops: general protection fault, probably for non-canonical address 0xcccccccccccccccc: 0000 [#1] SMP DEBUGPAGEALLOC 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: usbhubwq hubevent RIP: 0010:usbhubadjustdeviceremovable+0x78/0x110 ... Call Trace: <TASK> ? dieaddr+0x31/0x80 ? excgeneralprotection+0x1b4/0x3c0 ? asmexcgeneralprotection+0x26/0x30 ? usbhubadjustdeviceremovable+0x78/0x110 hubprobe+0x7c7/0xab0 usbprobeinterface+0x14b/0x350 reallyprobe+0xd0/0x2d0 ? pfxdeviceattach_driver+0x10/0x10 __driverprobedevice+0x6e/0x110 driverprobedevice+0x1a/0x90 __deviceattachdriver+0x7e/0xc0 bus_foreachdrv+0x7f/0xd0 _deviceattach+0xaa/0x1a0 busprobedevice+0x8b/0xa0 deviceadd+0x62e/0x810 usbsetconfiguration+0x65d/0x990 usbgenericdriverprobe+0x4b/0x70 usbprobedevice+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 usbhubtostructhub() 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21776.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d2123fd9e1a56b8006986ed37e0aaf93ef0dd978
Fixed
49f077106fa07919a6a6dda99bb490dd1d1a8218
Fixed
d343fe0fad5c1d689775f2dda24a85ce98e29566
Fixed
d3a67adb365cdfdac4620daf38a82e57ca45806c
Fixed
c3720b04df84b5459050ae4e03ec7d545652f897
Fixed
e905a0fca7bff0855d312c16f71e60e1773b393e
Fixed
62d8f4c5454dd39aded4f343720d1c5a1803cfef
Fixed
5b9778e1fe715700993ce436c152dc3b7df0b490
Fixed
2240fed37afbcdb5e8b627bc7ad986891100e05d

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21776.json"