Name | CVE-2024-35825 |
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. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
References | DLA-3840-1, DLA-3842-1, ELA-1116-1 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
linux (PTS) | jessie, jessie (lts) | 3.16.84-1 | vulnerable |
stretch (security) | 4.9.320-2 | vulnerable | |
stretch (lts), stretch | 4.9.320-3 | vulnerable | |
buster (security), buster, buster (lts) | 4.19.316-1 | fixed | |
bullseye | 5.10.223-1 | fixed | |
bullseye (security) | 5.10.226-1 | fixed | |
bookworm | 6.1.106-3 | fixed | |
bookworm (security) | 6.1.112-1 | fixed | |
sid, trixie | 6.11.5-1 | fixed | |
linux-4.19 (PTS) | jessie, jessie (lts) | 4.19.316-1~deb8u1 | fixed |
stretch (security) | 4.19.232-1~deb9u1 | vulnerable | |
stretch (lts), stretch | 4.19.316-1~deb9u1 | fixed | |
linux-5.10 (PTS) | buster, buster (lts) | 5.10.226-1~deb10u1 | fixed |
buster (security) | 5.10.218-1~deb10u1 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
linux | source | jessie | (unfixed) | end-of-life | ||
linux | source | stretch | (unfixed) | end-of-life | ||
linux | source | buster | 4.19.316-1 | DLA-3840-1 | ||
linux | source | bullseye | 5.10.216-1 | |||
linux | source | bookworm | 6.1.85-1 | |||
linux | source | (unstable) | 6.7.12-1 | |||
linux-4.19 | source | jessie | 4.19.316-1~deb8u1 | ELA-1116-1 | ||
linux-4.19 | source | stretch | 4.19.316-1~deb9u1 | ELA-1116-1 | ||
linux-5.10 | source | buster | 5.10.216-1~deb10u1 | DLA-3842-1 |
https://git.kernel.org/linus/f90ce1e04cbcc76639d6cba0fdbd820cd80b3c70 (6.8)