CVE-2024-35825: usb: gadget: ncm: Fix handling of zero block length packets
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: ncm: Fix handling of zero block length packets
While connecting to a Linux host with CDC_NCM_NTB_DEF_SIZE_TX
set to 65536, it has been observed that we receive short packets,
which come at interval of 5-10 seconds sometimes and have block
length zero but still contain 1-2 valid datagrams present.
According to the NCM spec:
"If wBlockLength = 0x0000, the block is terminated by a
short packet. In this case, the USB transfer must still
be shorter than dwNtbInMaxSize or dwNtbOutMaxSize. If
exactly dwNtbInMaxSize or dwNtbOutMaxSize bytes are sent,
and the size is a multiple of wMaxPacketSize for the
given pipe, then no ZLP shall be sent.
wBlockLength= 0x0000 must be used with extreme care, because
of the possibility that the host and device may get out of
sync, and because of test issues.
wBlockLength = 0x0000 allows the sender to reduce latency by
starting to send a very large NTB, and then shortening it when
the sender discovers that there’s not sufficient data to justify
sending a large NTB"
However, there is a potential issue with the current implementation,
as it checks for the occurrence of multiple NTBs in a single
giveback by verifying if the leftover bytes to be processed is zero
or not. If the block length reads zero, we would process the same
NTB infintely because the leftover bytes is never zero and it leads
to a crash. Fix this by bailing out if block length reads zero.
Security readout for executives and security teams
Plain-English summary
CVE-2024-35825 is a Linux kernel USB gadget networking flaw. A malformed or unusual CDC NCM transfer with a zero block length can make the kernel process the same network transfer repeatedly until it crashes. The primary business concern is denial of service on systems that expose this USB gadget function.
Executive priority
Treat this as a targeted availability risk, not a broad internet-facing emergency based on the provided evidence. Prioritize embedded, appliance, kiosk, lab, or operational technology systems that expose USB networking to less-trusted hosts.
Technical view
The bug is in Linux USB gadget CDC NCM handling. When wBlockLength is zero, the implementation used leftover bytes to detect additional NTBs and could loop indefinitely instead of stopping. The kernel fix bails out on zero block length. The source does not provide CVSS, CWE, or a complete exploitability assessment.
Likely exposure
Exposure appears limited to Linux systems using the USB gadget CDC NCM network function, especially embedded devices or appliances presenting USB networking to a connected host. General Linux servers are less likely exposed unless this gadget functionality is enabled and reachable through USB.
Exploitation context
The CVE source says the issue can lead to a crash. KEV is false, and the provided sources do not claim active exploitation or public weaponization. Practical exploitation details, attacker proximity, and required privileges are not fully described in the bundle.
Researcher notes
The key failure mode is infinite NTB processing when wBlockLength is zero but valid datagrams remain. The fix behavior is to stop processing that block. Evidence is strongest for root cause and patch direction; weaker for exploit preconditions, affected configurations, and severity scoring.
Mitigation direction
Update to a Linux kernel containing the referenced stable fixes.
Apply distribution kernel updates, including relevant Debian LTS advisories where applicable.
Disable unused USB gadget CDC NCM functionality where operationally feasible.
Check vendor guidance for affected appliance or embedded Linux firmware.
Prioritize devices where USB gadget networking is exposed to untrusted hosts.
Validation and detection
Inventory Linux devices using USB gadget CDC NCM or g_ncm-style networking.
Compare running kernel versions against vendor fixed kernel packages.
Confirm relevant stable commits or distribution patches are present.
Review crash logs for USB gadget NCM activity before kernel panics.
Validate remediation in a lab before updating embedded production devices.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
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-35825 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.