usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 4.9.235 to before 4.10; 4.14.196 to before 4.15; 4.19.143 to before 4.20; 5.4.62 to before 5.5; 5.8.6 to before 5.9 | 4.10, 4.15, 4.20, 5.5, 5.9 | Patch available | CNA |
| Linux | Linux | 5.9 and later | 5.10.258, 5.15.209, 6.1.175, 6.6.136, 6.12.83, 6.18.24, 6.19.14, 7.0.1, 7.1 | Patch available | CNA |
- Linux VendorLinux Affected 4.9.235 to before 4.10; 4.14.196 to before 4.15; 4.19.143 to before 4.20; 5.4.62 to before 5.5; 5.8.6 to before 5.9 Fixed in 4.10, 4.15, 4.20, 5.5, 5.9 Patch available CNA
- Linux VendorLinux Affected 5.9 and later Fixed in 5.10.258, 5.15.209, 6.1.175, 6.6.136, 6.12.83, 6.18.24, 6.19.14, 7.0.1, 7.1 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.9 to before 6.6.136; 6.12 to before 6.12.83; 6.13 to before 6.18.24; 6.19 to before 6.19.14; 7.0 to before 7.0.1 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 5.9 to before 6.6.136; 6.12 to before 6.12.83; 6.13 to before 6.18.24; 6.19 to before 6.19.14; 7.0 to before 7.0.1 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 4.10, 4.15, 4.20, 5.5, 5.9
- Fix · CNA Linux (Linux) Fixed in 5.10.258, 5.15.209, 6.1.175, 6.6.136, 6.12.83, 6.18.24, 6.19.14, 7.0.1, 7.1
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
Not affected: 4 products
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2026-31617
- 2026-10-03 Alias added: GHSA-v24g-wpq8-cwqx
References
Patch 6
- https://git.kernel.org/stable/c/0f156bb5334e588034ca68ac2ee92b23f66e56e7
- https://git.kernel.org/stable/c/8757a2593631443648218244b9788e193ae0fdc1
- https://git.kernel.org/stable/c/6762f8a95772265dd0c2ffe7f400493f3115b135
- https://git.kernel.org/stable/c/d58ba8f6546232f8414f396c189297dbee03f1a7
- https://git.kernel.org/stable/c/74908b0318d1df1188457040b8714ff4d4b68126
- https://git.kernel.org/stable/c/8f993d30b95dc9557a8a96ceca11abed674c8acb
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2026-31617 · CVE Program
- CVE-2026-31617 · NVD
- FIRST EPSS
- GHSA-v24g-wpq8-cwqx · GitHub Advisory Database · CC BY 4.0
- CVE-2026-31617 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences