# CVE-2026-31617: usb: gadget: f\_ncm: validate minimum block\_len in ncm\_unwrap\_ntb()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 5, 2026-11-28)
- **CWE:** CWE-191
- **Published:** 2026-04-24T14:42:36.191Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 068a7f2749fff6462a0a908ec415b885fe430f50; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 1425655c2870054c3ab4712e2b6dbdd331597ada; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 0f156bb5334e588034ca68ac2ee92b23f66e56e7; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 8757a2593631443648218244b9788e193ae0fdc1; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 6762f8a95772265dd0c2ffe7f400493f3115b135; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< d58ba8f6546232f8414f396c189297dbee03f1a7; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 74908b0318d1df1188457040b8714ff4d4b68126; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 8f993d30b95dc9557a8a96ceca11abed674c8acb; f7e0611e207d8908c4f2858e244370529a76dbf7; …
- Anyone running Linux 5.9

## 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.

## Affected and fixed versions

- Linux: \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 068a7f2749fff6462a0a908ec415b885fe430f50; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 1425655c2870054c3ab4712e2b6dbdd331597ada; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 0f156bb5334e588034ca68ac2ee92b23f66e56e7; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 8757a2593631443648218244b9788e193ae0fdc1; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 6762f8a95772265dd0c2ffe7f400493f3115b135; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< d58ba8f6546232f8414f396c189297dbee03f1a7; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 74908b0318d1df1188457040b8714ff4d4b68126; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 8f993d30b95dc9557a8a96ceca11abed674c8acb; f7e0611e207d8908c4f2858e244370529a76dbf7; … (cvelist)
- Linux: 5.9 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31617. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31617.md
Affected: Linux >= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, < 068a7f2749fff6462a0a908ec415b885fe430f50; >= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, < 1425655c2870054c3ab4712e2b6dbdd331597ada; >= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, < 8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca; >= 2b74b0a04d3e9f9f08ff026…
Fixed in: Linux 068a7f2749fff6462a0a908ec415b885fe430f50, Linux 1425655c2870054c3ab4712e2b6dbdd331597ada, Linux 8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca, Linux 0f156bb5334e588034ca68ac2ee92b23f66e56e7, Linux 8757a2593631443648218244b9788e193ae0fdc1, Linux 6762f8a95772265dd0c2ffe7f400493f3115b135, Linux 74908…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31617 being exploited?

There is no confirmed exploitation: CVE-2026-31617 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-31617?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31617?

Linux \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 068a7f2749fff6462a0a908ec415b885fe430f50; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 1425655c2870054c3ab4712e2b6dbdd331597ada; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 0f156bb5334e588034ca68ac2ee92b23f66e56e7; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 8757a2593631443648218244b9788e193ae0fdc1; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 6762f8a95772265dd0c2ffe7f400493f3115b135; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< d58ba8f6546232f8414f396c189297dbee03f1a7; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 74908b0318d1df1188457040b8714ff4d4b68126; \>= 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52, \< 8f993d30b95dc9557a8a96ceca11abed674c8acb; f7e0611e207d8908c4f2858e244370529a76dbf7; …; Linux 5.9.

### Is there a fix for CVE-2026-31617?

Yes. Fixed in Linux 068a7f2749fff6462a0a908ec415b885fe430f50, Linux 1425655c2870054c3ab4712e2b6dbdd331597ada, Linux 8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca, Linux 0f156bb5334e588034ca68ac2ee92b23f66e56e7, Linux 8757a2593631443648218244b9788e193ae0fdc1, Linux 6762f8a95772265dd0c2ffe7f400493f3115b135, Linux 74908b0318d1df1188457040b8714ff4d4b68126, Linux 8f993d30b95dc9557a8a96ceca11abed674c8acb. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-31617?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/0f156bb5334e588034ca68ac2ee92b23f66e56e7>
- patch: <https://git.kernel.org/stable/c/8757a2593631443648218244b9788e193ae0fdc1>
- patch: <https://git.kernel.org/stable/c/6762f8a95772265dd0c2ffe7f400493f3115b135>
- patch: <https://git.kernel.org/stable/c/d58ba8f6546232f8414f396c189297dbee03f1a7>
- patch: <https://git.kernel.org/stable/c/74908b0318d1df1188457040b8714ff4d4b68126>
- patch: <https://git.kernel.org/stable/c/8f993d30b95dc9557a8a96ceca11abed674c8acb>
- other: <https://git.kernel.org/stable/c/068a7f2749fff6462a0a908ec415b885fe430f50>
- other: <https://git.kernel.org/stable/c/1425655c2870054c3ab4712e2b6dbdd331597ada>
- other: <https://git.kernel.org/stable/c/8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca>
- other: <https://access.redhat.com/security/cve/CVE-2026-31617>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2461448>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31617.json>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-784472.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31617>

HTML: <https://flawdb.com/CVE-2026-31617> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31617>
