CVE-2026-12052
Out-of-bounds write in USB CDC NCM control handler when host wLength is smaller than the response
Mitigation
- Upgrade zephyr to 4.4.2 or later.
Who should check
- Anyone running zephyrproject zephyr >= 4.0.0, < 4.3.2; >= 4.4.0, < 4.4.2
Vulnerability facts
- Affected
- zephyrproject zephyr >= 4.0.0, < 4.3.2; >= 4.4.0, < 4.4.2
- Fixed in
- zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.2 (v3.1, CNA)CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Physical
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: Low
- Availability impact: High
- EPSS
- 0.27% chance of exploitation in 30 days (percentile 11, 2026-11-26)
- CWE
- CWE-787
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| zephyrproject zephyr | >= 4.0.0, < 4.3.2; >= 4.4.0, < 4.4.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-12052. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-12052.md Affected: zephyrproject zephyr >= 4.0.0, < 4.3.2; >= 4.4.0, < 4.4.2 Fixed in: zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2 Steps: 1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-12052 being exploited?
There is no confirmed exploitation: CVE-2026-12052 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-12052?
Medium: CVSS 5.2 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2026-12052?
zephyrproject zephyr >= 4.0.0, < 4.3.2; >= 4.4.0, < 4.4.2.
Is there a fix for CVE-2026-12052?
Yes. Fixed in zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2. Upgrade zephyr to 4.4.2 or later.
How do I check if I'm affected by CVE-2026-12052?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.