CVE-2026-31617
usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()
Description
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb() The block_len read from the host-supplied NTB header is checked against ntb_max but has no lower bound. When block_len is smaller than opts->ndp_size, the bounds check of: ndp_index > (block_len - opts->ndp_size) will underflow producing a huge unsigned value that ndp_index can never exceed, defeating the check entirely. The same underflow occurs in the datagram index checks against block_len - opts->dpe_size. With those checks neutered, a malicious USB host can choose ndp_index and datagram offsets that point past the actual transfer, and the skb_put_data() copies adjacent kernel memory into the network skb. Fix this by rejecting block lengths that cannot hold at least the NTB header plus one NDP. This will make block_len - opts->ndp_size and block_len - opts->dpe_size both well-defined. Commit 8d2b1a1ec9f5 ("CDC-NCM: avoid overflow in sanity checking") fixed a related class of issues on the host side of NCM.
INFO
Published Date :
April 24, 2026, 3:16 p.m.
Last Modified :
Nov. 11, 2026, 11:10 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products
The following products are affected by CVE-2026-31617
vulnerability.
Even if cvefeed.io is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | MEDIUM | [email protected] | ||||
| CVSS 3.1 | HIGH | 0b0ca135-0b70-47e7-9f44-1890c2a1c46c | ||||
| CVSS 3.1 | MEDIUM | 0b0ca135-0b70-47e7-9f44-1890c2a1c46c |
Solution
- Update the Linux kernel to include the fix.
- Validate minimum block length against NTB header and NDP size.
- Ensure datagram offsets point within the transfer.
- Reject invalid block lengths.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-31617.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-31617 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-31617
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-31617 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-31617 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Nov. 11, 2026
Action Type Old Value New Value Added Translation Title: Linux Kernel, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: usb: gadget: f_ncm: validar la longitud mínima de bloque (block_len) en ncm_unwrap_ntb() La 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: ndp_index > (block_len - opts -> ndp_size) se desbordará por debajo, produciendo un valor sin signo enorme que ndp_index nunca puede exceder, anulando la verificación por completo. El 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. Solucione 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. El commit 8d2b1a1ec9f5 (’CDC-NCM: avoid overflow in sanity checking’) solucionó una clase de problemas relacionados en el lado del host de NCM. -
CVE Modified by 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
Oct. 15, 2026
Action Type Old Value New Value Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/31xxx/CVE-2026-31617.json">CVE-2026-31617</a> Added Reference https://cert-portal.siemens.com/productcert/html/ssa-784472.html -
CVE Modified by 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
Oct. 15, 2026
Action Type Old Value New Value Added Reference https://access.redhat.com/security/cve/CVE-2026-31617 Added Reference https://bugzilla.redhat.com/show_bug.cgi?id=2461448 Added Reference https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31617.json Removed Reference https://access.redhat.com/security/cve/CVE-2026-31617 Removed Reference https://bugzilla.redhat.com/show_bug.cgi?id=2461448 Removed Reference https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31617.json -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 15, 2026
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/068a7f2749fff6462a0a908ec415b885fe430f50 Added Reference https://git.kernel.org/stable/c/0f156bb5334e588034ca68ac2ee92b23f66e56e7 Added Reference https://git.kernel.org/stable/c/1425655c2870054c3ab4712e2b6dbdd331597ada Added Reference https://git.kernel.org/stable/c/6762f8a95772265dd0c2ffe7f400493f3115b135 Added Reference https://git.kernel.org/stable/c/74908b0318d1df1188457040b8714ff4d4b68126 Added Reference https://git.kernel.org/stable/c/8757a2593631443648218244b9788e193ae0fdc1 Added Reference https://git.kernel.org/stable/c/8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca Added Reference https://git.kernel.org/stable/c/8f993d30b95dc9557a8a96ceca11abed674c8acb Added Reference https://git.kernel.org/stable/c/d58ba8f6546232f8414f396c189297dbee03f1a7 Removed Reference https://git.kernel.org/stable/c/068a7f2749fff6462a0a908ec415b885fe430f50 Removed Reference https://git.kernel.org/stable/c/0f156bb5334e588034ca68ac2ee92b23f66e56e7 Removed Reference https://git.kernel.org/stable/c/1425655c2870054c3ab4712e2b6dbdd331597ada Removed Reference https://git.kernel.org/stable/c/6762f8a95772265dd0c2ffe7f400493f3115b135 Removed Reference https://git.kernel.org/stable/c/74908b0318d1df1188457040b8714ff4d4b68126 Removed Reference https://git.kernel.org/stable/c/8757a2593631443648218244b9788e193ae0fdc1 Removed Reference https://git.kernel.org/stable/c/8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca Removed Reference https://git.kernel.org/stable/c/8f993d30b95dc9557a8a96ceca11abed674c8acb Removed Reference https://git.kernel.org/stable/c/d58ba8f6546232f8414f396c189297dbee03f1a7 Removed Reference Type https://git.kernel.org/stable/c/0f156bb5334e588034ca68ac2ee92b23f66e56e7 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/6762f8a95772265dd0c2ffe7f400493f3115b135 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/74908b0318d1df1188457040b8714ff4d4b68126 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/8757a2593631443648218244b9788e193ae0fdc1 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/8f993d30b95dc9557a8a96ceca11abed674c8acb Types: Patch Removed Reference Type https://git.kernel.org/stable/c/d58ba8f6546232f8414f396c189297dbee03f1a7 Types: Patch -
CVE Modified by 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
Aug. 06, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Removed CVSS V3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H -
CVE Modified by 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
Jul. 15, 2026
Action Type Old Value New Value Changed Affected [{'cpes': ['cpe:/o:redhat:enterprise_linux:10'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 10', 'defaultStatus': 'affected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:6'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 6', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 7', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 8', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:9'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 9', 'defaultStatus': 'unaffected'}] [{'cpes': ['cpe:/o:redhat:enterprise_linux:10'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 10', 'packageName': 'kernel', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'affected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:6'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 6', 'packageName': 'kernel', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 7', 'packageName': 'kernel', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 7', 'packageName': 'kernel-rt', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 8', 'packageName': 'kernel', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 8', 'packageName': 'kernel-rt', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:9'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 9', 'packageName': 'kernel', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:9'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 9', 'packageName': 'kernel-rt', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}] -
CVE Modified by 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
Jun. 30, 2026
Action Type Old Value New Value Added Affected [{'cpes': ['cpe:/o:redhat:enterprise_linux:10'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 10', 'defaultStatus': 'affected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:6'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 6', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 7', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 8', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:9'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 9', 'defaultStatus': 'unaffected'}] Added CVSS V3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H Added CWE CWE-191 Added Reference https://access.redhat.com/security/cve/CVE-2026-31617 Added Reference https://bugzilla.redhat.com/show_bug.cgi?id=2461448 Added Reference https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31617.json -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '2b74b0a04d3e9f9f08ff026e5663dce88ff94e52', 'lessThan': '068a7f2749fff6462a0a908ec415b885fe430f50', 'versionType': 'git'}, {'status': 'affected', 'version': '2b74b0a04d3e9f9f08ff026e5663dce88ff94e52', 'lessThan': '1425655c2870054c3ab4712e2b6dbdd331597ada', 'versionType': 'git'}, {'status': 'affected', 'version': '2b74b0a04d3e9f9f08ff026e5663dce88ff94e52', 'lessThan': '8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca', 'versionType': 'git'}, {'status': 'affected', 'version': '2b74b0a04d3e9f9f08ff026e5663dce88ff94e52', 'lessThan': '0f156bb5334e588034ca68ac2ee92b23f66e56e7', 'versionType': 'git'}, {'status': 'affected', 'version': '2b74b0a04d3e9f9f08ff026e5663dce88ff94e52', 'lessThan': '8757a2593631443648218244b9788e193ae0fdc1', 'versionType': 'git'}, {'status': 'affected', 'version': '2b74b0a04d3e9f9f08ff026e5663dce88ff94e52', 'lessThan': '6762f8a95772265dd0c2ffe7f400493f3115b135', 'versionType': 'git'}, {'status': 'affected', 'version': '2b74b0a04d3e9f9f08ff026e5663dce88ff94e52', 'lessThan': 'd58ba8f6546232f8414f396c189297dbee03f1a7', 'versionType': 'git'}, {'status': 'affected', 'version': '2b74b0a04d3e9f9f08ff026e5663dce88ff94e52', 'lessThan': '74908b0318d1df1188457040b8714ff4d4b68126', 'versionType': 'git'}, {'status': 'affected', 'version': '2b74b0a04d3e9f9f08ff026e5663dce88ff94e52', 'lessThan': '8f993d30b95dc9557a8a96ceca11abed674c8acb', 'versionType': 'git'}, {'status': 'affected', 'version': 'f7e0611e207d8908c4f2858e244370529a76dbf7', 'versionType': 'git'}, {'status': 'affected', 'version': 'b88ad6e714284b33a47834f5f2a294c2b37c66aa', 'versionType': 'git'}, {'status': 'affected', 'version': '471b23586387a32857778c511be60ab31c98dcfd', 'versionType': 'git'}, {'status': 'affected', 'version': '4f529c4d1e436230d3af7c09a3239677a14d2b46', 'versionType': 'git'}, {'status': 'affected', 'version': 'ae6a5394d9fbe118bc95cfe376d6a9d91d7547e8', 'versionType': 'git'}, {'status': 'affected', 'version': '4.9.235', 'lessThan': '4.10', 'versionType': 'semver'}, {'status': 'affected', 'version': '4.14.196', 'lessThan': '4.15', 'versionType': 'semver'}, {'status': 'affected', 'version': '4.19.143', 'lessThan': '4.20', 'versionType': 'semver'}, {'status': 'affected', 'version': '5.4.62', 'lessThan': '5.5', 'versionType': 'semver'}, {'status': 'affected', 'version': '5.8.6', 'lessThan': '5.9', 'versionType': 'semver'}], 'programFiles': ['drivers/usb/gadget/function/f_ncm.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '5.9'}, {'status': 'unaffected', 'version': '0', 'lessThan': '5.9', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '5.10.258', 'versionType': 'semver', 'lessThanOrEqual': '5.10.*'}, {'status': 'unaffected', 'version': '5.15.209', 'versionType': 'semver', 'lessThanOrEqual': '5.15.*'}, {'status': 'unaffected', 'version': '6.1.175', 'versionType': 'semver', 'lessThanOrEqual': '6.1.*'}, {'status': 'unaffected', 'version': '6.6.136', 'versionType': 'semver', 'lessThanOrEqual': '6.6.*'}, {'status': 'unaffected', 'version': '6.12.83', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.18.24', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '6.19.14', 'versionType': 'semver', 'lessThanOrEqual': '6.19.*'}, {'status': 'unaffected', 'version': '7.0.1', 'versionType': 'semver', 'lessThanOrEqual': '7.0.*'}, {'status': 'unaffected', 'version': '7.1', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['drivers/usb/gadget/function/f_ncm.c'], 'defaultStatus': 'affected'}] -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 01, 2026
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/068a7f2749fff6462a0a908ec415b885fe430f50 Added Reference https://git.kernel.org/stable/c/1425655c2870054c3ab4712e2b6dbdd331597ada Added Reference https://git.kernel.org/stable/c/8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca -
Initial Analysis by [email protected]
Apr. 28, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Added CWE NVD-CWE-noinfo Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.13 up to (excluding) 6.18.24 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 6.19.14 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 7.0 up to (excluding) 7.0.1 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.12 up to (excluding) 6.12.83 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.9 up to (excluding) 6.6.136 Added Reference Type kernel.org: https://git.kernel.org/stable/c/0f156bb5334e588034ca68ac2ee92b23f66e56e7 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/6762f8a95772265dd0c2ffe7f400493f3115b135 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/74908b0318d1df1188457040b8714ff4d4b68126 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/8757a2593631443648218244b9788e193ae0fdc1 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/8f993d30b95dc9557a8a96ceca11abed674c8acb Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/d58ba8f6546232f8414f396c189297dbee03f1a7 Types: Patch -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Apr. 27, 2026
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/0f156bb5334e588034ca68ac2ee92b23f66e56e7 -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Apr. 27, 2026
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/8f993d30b95dc9557a8a96ceca11abed674c8acb -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Apr. 24, 2026
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb() The block_len read from the host-supplied NTB header is checked against ntb_max but has no lower bound. When block_len is smaller than opts->ndp_size, the bounds check of: ndp_index > (block_len - opts->ndp_size) will underflow producing a huge unsigned value that ndp_index can never exceed, defeating the check entirely. The same underflow occurs in the datagram index checks against block_len - opts->dpe_size. With those checks neutered, a malicious USB host can choose ndp_index and datagram offsets that point past the actual transfer, and the skb_put_data() copies adjacent kernel memory into the network skb. Fix this by rejecting block lengths that cannot hold at least the NTB header plus one NDP. This will make block_len - opts->ndp_size and block_len - opts->dpe_size both well-defined. Commit 8d2b1a1ec9f5 ("CDC-NCM: avoid overflow in sanity checking") fixed a related class of issues on the host side of NCM. Added Reference https://git.kernel.org/stable/c/6762f8a95772265dd0c2ffe7f400493f3115b135 Added Reference https://git.kernel.org/stable/c/74908b0318d1df1188457040b8714ff4d4b68126 Added Reference https://git.kernel.org/stable/c/8757a2593631443648218244b9788e193ae0fdc1 Added Reference https://git.kernel.org/stable/c/d58ba8f6546232f8414f396c189297dbee03f1a7