CVE-2026-68368

usb: gadget: f_ncm: validate datagram bounds in ncm_unwrap_ntb()

Published Aug 10, 2026 CVSS 3.1 · 5.7 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: f_ncm: validate datagram bounds in ncm_unwrap_ntb()

When unpacking host-supplied NTBs, ncm_unwrap_ntb() checks datagram length
against frame_max but does not verify that the datagram fits within the
declared block length. Additionally, when decoding multiple NTBs from a
single socket buffer, subsequent block lengths are not checked against the
actual remaining buffer data.

With these checks missing, a malicious USB host can specify datagram
offsets and lengths that point beyond the block, or supply secondary NTB
headers declaring lengths larger than the buffer. skb_put_data() then
copies adjacent kernel memory from skb_shared_info into the network skb.

Fix this by verifying that sufficient buffer space remains for the NTB
header before parsing, handling zero-length block declarations, ensuring
that block lengths never exceed the remaining buffer space, and verifying
that each datagram payload stays strictly within the block boundary.

Analysis

AI-generated

Technical impact

A flaw in the f_ncm gadget driver’s NTB handling routine allows a USB host to provide NTB frame descriptors that reference memory beyond the intended datagram block. The unbounded read performed by skb_put_data copies adjacent kernel memory into the network skb, which can corrupt critical kernel data structures and lead to arbitrary code execution. The weakness is manifested as improper bounds checking and buffer under-read.

Affected Systems

All Linux kernel configurations employing the USB gadget NCM driver are vulnerable until the bounds‑check fix is applied. Any system running a kernel version before the patch that introduced the validation code is susceptible; any machine that activates the f_ncm gadget must verify that the running kernel includes the update.

Risk and Exploitability

The CVSS score of 5.7 indicates medium severity. This kernel memory corruption can be triggered by a USB host that sends crafted NTB frames; thus the attack can occur when a host is physically attached or remotely connected via USB. The EPSS score is < 1%, suggesting a low probability of exploitation. This issue is not listed in the CISA KEV catalog, so public exploitation has not yet been documented. Nonetheless, the potential for privilege escalation warrants rapid mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the ncm_unwrap_ntb bounds‑check fix
  • Reboot the device after updating to ensure the patched kernel is running
  • If the NCM gadget is unnecessary, disable the driver or block USB access to preclude the exploitation vector

Generated by OpenCVE AI on August 13, 2026 at 06:17 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4745-1 linux-6.12 security update
Debian DLA Debian DLA DLA-4777-1 linux security update
Ubuntu USN Ubuntu USN USN-8876-1 Linux kernel (Azure CVM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8875-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8877-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8878-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8879-1 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-8887-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8888-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8889-1 Linux kernel (OEM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8887-2 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8888-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8875-2 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8887-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8917-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8918-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9003-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9024-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9025-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9026-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9029-1 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-9040-1 Linux kernel (Low Latency NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9043-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9066-1 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-9091-1 Linux kernel (NVIDIA Tegra) vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-20
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.7, 'vector': 'CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-125
CWE-20
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_ncm: validate datagram bounds in ncm_unwrap_ntb() When unpacking host-supplied NTBs, ncm_unwrap_ntb() checks datagram length against frame_max but does not verify that the datagram fits within the declared block length. Additionally, when decoding multiple NTBs from a single socket buffer, subsequent block lengths are not checked against the actual remaining buffer data. With these checks missing, a malicious USB host can specify datagram offsets and lengths that point beyond the block, or supply secondary NTB headers declaring lengths larger than the buffer. skb_put_data() then copies adjacent kernel memory from skb_shared_info into the network skb. Fix this by verifying that sufficient buffer space remains for the NTB header before parsing, handling zero-length block declarations, ensuring that block lengths never exceed the remaining buffer space, and verifying that each datagram payload stays strictly within the block boundary.
Title usb: gadget: f_ncm: validate datagram bounds in ncm_unwrap_ntb()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 6, 2026, 4:55 PM
Reserved
Jul 30, 2026, 9:28 AM
Status
Received
Published
Aug 10, 2026, 1:20 PM
Modified
Nov 6, 2026, 5:19 PM
Severity
Moderate
Public date
Aug 10, 2026, 12:03 PM