Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-12052— Out-of-bounds write in USB CDC NCM control handler when host wLength is smaller than the response

CVSS 5.2 · Medium
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2026-12052

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Out-of-bounds write in USB CDC NCM control handler when host wLength is smaller than the response
Source: CVE Program / CVE List V5
Vulnerability Description
The USB device-side CDC NCM class control-to-host handler usbd_cdc_ncm_cth in subsys/usb/device_next/class/usbd_cdc_ncm.c builds a fixed-size response for the GET_NTB_PARAMETERS (28-byte struct ntb_parameters) and GET_NTB_INPUT_SIZE (8-byte struct ntb_input_size) class requests and copies the whole structure into the control DATA IN buffer with net_buf_add_mem(buf, ..., sizeof(...)), ignoring the host-supplied wLength. The control DATA IN buffer is allocated by the USB stack with a capacity of exactly wLength bytes (usbd_ep_ctrl_data_in_alloc -> udc_ctrl_data_alloc -> net_buf_alloc_len(&udc_ep_pool, wLength); no round-up is applied for the IN endpoint). Because net_buf_add_mem/net_buf_simple_add only bounds the copy with an __ASSERT_NO_MSG, which is compiled out in production builds, a host that issues one of these standard CDC NCM control requests with a wLength smaller than the response structure (e.g. wLength = 1) causes the handler to memcpy up to 27 bytes past the end of the allocated pool buffer. The request fields come straight from the USB SETUP packet, so any host (or USB interposer) the Zephyr device enumerates against can trigger the overflow with no authentication once an image built with the device_next USB stack and the CDC NCM class is connected. The out-of-bounds write corrupts adjacent allocations and metadata in the shared udc_ep_pool, primarily causing memory corruption and denial of service of the USB stack; the overflow length is bounded (<= 27 bytes) and the written content is fixed device constants, and the bug reads nothing back so there is no information disclosure. The fix clamps the copy with MIN(sizeof(...), setup->wLength), matching the existing CDC ACM handler.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
跨界内存写
Source: CVE Program / CVE List V5

Affected Products

VendorProductAffected VersionsCPESubscribe
zephyrprojectzephyr 4.0.0 ~ 4.4.2 -

II. Public POCs for CVE-2026-12052

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-12052

登录查看更多情报信息。

Patches & Fixes for CVE-2026-12052 (1)

Vendor Advisories for CVE-2026-12052 (1)

Same Patch Batch · zephyrproject · 2026-08-11 · 5 CVEs total

CVE-2026-118935.9 MEDIUMDouble free / use-after-free in Bouffalo Lab HCI driver send() error paths (hci_bflb)
CVE-2026-118945.9 MEDIUMDouble-free / use-after-free in Realtek BEE Bluetooth HCI driver `send()` error paths
CVE-2026-120514.6 MEDIUMNULL pointer dereference in USB DFU device_next download handler (handle_download)
CVE-2026-119853.6 LOWCross-thread FPU register leak on ARM when FPU enabled without register sharing

IV. Related Vulnerabilities

V. Comments for CVE-2026-12052

No comments yet


Leave a comment