In the Linux kernel, the following vulnerability has been resolved:
usb: musb: Fix hardware lockup on first Rx endpoint request
There is a possibility that a request's callback could be invoked from usb_ep_queue() (call trace below, supplemented with missing calls):
req->complete from usb_gadget_giveback_request (drivers/usb/gadget/udc/core.c:999) usb_gadget_giveback_request from musb_g_giveback (drivers/usb/musb/musb_gadget.c:147) musb_g_giveback from rxstate (drivers/usb/musb/musb_gadget.c:784) rxstate from musb_ep_restart (drivers/usb/musb/musb_gadget.c:1169) musb_ep_restart from musb_ep_restart_resume_work (drivers/usb/musb/musb_gadget.c:1176) musb_ep_restart_resume_work from musb_queue_resume_work (drivers/usb/musb/musb_core.c:2279) musb_queue_resume_work from musb_gadget_queue (drivers/usb/musb/musb_gadget.c:1241) musb_gadget_queue from usb_ep_queue (drivers/usb/gadget/udc/core.c:300)
According to the docstring of usb_ep_queue(), this should not happen:
"Note that @req's ->complete() callback must never be called from within usb_ep_queue() as that can create deadlock situations."
In fact, a hardware lockup might occur in the following sequence:
1. The gadget is initialized using musb_gadget_enable(). 2. Meanwhile, a packet arrives, and the RXPKTRDY flag is set, raising an interrupt. 3. If IRQs are enabled, the interrupt is handled, but musb_g_rx() finds an empty queue (next_request() returns NULL). The interrupt flag has already been cleared by the glue layer handler, but the RXPKTRDY flag remains set. 4. The first request is enqueued using usb_ep_queue(), leading to the call of req->complete(), as shown in the call trace above. 5. If the callback enables IRQs and another packet is waiting, step (3) repeats. The request queue is empty because usb_g_giveback() removes the request before invoking the callback. 6. The endpoint remains locked up, as the interrupt triggered by hardware setting the RXPKTRDY flag has been handled, but the flag itself remains set.
For this scenario to occur, it is only necessary for IRQs to be enabled at some point during the complete callback. This happens with the USB Ethernet gadget, whose rx_complete() callback calls netif_rx(). If called in the task context, netif_rx() disables the bottom halves (BHs). When the BHs are re-enabled, IRQs are also enabled to allow soft IRQs to be processed. The gadget itself is initialized at module load (or at boot if built-in), but the first request is enqueued when the network interface is brought up, triggering rx_complete() in the task context via ioctl(). If a packet arrives while the interface is down, it can prevent the interface from receiving any further packets from the USB host.
The situation is quite complicated with many parties involved. This particular issue can be resolved in several possible ways:
1. Ensure that callbacks never enable IRQs. This would be difficult to enforce, as discovering how netif_rx() interacts with interrupts was already quite challenging and u_ether is not the only function driver. Similar "bugs" could be hidden in other drivers as well. 2. Disable MUSB interrupts in musb_g_giveback() before calling the callback and re-enable them afterwars (by calling musb_{dis,en}able_interrupts(), for example). This would ensure that MUSB interrupts are not handled during the callback, even if IRQs are enabled. In fact, it would allow IRQs to be enabled when releasing the lock. However, this feels like an inelegant hack. 3. Modify the interrupt handler to clear the RXPKTRDY flag if the request queue is empty. While this approach also feels like a hack, it wastes CPU time by attempting to handle incoming packets when the software is not ready to process them. 4. Flush the Rx FIFO instead of calling rxstate() in musb_ep_restart(). This ensures that the hardware can receive packets when there is at least one request in the queue. Once I ---truncated---
CVSS Details
- CVSS 3.1 Base Score: 5.5
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon_linux_2023 | — | Upgrade kernel-debuginfo-common-x86_64Upgrade perf-debuginfoUpgrade python3-perf-debuginfoUpgrade bpftool-debuginfoUpgrade kernel-toolsUpgrade kernel-libbpfUpgrade kernel-headersUpgrade kernel-modules-extraUpgrade kernel-tools-debuginfoUpgrade kernel-debuginfoUpgrade kernel-tools-develUpgrade bpftoolUpgrade kernel-libbpf-staticUpgrade kernel-debuginfo-common-aarch64Upgrade python3-perfUpgrade kernelUpgrade perfUpgrade kernel-livepatch-6.1.124-134.200Upgrade kernel-libbpf-develUpgrade kernel-develUpgrade kernel-modules-extra-common | Mar 27, 2025 | Dec 28, 2024 |
| Debian | — | Upgrade linuxUpgrade linux-6.1 | Jan 13, 2025 | Dec 28, 2024 |
| Ubuntu | — | Upgrade linux-image-nvidia-lowlatencyUpgrade linux-image-6.8.0-58-lowlatency-64kUpgrade linux-image-raspi-realtimeUpgrade linux-image-6.8.0-1024-oracle-64kUpgrade linux-image-oracle-64kUpgrade linux-image-6.11.0-1005-realtimeUpgrade linux-image-6.8.0-2023-raspi-realtimeUpgrade linux-image-gcpUpgrade linux-image-ibm-classicUpgrade linux-image-6.11.0-1011-oracle-64kUpgrade linux-image-6.8.0-1028-gcpUpgrade linux-image-oracle-64k-lts-24.04Upgrade linux-image-oem-22.04bUpgrade linux-image-6.8.0-1028-raspiUpgrade linux-image-oem-24.04aUpgrade linux-image-6.11.0-1009-gcpUpgrade linux-image-lowlatency-64kUpgrade linux-image-6.8.1-1020-realtimeUpgrade linux-image-virtual-hwe-24.04Upgrade linux-image-gcp-64k-lts-24.04Upgrade linux-image-generic-64kUpgrade linux-image-6.8.0-1027-awsUpgrade linux-image-genericUpgrade linux-image-azure-nvidiaUpgrade linux-image-oem-22.04aUpgrade linux-image-azure-fdeUpgrade linux-image-6.8.0-58-lowlatencyUpgrade linux-image-gkeop-6.8Upgrade linux-image-oem-22.04cUpgrade linux-image-virtualUpgrade linux-image-nvidia-lowlatency-64kUpgrade linux-image-ibm-lts-24.04Upgrade linux-image-nvidia-64k-hwe-22.04Upgrade linux-image-realtime-hwe-24.04Upgrade linux-image-lowlatency-hwe-22.04Upgrade linux-image-6.11.0-1009-azure-fdeUpgrade linux-image-lowlatencyUpgrade linux-image-6.11.0-1011-oracleUpgrade linux-image-oem-24.04bUpgrade linux-image-nvidiaUpgrade linux-image-generic-lpaeUpgrade linux-image-oem-22.04Upgrade linux-image-6.11.0-18-genericUpgrade linux-image-azure-lts-24.04Upgrade linux-image-6.11.0-1009-azureUpgrade linux-image-6.8.0-1014-azure-nvidiaUpgrade linux-image-azure-fde-lts-24.04Upgrade linux-image-6.8.0-58-generic-64kUpgrade linux-image-oracle-lts-24.04Upgrade linux-image-nvidia-64k-6.8Upgrade linux-image-azureUpgrade linux-image-ibmUpgrade linux-image-gkeopUpgrade linux-image-nvidia-hwe-22.04Upgrade linux-image-oem-24.04Upgrade linux-image-6.8.0-1026-nvidia-64kUpgrade linux-image-6.8.0-1024-ibmUpgrade linux-image-6.8.0-1027-azure-fdeUpgrade linux-image-aws-lts-24.04Upgrade linux-image-6.8.0-1024-oracleUpgrade linux-image-awsUpgrade linux-image-realtimeUpgrade linux-image-raspiUpgrade linux-image-6.11.0-1010-lowlatency-64kUpgrade linux-image-6.11.0-1008-raspiUpgrade linux-image-6.11.0-1010-lowlatencyUpgrade linux-image-gkeUpgrade linux-image-lowlatency-64k-hwe-22.04Upgrade linux-image-kvmUpgrade linux-image-6.8.0-1026-nvidia-lowlatencyUpgrade linux-image-6.11.0-1009-awsUpgrade linux-image-nvidia-64kUpgrade linux-image-generic-hwe-22.04Upgrade linux-image-6.8.0-1027-azureUpgrade linux-image-6.8.0-1026-nvidiaUpgrade linux-image-gcp-64kUpgrade linux-image-6.8.0-1026-nvidia-lowlatency-64kUpgrade linux-image-6.8.0-1023-gkeUpgrade linux-image-6.11.0-1015-oemUpgrade linux-image-oem-22.04dUpgrade linux-image-6.8.0-1026-oemUpgrade linux-image-virtual-hwe-22.04Upgrade linux-image-nvidia-6.8Upgrade linux-image-generic-64k-hwe-22.04Upgrade linux-image-gcp-lts-24.04Upgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-6.8.0-1010-gkeopUpgrade linux-image-6.8.0-58-genericUpgrade linux-image-6.8.0-1028-gcp-64kUpgrade linux-image-generic-hwe-24.04Upgrade linux-image-6.11.0-18-generic-64kUpgrade linux-image-oracle | Feb 20, 2025 | Dec 28, 2024 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Oct 13, 2025 | Dec 28, 2024 |
Prioritize with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub