{"id":"CVE-2026-31617","aliases":["CVE-2026-31617"],"related":[],"kind":"vulnerability","state":"published","title":"usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()\n\nThe block_len read from the host-supplied NTB header is checked against\nntb_max but has no lower bound. When block_len is smaller than\nopts->ndp_size, the bounds check of:\n\tndp_index > (block_len - opts->ndp_size)\nwill underflow producing a huge unsigned value that ndp_index can never\nexceed, defeating the check entirely.\n\nThe same underflow occurs in the datagram index checks against block_len\n- opts->dpe_size.  With those checks neutered, a malicious USB host can\nchoose ndp_index and datagram offsets that point past the actual\ntransfer, and the skb_put_data() copies adjacent kernel memory into the\nnetwork skb.\n\nFix this by rejecting block lengths that cannot hold at least the NTB\nheader plus one NDP.  This will make block_len - opts->ndp_size and\nblock_len - opts->dpe_size both well-defined.\n\nCommit 8d2b1a1ec9f5 (\"CDC-NCM: avoid overflow in sanity checking\") fixed\na related class of issues on the host side of NCM.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()\n\nThe block_len read from the host-supplied NTB header is checked against\nntb_max but has no lower bound. When block_len is smaller than\nopts->ndp_size, the bounds check of:\n\tndp_index > (block_len - opts->ndp_size)\nwill underflow producing a huge unsigned value that ndp_index can never\nexceed, defeating the check entirely.\n\nThe same underflow occurs in the datagram index checks against block_len\n- opts->dpe_size.  With those checks neutered, a malicious USB host can\nchoose ndp_index and datagram offsets that point past the actual\ntransfer, and the skb_put_data() copies adjacent kernel memory into the\nnetwork skb.\n\nFix this by rejecting block lengths that cannot hold at least the NTB\nheader plus one NDP.  This will make block_len - opts->ndp_size and\nblock_len - opts->dpe_size both well-defined.\n\nCommit 8d2b1a1ec9f5 (\"CDC-NCM: avoid overflow in sanity checking\") fixed\na related class of issues on the host side of NCM.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nusb: gadget: f_ncm: validar la longitud mínima de bloque (block_len) en ncm_unwrap_ntb()\n\nLa block_len leída del encabezado NTB proporcionado por el host se verifica contra ntb_max pero no tiene un límite inferior. Cuando block_len es menor que opts  ->  ndp_size, la verificación de límites de:\nndp_index > (block_len - opts  ->  ndp_size)\nse desbordará por debajo, produciendo un valor sin signo enorme que ndp_index nunca puede exceder, anulando la verificación por completo.\n\nEl mismo desbordamiento por debajo ocurre en las verificaciones del índice del datagrama contra block_len - opts  ->  dpe_size. Con esas verificaciones neutralizadas, un host USB malicioso puede elegir ndp_index y desplazamientos de datagrama que apuntan más allá de la transferencia real, y skb_put_data() copia memoria adyacente del kernel en el skb de red.\n\nSolucione esto rechazando las longitudes de bloque que no pueden contener al menos el encabezado NTB más un NDP. Esto hará que block_len - opts  ->  ndp_size y block_len - opts  ->  dpe_size estén ambos bien definidos.\n\nEl commit 8d2b1a1ec9f5 (’CDC-NCM: avoid overflow in sanity checking’) solucionó una clase de problemas relacionados en el lado del host de NCM.","source":"nvd"}],"published":"2026-04-24T14:42:36.191Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-191"],"affected":[{"ranges":[{"type":"git","introduced":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","fixed":"068a7f2749fff6462a0a908ec415b885fe430f50","status":"affected"},{"type":"git","introduced":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","fixed":"1425655c2870054c3ab4712e2b6dbdd331597ada","status":"affected"},{"type":"git","introduced":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","fixed":"8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca","status":"affected"},{"type":"git","introduced":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","fixed":"0f156bb5334e588034ca68ac2ee92b23f66e56e7","status":"affected"},{"type":"git","introduced":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","fixed":"8757a2593631443648218244b9788e193ae0fdc1","status":"affected"},{"type":"git","introduced":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","fixed":"6762f8a95772265dd0c2ffe7f400493f3115b135","status":"affected"},{"type":"git","introduced":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","fixed":"d58ba8f6546232f8414f396c189297dbee03f1a7","status":"affected"},{"type":"git","introduced":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","fixed":"74908b0318d1df1188457040b8714ff4d4b68126","status":"affected"},{"type":"git","introduced":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","fixed":"8f993d30b95dc9557a8a96ceca11abed674c8acb","status":"affected"},{"type":"git","version":"f7e0611e207d8908c4f2858e244370529a76dbf7","status":"affected"},{"type":"git","version":"b88ad6e714284b33a47834f5f2a294c2b37c66aa","status":"affected"},{"type":"git","version":"471b23586387a32857778c511be60ab31c98dcfd","status":"affected"},{"type":"git","version":"4f529c4d1e436230d3af7c09a3239677a14d2b46","status":"affected"},{"type":"git","version":"ae6a5394d9fbe118bc95cfe376d6a9d91d7547e8","status":"affected"},{"type":"semver","introduced":"4.9.235","fixed":"4.10","status":"affected"},{"type":"semver","introduced":"4.14.196","fixed":"4.15","status":"affected"},{"type":"semver","introduced":"4.19.143","fixed":"4.20","status":"affected"},{"type":"semver","introduced":"5.4.62","fixed":"5.5","status":"affected"},{"type":"semver","introduced":"5.8.6","fixed":"5.9","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.9","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.9","status":"unaffected"},{"type":"semver","introduced":"5.10.258","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.209","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.175","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.136","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.83","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.24","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.14","lastAffected":"6.19.*","status":"unaffected"},{"type":"semver","introduced":"7.0.1","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"kernel","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 6","package":"kernel","cpe":"cpe:/o:redhat:enterprise_linux:6","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7","package":"kernel","cpe":"cpe:/o:redhat:enterprise_linux:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7","package":"kernel-rt","cpe":"cpe:/o:redhat:enterprise_linux:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"kernel","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"kernel-rt","cpe":"cpe:/o:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"kernel","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"kernel-rt","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.9","fixed":"6.6.136"},{"status":"affected","introduced":"6.12","fixed":"6.12.83"},{"status":"affected","introduced":"6.13","fixed":"6.18.24"},{"status":"affected","introduced":"6.19","fixed":"6.19.14"},{"status":"affected","introduced":"7.0","fixed":"7.0.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/068a7f2749fff6462a0a908ec415b885fe430f50","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1425655c2870054c3ab4712e2b6dbdd331597ada","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0f156bb5334e588034ca68ac2ee92b23f66e56e7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8757a2593631443648218244b9788e193ae0fdc1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6762f8a95772265dd0c2ffe7f400493f3115b135","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d58ba8f6546232f8414f396c189297dbee03f1a7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/74908b0318d1df1188457040b8714ff4d4b68126","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8f993d30b95dc9557a8a96ceca11abed674c8acb","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-31617","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2461448","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31617.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31617","url":"https://www.cve.org/CVERecord?id=CVE-2026-31617","licence":"CVE Terms of Use","modified":"2026-10-15T01:17:13.982Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31617","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31617","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.517Z","epss":{"score":0.00139,"percentile":0.0348,"date":"2026-12-01T12:00:22.000Z"}}