{
    "dataType": "CVE_RECORD",
    "cveMetadata": {
        "cveId": "CVE-2024-35825",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-05-17T12:19:12.347Z",
        "datePublished": "2024-05-17T13:27:28.914Z",
        "dateUpdated": "2026-05-23T15:43:38.907Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-05-23T15:43:38.907Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: ncm: Fix handling of zero block length packets\n\nWhile connecting to a Linux host with CDC_NCM_NTB_DEF_SIZE_TX\nset to 65536, it has been observed that we receive short packets,\nwhich come at interval of 5-10 seconds sometimes and have block\nlength zero but still contain 1-2 valid datagrams present.\n\nAccording to the NCM spec:\n\n\"If wBlockLength = 0x0000, the block is terminated by a\nshort packet. In this case, the USB transfer must still\nbe shorter than dwNtbInMaxSize or dwNtbOutMaxSize. If\nexactly dwNtbInMaxSize or dwNtbOutMaxSize bytes are sent,\nand the size is a multiple of wMaxPacketSize for the\ngiven pipe, then no ZLP shall be sent.\n\nwBlockLength= 0x0000 must be used with extreme care, because\nof the possibility that the host and device may get out of\nsync, and because of test issues.\n\nwBlockLength = 0x0000 allows the sender to reduce latency by\nstarting to send a very large NTB, and then shortening it when\nthe sender discovers that there’s not sufficient data to justify\nsending a large NTB\"\n\nHowever, there is a potential issue with the current implementation,\nas it checks for the occurrence of multiple NTBs in a single\ngiveback by verifying if the leftover bytes to be processed is zero\nor not. If the block length reads zero, we would process the same\nNTB infintely because the leftover bytes is never zero and it leads\nto a crash. Fix this by bailing out if block length reads zero."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/usb/gadget/function/f_ncm.c"
                    ],
                    "versions": [
                        {
                            "version": "ff3ba016263ee93a1c6209bf5ab1599de7ab1512",
                            "lessThan": "e2dbfea520e60d58e0c498ba41bde10452257779",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e7ca00f35d8a17af1ae19d529193ebc21bfda164",
                            "lessThan": "a766761d206e7c36d7526e0ae749949d17ca582c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "17c653d4913bbc50d284aa96cf12bfc63e41ee5c",
                            "lessThan": "ef846cdbd100f7f9dc045e8bcd7fe4b3a3713c03",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7014807fb7efa169a47a7a0a0a41d2c513925de0",
                            "lessThan": "92b051b87658df7649ffcdef522593f21a2b296b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "49fbc18378ae72a47feabee97fdb86f3cea09765",
                            "lessThan": "7664ee8bd80309b90d53488b619764f0a057f2b7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "427694cfaafa565a3db5c5ea71df6bc095dca92f",
                            "lessThan": "a0f77b5d6067285b8eca0ee3bd1e448a6258026f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "427694cfaafa565a3db5c5ea71df6bc095dca92f",
                            "lessThan": "6b2c73111a252263807b7598682663dc33aa4b4c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "427694cfaafa565a3db5c5ea71df6bc095dca92f",
                            "lessThan": "f90ce1e04cbcc76639d6cba0fdbd820cd80b3c70",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5bdf93a2f5459f944b416b188178ca4a92fd206f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "4bf1a9d20c65b9e80ca4b171267103f8d4f2c61f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "4.19.297",
                            "lessThan": "4.19.312",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.259",
                            "lessThan": "5.4.274",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.199",
                            "lessThan": "5.10.215",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.136",
                            "lessThan": "5.15.154",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.59",
                            "lessThan": "6.1.84",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.14.328",
                            "lessThan": "4.15",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.5.8",
                            "lessThan": "6.6",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/usb/gadget/function/f_ncm.c"
                    ],
                    "versions": [
                        {
                            "version": "6.6",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.6",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.312",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.274",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.215",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.154",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.84",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.24",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.7.12",
                            "lessThanOrEqual": "6.7.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.8",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19.297",
                                    "versionEndExcluding": "4.19.312"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4.259",
                                    "versionEndExcluding": "5.4.274"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10.199",
                                    "versionEndExcluding": "5.10.215"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15.136",
                                    "versionEndExcluding": "5.15.154"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1.59",
                                    "versionEndExcluding": "6.1.84"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "6.6.24"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "6.7.12"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "6.8"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.14.328"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.5.8"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/e2dbfea520e60d58e0c498ba41bde10452257779"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a766761d206e7c36d7526e0ae749949d17ca582c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ef846cdbd100f7f9dc045e8bcd7fe4b3a3713c03"
                },
                {
                    "url": "https://git.kernel.org/stable/c/92b051b87658df7649ffcdef522593f21a2b296b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/7664ee8bd80309b90d53488b619764f0a057f2b7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a0f77b5d6067285b8eca0ee3bd1e448a6258026f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/6b2c73111a252263807b7598682663dc33aa4b4c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f90ce1e04cbcc76639d6cba0fdbd820cd80b3c70"
                }
            ],
            "title": "usb: gadget: ncm: Fix handling of zero block length packets",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-02T03:21:47.690Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://git.kernel.org/stable/c/e2dbfea520e60d58e0c498ba41bde10452257779",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/a766761d206e7c36d7526e0ae749949d17ca582c",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/ef846cdbd100f7f9dc045e8bcd7fe4b3a3713c03",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/92b051b87658df7649ffcdef522593f21a2b296b",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/7664ee8bd80309b90d53488b619764f0a057f2b7",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/a0f77b5d6067285b8eca0ee3bd1e448a6258026f",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/6b2c73111a252263807b7598682663dc33aa4b4c",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/f90ce1e04cbcc76639d6cba0fdbd820cd80b3c70",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            },
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2024-35825",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2024-09-10T15:42:28.954371Z"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-09-11T17:33:21.446Z"
                }
            }
        ]
    },
    "dataVersion": "5.2"
}