CVE-2026-31617
usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()
Check your servers for CVE-2026-31617
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-31617 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.14%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 3.48% of all scored CVEs. Scores of 1 Dec 2026.
Weakness
- CWE-191 Integer Underflow (Wrap or Wraparound)
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, before 068a7f2749fff6462a0a908ec415b885fe430f50 affected from 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, before 1425655c2870054c3ab4712e2b6dbdd331597ada affected from 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, before 8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca affected from 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, before 0f156bb5334e588034ca68ac2ee92b23f66e56e7 affected from 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, before 8757a2593631443648218244b9788e193ae0fdc1 affected from 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, before 6762f8a95772265dd0c2ffe7f400493f3115b135 affected from 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, before d58ba8f6546232f8414f396c189297dbee03f1a7 affected from 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, before 74908b0318d1df1188457040b8714ff4d4b68126 affected from 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, before 8f993d30b95dc9557a8a96ceca11abed674c8acb affected f7e0611e207d8908c4f2858e244370529a76dbf7 affected b88ad6e714284b33a47834f5f2a294c2b37c66aa affected 471b23586387a32857778c511be60ab31c98dcfd affected 4f529c4d1e436230d3af7c09a3239677a14d2b46 affected ae6a5394d9fbe118bc95cfe376d6a9d91d7547e8 affected from 4.9.235, before 4.10 affected from 4.14.196, before 4.15 affected from 4.19.143, before 4.20 affected from 5.4.62, before 5.5 affected from 5.8.6, before 5.9
Other versions: unaffected
|
| Linux |
affected 5.9 unaffected before 5.9 unaffected from 5.10.258 up to and including 5.10.* unaffected from 5.15.209 up to and including 5.15.* unaffected from 6.1.175 up to and including 6.1.* unaffected from 6.6.136 up to and including 6.6.* unaffected from 6.12.83 up to and including 6.12.* unaffected from 6.18.24 up to and including 6.18.* unaffected from 6.19.14 up to and including 6.19.* unaffected from 7.0.1 up to and including 7.0.* unaffected 7.1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-31617 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-31617
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-31617
trivy image --scanners vuln IMAGE | grep CVE-2026-31617
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://access.redhat.com/security/cve/CVE-2026-31617 access.redhat.com · vdb entry
- RHBZ#2461448 bugzilla.redhat.com · issue tracking
Other references
- https://git.kernel.org/stable/c/068a7f2749fff6462a0a908ec415b885fe430f50 git.kernel.org
- https://git.kernel.org/stable/c/1425655c2870054c3ab4712e2b6dbdd331597ada git.kernel.org
- https://git.kernel.org/stable/c/8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca git.kernel.org
- https://git.kernel.org/stable/c/0f156bb5334e588034ca68ac2ee92b23f66e56e7 git.kernel.org
- https://git.kernel.org/stable/c/8757a2593631443648218244b9788e193ae0fdc1 git.kernel.org
- https://git.kernel.org/stable/c/6762f8a95772265dd0c2ffe7f400493f3115b135 git.kernel.org
- https://git.kernel.org/stable/c/d58ba8f6546232f8414f396c189297dbee03f1a7 git.kernel.org
- https://git.kernel.org/stable/c/74908b0318d1df1188457040b8714ff4d4b68126 git.kernel.org
- https://git.kernel.org/stable/c/8f993d30b95dc9557a8a96ceca11abed674c8acb git.kernel.org
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31617.json security.access.redhat.com
- https://cert-portal.siemens.com/productcert/html/ssa-784472.html cert-portal.siemens.com
Source: the record CVE-2026-31617 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse