CVE-2026-12051: NULL pointer dereference in USB DFU device_next download handler (handle_download)

Published Aug 11, 2026
·
Updated

The USB DFU class implementation in Zephyr's new (experimental) devicenext USB device stack contains a NULL pointer dereference in handledownload() (subsys/usb/devicenext/class/usbddfu.c). The handler computes MIN(setup->wLength, buf->len) and passes buf->data to the image write callback without checking that the buf netbuf pointer is non-NULL.

The handler is reached over the USB control endpoint, driven by the USB host. For a DFUDNLOAD (download) request with no Data OUT stage — notably the zero-length terminating download that the DFU protocol uses to end a firmware transfer — the USB core invokes the class handler with a NULL buffer. After the device has been advanced to the DFUDNLOADIDLE state (by sending one valid download block and a GETSTATUS), a zero-length DFUDNLOAD reaches handledownload() with buf == NULL, dereferencing it.

The result is a NULL+offset read that triggers a fatal CPU fault, i.e. a denial of service (device crash/reset). The attacker is whatever controls the USB host the device is attached to; DFU download support must be enabled with a registered image. There is no memory corruption or information disclosure — impact is limited to availability. The fix adds an explicit if (buf != NULL) guard so the callback receives a zero-length, NULL-data transfer instead of crashing.

Affected Software

1 affected component
Zephyr device_next USB device stack

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Zephyr subsys/usb/device_next/class/usbd_dfu.c (USB DFU device_next) to a version that resolves this vulnerability.

    Fixed in experimental
  2. Configuration

    Ensure DFU download support is only enabled when a DFU image is registered (DFU download support must be enabled with a registered image) to limit reachability of the affected handle_download() path from the USB host.

    Zephyr USB DFU device_next DFU download support = enabled/registered image
  3. Compensating control

    Mitigate potential USB-host-triggered denial of service by restricting or filtering which USB hosts/devices can connect to the DFU-capable interface (since the handler is reached over the USB control endpoint and driven by the USB host).

Event History

Aug 11, 2026
CVE Published
via MITRE·05:31 AM
Data Sourced
via MITRE·05:31 AM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203
CVE-2026-12051 - NULL pointer dereference in USB DFU device_next download handler (handle_download) - SecAlerts