CVE & CISA-KEV Catalog

CVE-2024-56687

MEDIUM
5.5
CVSS v3
NVD

Description

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---

How to fix

Remediation Available
linuxDebian
Fixed in:6.1.123-1CVE-2024-56687
Fixed in:6.12.3-1CVE-2024-56687
Fixed in:6.12.3-1CVE-2024-56687
linuxUbuntu
Fixed in:6.8.0-58.60USN-7449-1
linux-awsUbuntu
Fixed in:6.8.0-1027.29USN-7449-1
linux-aws-6.8Ubuntu
Fixed in:6.8.0-1027.29~22.04.1USN-7451-1
linux-azureUbuntu
Fixed in:6.8.0-1027.32USN-7449-1
linux-azure-6.8Ubuntu
Fixed in:6.8.0-1027.32~22.04.1USN-7449-1
linux-azure-nvidiaUbuntu
Fixed in:6.8.0-1014.15USN-7468-1
linux-gcpUbuntu
Fixed in:6.8.0-1028.30USN-7450-1
linux-gcp-6.8Ubuntu
Fixed in:6.8.0-1028.30~22.04.1USN-7452-1
linux-gkeUbuntu
Fixed in:6.8.0-1023.27USN-7450-1
linux-gkeopUbuntu
Fixed in:6.8.0-1010.12USN-7450-1
linux-hwe-6.8Ubuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
linux-ibmUbuntu
Fixed in:6.8.0-1024.24USN-7449-1
linux-image-6.11.0-1015-oemUbuntu
Fixed in:6.11.0-1015.15USN-7310-1
linux-image-6.8.0-1010-gkeopUbuntu
Fixed in:6.8.0-1010.12USN-7450-1
linux-image-6.8.0-1014-azure-nvidiaUbuntu
Fixed in:6.8.0-1014.15USN-7468-1
linux-image-6.8.0-1023-gkeUbuntu
Fixed in:6.8.0-1023.27USN-7450-1
linux-image-6.8.0-1024-ibmUbuntu
Fixed in:6.8.0-1024.24USN-7449-1
linux-image-6.8.0-1024-oracleUbuntu
Fixed in:6.8.0-1024.25~22.04.1USN-7449-1
Fixed in:6.8.0-1024.25USN-7449-1
linux-image-6.8.0-1024-oracle-64kUbuntu
Fixed in:6.8.0-1024.25~22.04.1USN-7449-1
Fixed in:6.8.0-1024.25USN-7449-1
linux-image-6.8.0-1026-nvidiaUbuntu
Fixed in:6.8.0-1026.29~22.04.1USN-7449-1
Fixed in:6.8.0-1026.29USN-7449-1
linux-image-6.8.0-1026-nvidia-64kUbuntu
Fixed in:6.8.0-1026.29~22.04.1USN-7449-1
Fixed in:6.8.0-1026.29USN-7449-1
linux-image-6.8.0-1026-nvidia-lowlatencyUbuntu
Fixed in:6.8.0-1026.29.1USN-7449-1
linux-image-6.8.0-1026-nvidia-lowlatency-64kUbuntu
Fixed in:6.8.0-1026.29.1USN-7449-1
linux-image-6.8.0-1026-oemUbuntu
Fixed in:6.8.0-1026.26USN-7449-1
linux-image-6.8.0-1027-awsUbuntu
Fixed in:6.8.0-1027.29~22.04.1USN-7451-1
Fixed in:6.8.0-1027.29USN-7449-1
linux-image-6.8.0-1027-azureUbuntu
Fixed in:6.8.0-1027.32~22.04.1USN-7449-1
Fixed in:6.8.0-1027.32USN-7449-1
linux-image-6.8.0-1027-azure-fdeUbuntu
Fixed in:6.8.0-1027.32~22.04.1USN-7449-1
Fixed in:6.8.0-1027.32USN-7449-1
linux-image-6.8.0-1028-gcpUbuntu
Fixed in:6.8.0-1028.30~22.04.1USN-7452-1
Fixed in:6.8.0-1028.30USN-7450-1
linux-image-6.8.0-1028-gcp-64kUbuntu
Fixed in:6.8.0-1028.30~22.04.1USN-7452-1
Fixed in:6.8.0-1028.30USN-7450-1
linux-image-6.8.0-1028-raspiUbuntu
Fixed in:6.8.0-1028.32USN-7524-1
linux-image-6.8.0-2023-raspi-realtimeUbuntu
Fixed in:6.8.0-2023.24USN-7523-1
linux-image-6.8.0-58-genericUbuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
Fixed in:6.8.0-58.60+1USN-7449-1
linux-image-6.8.0-58-generic-64kUbuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
Fixed in:6.8.0-58.60+1USN-7449-1
linux-image-6.8.0-58-lowlatencyUbuntu
Fixed in:6.8.0-58.60.1~22.04.1USN-7449-1
Fixed in:6.8.0-58.60.1USN-7449-1
linux-image-6.8.0-58-lowlatency-64kUbuntu
Fixed in:6.8.0-58.60.1~22.04.1USN-7449-1
Fixed in:6.8.0-58.60.1USN-7449-1
linux-image-6.8.1-1020-realtimeUbuntu
Fixed in:6.8.1-1020.21USN-7453-1
linux-image-awsUbuntu
Fixed in:6.8.0-1027.29~22.04.1USN-7451-1
Fixed in:6.8.0-1027.29USN-7449-1
linux-image-aws-lts-24.04Ubuntu
Fixed in:6.8.0-1027.29USN-7449-1
linux-image-azureUbuntu
Fixed in:6.8.0-1027.32~22.04.1USN-7449-1
linux-image-azure-fdeUbuntu
Fixed in:6.8.0-1027.32~22.04.1USN-7449-1
linux-image-azure-fde-lts-24.04Ubuntu
Fixed in:6.8.0-1027.32USN-7449-1
linux-image-azure-lts-24.04Ubuntu
Fixed in:6.8.0-1027.32USN-7449-1
linux-image-azure-nvidiaUbuntu
Fixed in:6.8.0-1014.15USN-7468-1
linux-image-gcpUbuntu
Fixed in:6.8.0-1028.30~22.04.1USN-7452-1
linux-image-gcp-64kUbuntu
Fixed in:6.8.0-1028.30~22.04.1USN-7452-1
linux-image-gcp-64k-lts-24.04Ubuntu
Fixed in:6.8.0-1028.30USN-7450-1
linux-image-gcp-lts-24.04Ubuntu
Fixed in:6.8.0-1028.30USN-7450-1
linux-image-genericUbuntu
Fixed in:6.8.0-58.60USN-7449-1
linux-image-generic-64kUbuntu
Fixed in:6.8.0-58.60USN-7449-1
linux-image-generic-64k-hwe-22.04Ubuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
linux-image-generic-hwe-22.04Ubuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
linux-image-generic-lpaeUbuntu
Fixed in:6.8.0-58.60USN-7449-1
linux-image-gkeUbuntu
Fixed in:6.8.0-1023.27USN-7450-1
linux-image-gkeopUbuntu
Fixed in:6.8.0-1010.12USN-7450-1
linux-image-gkeop-6.8Ubuntu
Fixed in:6.8.0-1010.12USN-7450-1
linux-image-ibmUbuntu
Fixed in:6.8.0-1024.24USN-7449-1
linux-image-ibm-classicUbuntu
Fixed in:6.8.0-1024.24USN-7449-1
linux-image-ibm-lts-24.04Ubuntu
Fixed in:6.8.0-1024.24USN-7449-1
linux-image-kvmUbuntu
Fixed in:6.8.0-58.60USN-7449-1
linux-image-lowlatencyUbuntu
Fixed in:6.8.0-58.60.1USN-7449-1
linux-image-lowlatency-64kUbuntu
Fixed in:6.8.0-58.60.1USN-7449-1
linux-image-lowlatency-64k-hwe-22.04Ubuntu
Fixed in:6.8.0-58.60.1~22.04.1USN-7449-1
linux-image-lowlatency-hwe-22.04Ubuntu
Fixed in:6.8.0-58.60.1~22.04.1USN-7449-1
linux-image-nvidiaUbuntu
Fixed in:6.8.0-1026.29USN-7449-1
linux-image-nvidia-6.8Ubuntu
Fixed in:6.8.0-1026.29~22.04.1USN-7449-1
linux-image-nvidia-64kUbuntu
Fixed in:6.8.0-1026.29USN-7449-1
linux-image-nvidia-64k-6.8Ubuntu
Fixed in:6.8.0-1026.29~22.04.1USN-7449-1
linux-image-nvidia-64k-hwe-22.04Ubuntu
Fixed in:6.8.0-1026.29~22.04.1USN-7449-1
linux-image-nvidia-hwe-22.04Ubuntu
Fixed in:6.8.0-1026.29~22.04.1USN-7449-1
linux-image-nvidia-lowlatencyUbuntu
Fixed in:6.8.0-1026.29.1USN-7449-1
linux-image-nvidia-lowlatency-64kUbuntu
Fixed in:6.8.0-1026.29.1USN-7449-1
linux-image-oem-22.04Ubuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
linux-image-oem-22.04aUbuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
linux-image-oem-22.04bUbuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
linux-image-oem-22.04cUbuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
linux-image-oem-22.04dUbuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
linux-image-oem-24.04Ubuntu
Fixed in:6.8.0-1026.26USN-7449-1
linux-image-oem-24.04aUbuntu
Fixed in:6.8.0-1026.26USN-7449-1
linux-image-oem-24.04bUbuntu
Fixed in:6.11.0-1015.15USN-7310-1
linux-image-oracleUbuntu
Fixed in:6.8.0-1024.25~22.04.1USN-7449-1
Fixed in:6.8.0-1024.25USN-7449-1
linux-image-oracle-64kUbuntu
Fixed in:6.8.0-1024.25~22.04.1USN-7449-1
Fixed in:6.8.0-1024.25USN-7449-1
linux-image-oracle-64k-lts-24.04Ubuntu
Fixed in:6.8.0-1024.25USN-7449-1
linux-image-oracle-lts-24.04Ubuntu
Fixed in:6.8.0-1024.25USN-7449-1
linux-image-raspiUbuntu
Fixed in:6.8.0-1028.32USN-7524-1
linux-image-raspi-realtimeUbuntu
Fixed in:6.8.0-2023.24USN-7523-1
linux-image-realtimeUbuntu
Fixed in:6.8.1-1020.21USN-7453-1
linux-image-realtime-hwe-24.04Ubuntu
Fixed in:6.8.1-1020.21USN-7453-1
linux-image-virtualUbuntu
Fixed in:6.8.0-58.60USN-7449-1
linux-image-virtual-hwe-22.04Ubuntu
Fixed in:6.8.0-58.60~22.04.1USN-7449-2
linux-lowlatencyUbuntu
Fixed in:6.8.0-58.60.1USN-7449-1
linux-lowlatency-hwe-6.8Ubuntu
Fixed in:6.8.0-58.60.1~22.04.1USN-7449-1
linux-nvidiaUbuntu
Fixed in:6.8.0-1026.29USN-7449-1
linux-nvidia-6.8Ubuntu
Fixed in:6.8.0-1026.29~22.04.1USN-7449-1
linux-nvidia-lowlatencyUbuntu
Fixed in:6.8.0-1026.29.1USN-7449-1
linux-oem-6.11Ubuntu
Fixed in:6.11.0-1015.15USN-7310-1
linux-oem-6.8Ubuntu
Fixed in:6.8.0-1026.26USN-7449-1
linux-oracleUbuntu
Fixed in:6.8.0-1024.25USN-7449-1
linux-oracle-6.8Ubuntu
Fixed in:6.8.0-1024.25~22.04.1USN-7449-1
linux-raspiUbuntu
Fixed in:6.8.0-1028.32USN-7524-1
linux-raspi-realtimeUbuntu
Fixed in:6.8.0-2023.24USN-7523-1
linux-realtimeUbuntu
Fixed in:6.8.1-1020.21USN-7453-1

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityNone
AvailabilityHigh

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Exploit Intelligence

0.16%probability of exploitation in 30 days
5thpercentile

Low risk: more likely to be exploited than 5% of all known CVEs.

References

Related Vulnerabilities

Other CWE-667 vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2019-10072High7.573%-Fix
CVE-2002-1850High7.517%-Fix
CVE-2009-2699High7.514%-Fix
CVE-2004-0174High7.512%--
CVE-2009-4272High7.511%--
CVE-2020-24606High8.65.2%-Fix
Embed a live status badge for CVE-2024-56687
CVE-2024-56687 severity badge

Markdown

[![CVE-2024-56687](https://tridentstack.com/cve/badge/CVE-2024-56687.svg)](https://tridentstack.com/cve/CVE-2024-56687)

HTML

<a href="https://tridentstack.com/cve/CVE-2024-56687"><img src="https://tridentstack.com/cve/badge/CVE-2024-56687.svg" alt="CVE-2024-56687"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-11-03.