5.5
MEDIUM CVSS 3.1
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 :

June 1, 2026, 5:16 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.

ID Vendor Product Action
1 Linux linux_kernel
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 MEDIUM [email protected]
Solution
Address memory corruption by validating block length in ncm_unwrap_ntb().
  • 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.
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 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
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.