CVE-2026-142988: usb: xhci: disable the correct slot on alloc_dev failure
In the Linux kernel, the following vulnerability has been resolved:
usb: xhci: disable the correct slot on allocdev failure
xhciallocdev() stores the Slot ID returned by the Enable Slot command in the local slotid variable. udev->slotid is updated only after xhciallocvirtdevice() succeeds.
If endpoint resource reservation or virtual device allocation fails before that update, the error path passes udev->slotid to xhcidisableandfreeslot(). During initial enumeration this is slot 0. When reallocating a device whose virtual device is missing or belongs to another usbdevice, udev->slotid may contain a stale Slot ID. The newly enabled slot can therefore remain active, or the wrong slot can be disabled.
Pass slotid, which identifies the slot enabled by this invocation. xhcidisableandfreeslot() already handles a missing xhci->devs entry.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel xHCI USB host-controller path are affected when device allocation fails during USB device enumeration or reallocation. The issue is relevant specifically to failures after an xHCI slot is enabled but before the virtual device setup completes.
What conditions trigger the incorrect slot handling?
An attacker or triggering condition would need to cause endpoint resource reservation or virtual-device allocation to fail during xhci_alloc_dev(). During initial enumeration, the error path can use slot 0; during reallocation, it can use a stale slot ID associated with another device or a missing virtual device.
What can happen when the failure path is reached?
The newly enabled xHCI slot may remain active instead of being freed, or the error path may disable the wrong slot. This can occur because the cleanup uses udev->slot_id before that field has been updated with the slot enabled by the current allocation attempt.
How is the issue addressed?
The fix passes the local slot_id returned by the current Enable Slot command to xhci_disable_and_free_slot(). This ensures cleanup targets the slot enabled by the failing invocation, including when there is no corresponding xhci->devs entry.