HIGH
net/usb NDP16 OOB
CVE-2026-23448
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI4.9MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: net: usb: cdc_ncm: add ndpoffset to NDP16 nframes bounds check cdc_ncm_rx_verify_ndp16() validates that the NDP header and its DPE entries fit within the skb. The first check correctly accounts for ndpoffset: if ((ndpoffset + sizeof(struct usb_cdc_ncm_ndp16)) > skb_in->len) but the second check omits it: if ((sizeof(struct usb_cdc_ncm_ndp16) + ret * (sizeof(struct usb_cdc_ncm_dpe16))) > skb_in->len) This validates the DPE array size against the total skb length as if the NDP were at offset 0, rather than at ndpoffset. When the NDP is placed near the end of the NTB (large wNdpIndex), the DPE entries can extend past the skb data buffer even though the check passes. cdc_ncm_rx_fixup() then reads out-of-bounds memory when iterating the DPE array. Add ndpoffset to the nframes bounds check and use struct_size_t() to express the NDP-plus-DPE-array size more clearly.
02KernelScan AI Analysis
Risk summary
Physical attackers can trigger out-of-bounds memory reads in the USB CDC NCM network driver by connecting a malicious USB device that sends malformed CDC NCM frames with a large wNdpIndex/ndpoffset. This leads to information disclosure (limited slab data leakage before the read hits unmapped pages) and system crashes (kernel panic) on systems with accessible USB ports.
Vulnerability analysis
The vulnerability exists in cdc_ncm_rx_verify_ndp16() where bounds checking for NDP (Network Datagram Pointer) entries incorrectly validates the DPE (Datagram Pointer Entry) array size against the total skb length without accounting for ndpoffset. When an attacker places the NDP near the end of the NTB (Network Transfer Block) with a large wNdpIndex, the DPE entries can extend past the skb data buffer even though the flawed bounds check passes. cdc_ncm_rx_fixup() then reads out-of-bounds memory when iterating the DPE array. The fix adds ndpoffset to the bounds check calculation and uses struct_size_t() for clearer size computation, ensuring that both the NDP header and DPE array fit within the actual buffer boundaries.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.12 | 6.12.78 | 789204f98073 |
| 6.18 | 6.18.20 | 403f94ddcb36 |
| 6.19 | 6.19.10 | dce9dda0e370 |
| 6.6 | 6.6.130 | f1c7701d3ac9 |
| mainline | 7.0 | 2aa8a4fa8d5b |