CVE-2024-35825
usb: gadget: ncm: Fix handling of zero block length packets
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= ff3ba016263ee93a1c6209bf5ab1599de7ab1512, < e2dbfea520e60d58e0c498ba41bde10452257779; >= e7ca00f35d8a17af1ae19d529193ebc21bfda164, < a766761d206e7c36d7526e0ae749949d17ca582c; >= 17c653d4913bbc50d284aa96cf12bfc63e41ee5c, < ef846cdbd100f7f9dc045e8bcd7fe4b3a3713c03; >= 7014807fb7efa169a47a7a0a0a41d2c513925de0, < 92b051b87658df7649ffcdef522593f21a2b296b; >= 49fbc18378ae72a47feabee97fdb86f3cea09765, < 7664ee8bd80309b90d53488b619764f0a057f2b7; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < a0f77b5d6067285b8eca0ee3bd1e448a6258026f; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < 6b2c73111a252263807b7598682663dc33aa4b4c; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < f90ce1e04cbcc76639d6cba0fdbd820cd80b3c70; 5bdf93a2f5459f944b416b188178ca4a92fd206f; 4bf1a9d20c65b9e80ca4b171267103f8d4f2c61f; …
- Anyone running Linux 6.6
Vulnerability facts
- Affected
- Linux >= ff3ba016263ee93a1c6209bf5ab1599de7ab1512, < e2dbfea520e60d58e0c498ba41bde10452257779; >= e7ca00f35d8a17af1ae19d529193ebc21bfda164, < a766761d206e7c36d7526e0ae749949d17ca582c; >= 17c653d4913bbc50d284aa96cf12bfc63e41ee5c, < ef846cdbd100f7f9dc045e8bcd7fe4b3a3713c03; >= 7014807fb7efa169a47a7a0a0a41d2c513925de0, < 92b051b87658df7649ffcdef522593f21a2b296b; >= 49fbc18378ae72a47feabee97fdb86f3cea09765, < 7664ee8bd80309b90d53488b619764f0a057f2b7; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < a0f77b5d6067285b8eca0ee3bd1e448a6258026f; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < 6b2c73111a252263807b7598682663dc33aa4b4c; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < f90ce1e04cbcc76639d6cba0fdbd820cd80b3c70; 5bdf93a2f5459f944b416b188178ca4a92fd206f; 4bf1a9d20c65b9e80ca4b171267103f8d4f2c61f; …; Linux 6.6
- Fixed in
- Linux 92b051b87658df7649ffcdef522593f21a2b296b, Linux 7664ee8bd80309b90d53488b619764f0a057f2b7, Linux 6b2c73111a252263807b7598682663dc33aa4b4c
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.5 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 0.34% chance of exploitation in 30 days (percentile 20, 2026-11-26)
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= ff3ba016263ee93a1c6209bf5ab1599de7ab1512, < e2dbfea520e60d58e0c498ba41bde10452257779; >= e7ca00f35d8a17af1ae19d529193ebc21bfda164, < a766761d206e7c36d7526e0ae749949d17ca582c; >= 17c653d4913bbc50d284aa96cf12bfc63e41ee5c, < ef846cdbd100f7f9dc045e8bcd7fe4b3a3713c03; >= 7014807fb7efa169a47a7a0a0a41d2c513925de0, < 92b051b87658df7649ffcdef522593f21a2b296b; >= 49fbc18378ae72a47feabee97fdb86f3cea09765, < 7664ee8bd80309b90d53488b619764f0a057f2b7; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < a0f77b5d6067285b8eca0ee3bd1e448a6258026f; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < 6b2c73111a252263807b7598682663dc33aa4b4c; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < f90ce1e04cbcc76639d6cba0fdbd820cd80b3c70; 5bdf93a2f5459f944b416b188178ca4a92fd206f; 4bf1a9d20c65b9e80ca4b171267103f8d4f2c61f; … | — | cvelist |
| Linux | 6.6 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-35825. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-35825.md Affected: Linux >= ff3ba016263ee93a1c6209bf5ab1599de7ab1512, < e2dbfea520e60d58e0c498ba41bde10452257779; >= e7ca00f35d8a17af1ae19d529193ebc21bfda164, < a766761d206e7c36d7526e0ae749949d17ca582c; >= 17c653d4913bbc50d284aa96cf12bfc63e41ee5c, < ef846cdbd100f7f9dc045e8bcd7fe4b3a3713c03; >= 7014807fb7efa169a47a7a0… Fixed in: Linux 92b051b87658df7649ffcdef522593f21a2b296b, Linux 7664ee8bd80309b90d53488b619764f0a057f2b7, Linux 6b2c73111a252263807b7598682663dc33aa4b4c Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/e2dbfea520e60d58e0c498ba41bde10452257779
- https://git.kernel.org/stable/c/a766761d206e7c36d7526e0ae749949d17ca582c
- https://git.kernel.org/stable/c/ef846cdbd100f7f9dc045e8bcd7fe4b3a3713c03
- https://git.kernel.org/stable/c/92b051b87658df7649ffcdef522593f21a2b296b
- https://git.kernel.org/stable/c/7664ee8bd80309b90d53488b619764f0a057f2b7
- https://git.kernel.org/stable/c/a0f77b5d6067285b8eca0ee3bd1e448a6258026f
- https://git.kernel.org/stable/c/6b2c73111a252263807b7598682663dc33aa4b4c
- https://git.kernel.org/stable/c/f90ce1e04cbcc76639d6cba0fdbd820cd80b3c70
FAQ
Is CVE-2024-35825 being exploited?
There is no confirmed exploitation: CVE-2024-35825 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.34% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-35825?
Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2024-35825?
Linux >= ff3ba016263ee93a1c6209bf5ab1599de7ab1512, < e2dbfea520e60d58e0c498ba41bde10452257779; >= e7ca00f35d8a17af1ae19d529193ebc21bfda164, < a766761d206e7c36d7526e0ae749949d17ca582c; >= 17c653d4913bbc50d284aa96cf12bfc63e41ee5c, < ef846cdbd100f7f9dc045e8bcd7fe4b3a3713c03; >= 7014807fb7efa169a47a7a0a0a41d2c513925de0, < 92b051b87658df7649ffcdef522593f21a2b296b; >= 49fbc18378ae72a47feabee97fdb86f3cea09765, < 7664ee8bd80309b90d53488b619764f0a057f2b7; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < a0f77b5d6067285b8eca0ee3bd1e448a6258026f; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < 6b2c73111a252263807b7598682663dc33aa4b4c; >= 427694cfaafa565a3db5c5ea71df6bc095dca92f, < f90ce1e04cbcc76639d6cba0fdbd820cd80b3c70; 5bdf93a2f5459f944b416b188178ca4a92fd206f; 4bf1a9d20c65b9e80ca4b171267103f8d4f2c61f; …; Linux 6.6.
Is there a fix for CVE-2024-35825?
Yes. Fixed in Linux 92b051b87658df7649ffcdef522593f21a2b296b, Linux 7664ee8bd80309b90d53488b619764f0a057f2b7, Linux 6b2c73111a252263807b7598682663dc33aa4b4c. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2024-35825?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.