CVE-2024-57981: usb: xhci: Fix NULL pointer dereference on certain command aborts
In the Linux kernel, the following vulnerability has been resolved:
usb: xhci: Fix NULL pointer dereference on certain command aborts
If a command is queued to the final usable TRB of a ring segment, the
enqueue pointer is advanced to the subsequent link TRB and no further.
If the command is later aborted, when the abort completion is handled
the dequeue pointer is advanced to the first TRB of the next segment.
If no further commands are queued, xhci_handle_stopped_cmd_ring() sees
the ring pointers unequal and assumes that there is a pending command,
so it calls xhci_mod_cmd_timer() which crashes if cur_cmd was NULL.
Don't attempt timer setup if cur_cmd is NULL. The subsequent doorbell
ring likely is unnecessary too, but it's harmless. Leave it alone.
This is probably Bug 219532, but no confirmation has been received.
The issue has been independently reproduced and confirmed fixed using
a USB MCU programmed to NAK the Status stage of SET_ADDRESS forever.
Everything continued working normally after several prevented crashes.
This Linux kernel issue can crash a system when the USB xHCI driver mishandles a command abort. The public description ties the crash to specific USB controller command-ring state and confirms a fix. Business impact is mainly availability, especially for Linux hosts or appliances where untrusted USB devices can be connected.
Executive priority
Treat as a moderate availability risk. Prioritize patching Linux endpoints, servers, and appliances where users or outsiders can attach USB devices, but do not escalate as internet-exploited based on the supplied evidence.
Technical view
The flaw is a NULL pointer dereference in the Linux xHCI USB host controller driver. After a command queued at the last usable TRB is aborted, ring pointer advancement can make stopped-command handling assume a pending command and call timer setup while cur_cmd is NULL.
Likely exposure
Exposure is most plausible on Linux systems running affected kernel ranges with xHCI USB support and reachable physical USB ports. Debian LTS advisories and upstream stable commits indicate downstream patch activity. The provided data does not identify remote network exposure.
Exploitation context
No active exploitation is supported by the provided sources, and KEV is false. The reproducer described by the kernel source used a USB MCU that indefinitely NAKed the SET_ADDRESS status stage, causing crashes before the fix.
Researcher notes
The key condition is command-ring pointer desynchronization after abort completion, leading xhci_handle_stopped_cmd_ring() to call xhci_mod_cmd_timer() with cur_cmd NULL. Evidence supports crash reproduction and fix confirmation, but not privilege escalation or remote exploitation.
Mitigation direction
Update to a kernel containing the referenced upstream stable fixes.
Apply relevant distribution security updates, including Debian LTS where applicable.
Restrict untrusted physical USB device access until patched.
For embedded or vendor appliances, check vendor advisories and firmware availability.
Validation and detection
Inventory Linux kernel versions on systems with exposed USB ports.
Confirm xHCI USB host controller support is present where exposure matters.
Verify the deployed kernel includes one of the referenced stable fixes.
Check distro advisories for backported patches rather than relying only on version strings.
Based on public source material and reviewed before publication.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-57981 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
2ADP providers
13Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Feb 27, 2025, 02:07 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.