usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.10.76.11In the Linux kernel, the following vulnerability has been resolved:
usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup()
If xhci_mem_init() fails, it calls into xhci_mem_cleanup() to mop up the damage. If it fails early enough, before xhci->interrupters is allocated but after xhci->max_interrupters has been set, which happens in most (all?) cases, things get uglier, as xhci_mem_cleanup() unconditionally derefences xhci->interrupters. With prejudice.
Gate the interrupt freeing loop with a check on xhci->interrupters being non-NULL.
Found while debugging a DMA allocation issue that led the XHCI driver on this exact path.
From the CVE record · Linux
The Linux kernel’s USB xHCI cleanup path can dereference an unallocated interrupters pointer if memory initialization fails after the maximum interrupter count is set. A DMA allocation issue was observed to reach this path. The input does not specify an attacker route, authentication requirement, or user interaction.
Engineers running the Linux kernel should check whether their kernel includes the USB xHCI fix; affected versions are not specified.