CVE-2026-68368

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

State
Published
Severity
Not scored
Published
Aug 10, 2026
Updated
Aug 19, 2026
Reserved
Jul 30, 2026

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 to before 35d15bbaec0557330e774ec31412ef508de6e0e0Affected
  • 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 to before 6b2be489eaa6293e60549005d91f15ceb150510fAffected
  • 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 to before f87ed889f0f7417b8938c98d8833f559b755373cAffected
  • 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 to before e07751d0527ccc2a1c32eb0b0b7da3b4b9b5381fAffected
  • 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 to before fff1059d139ef798bab917990524faaf25854ca8Affected
  • 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 to before 40c706a0224bde194667e3378c689b542fec4b44Affected
  • 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 to before 41fd5f2fb0027d3773ae949e3247c2e0a2a7fe5cAffected
  • 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 to before 1febec7e47cdcd01f43fb0211094e3010474666eAffected
  • f7e0611e207d8908c4f2858e244370529a76dbf7Affected
  • b88ad6e714284b33a47834f5f2a294c2b37c66aaAffected
  • 471b23586387a32857778c511be60ab31c98dcfdAffected
  • 4f529c4d1e436230d3af7c09a3239677a14d2b46Affected
  • ae6a5394d9fbe118bc95cfe376d6a9d91d7547e8Affected
  • 5bdf93a2f5459f944b416b188178ca4a92fd206fAffected
  • ff3ba016263ee93a1c6209bf5ab1599de7ab1512Affected
  • e7ca00f35d8a17af1ae19d529193ebc21bfda164Affected
  • 4.9.235 to before 4.10Affected
  • 4.14.196 to before 4.15Affected
  • 4.19.143 to before 4.20Affected
  • 5.4.62 to before 5.5Affected
  • 5.8.6 to before 5.9Affected
  • 4.14.328 to before 4.15Affected
  • 4.19.297 to before 4.20Affected
  • 5.4.259 to before 5.5Affected
LinuxLinux
  • 5.9Affected
  • before 5.9Not affected
  • 5.10.265 through 5.10.*Not affected
  • 5.15.216 through 5.15.*Not affected
  • 6.1.183 through 6.1.*Not affected
  • 6.6.148 through 6.6.*Not affected
  • 6.12.101 through 6.12.*Not affected
  • 6.18.42 through 6.18.*Not affected
  • 7.1.6 through 7.1.*Not affected
  • 7.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.