CVE-2026-68368: usb: gadget: f_ncm: validate datagram bounds in ncm_unwrap_ntb()
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: fncm: validate datagram bounds in ncmunwrapntb()
When unpacking host-supplied NTBs, ncmunwrapntb() checks datagram length against framemax 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. skbputdata() then copies adjacent kernel memory from skbsharedinfo 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
When unpacking host-supplied NTBs in ncm_unwrap_ntb(), verify that sufficient buffer space remains for each datagram payload by checking that the datagram fits within the declared block length, including handling zero-length block declarations and rejecting offsets/lengths that point beyond the block or exceed the remaining buffer space before copying/parsing (e.g., ensure datagram payload stays strictly within the block boundary before using skb_put_data()).
Linux kernel (usb: gadget: f_ncm: ncm_unwrap_ntb()) validate datagram bounds in ncm_unwrap_ntb() = enabled
Event History
Frequently Asked Questions
What is the severity of CVE-2026-68368?
CVE-2026-68368 has a risk severity score of 65.
What systems are affected by CVE-2026-68368?
CVE-2026-68368 affects the Linux kernel, specifically the USB gadget functionality.
How do I fix CVE-2026-68368?
To fix CVE-2026-68368, update to the latest version of the Linux kernel that contains the security patch.
What type of vulnerability is CVE-2026-68368?
CVE-2026-68368 is a vulnerability that involves insufficient validation of datagram bounds in the ncm_unwrap_ntb function.
Who is responsible for addressing CVE-2026-68368?
The maintainers of the Linux kernel are responsible for addressing CVE-2026-68368 through timely updates and patches.