CVE-2026-12051: memory-safety in zephyrproject zephyr
The USB DFU class implementation in Zephyr's new (experimental) device_next USB device stack contains a NULL pointer dereference in handle_download() (subsys/usb/device_next/class/usbd_dfu.c). The handler computes MIN(setup->wLength, buf->len) and passes buf->data to the image write callback without checking that the buf net_buf pointer is non-NULL. The handler is reached over the USB control endpoint, driven by the USB host. For a DFU_DNLOAD (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 DFU_DNLOAD_IDLE state (by sending one valid download block and a GET_STATUS), a zero-length DFU_DNLOAD reaches handle_download() 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.
AI Analysis
Technical Summary
The USB DFU class implementation in Zephyr's experimental device_next USB device stack contains a NULL pointer dereference vulnerability in the handle_download() function (subsys/usb/device_next/class/usbd_dfu.c). When a zero-length DFU_DNLOAD request (used to terminate firmware transfer) is received, the handler is invoked with a NULL buffer pointer. The code dereferences this NULL pointer without checking, causing a fatal CPU fault and device crash/reset. The vulnerability impacts availability only and requires the device to have DFU download support enabled with a registered image. The attacker is the USB host controlling the device. The fix adds an explicit check for a non-NULL buffer before invoking the image write callback.
Potential Impact
Exploitation causes a denial of service by triggering a fatal CPU fault that crashes or resets the device. There is no impact on confidentiality or integrity, and no memory corruption or information disclosure occurs. The attacker must control the USB host and the device must have DFU download support enabled. The impact is limited to device availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The fix involves adding a NULL pointer check in the handle_download() function to prevent dereferencing a NULL buffer. Until a patch is available, disabling DFU download support or restricting USB host access may mitigate risk.
CVE-2026-12051: memory-safety in zephyrproject zephyr
Description
The USB DFU class implementation in Zephyr's new (experimental) device_next USB device stack contains a NULL pointer dereference in handle_download() (subsys/usb/device_next/class/usbd_dfu.c). The handler computes MIN(setup->wLength, buf->len) and passes buf->data to the image write callback without checking that the buf net_buf pointer is non-NULL. The handler is reached over the USB control endpoint, driven by the USB host. For a DFU_DNLOAD (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 DFU_DNLOAD_IDLE state (by sending one valid download block and a GET_STATUS), a zero-length DFU_DNLOAD reaches handle_download() 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.
CVSS v3.1
Score 4.6medium
Affected software
zephyrproject
zephyr
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The USB DFU class implementation in Zephyr's experimental device_next USB device stack contains a NULL pointer dereference vulnerability in the handle_download() function (subsys/usb/device_next/class/usbd_dfu.c). When a zero-length DFU_DNLOAD request (used to terminate firmware transfer) is received, the handler is invoked with a NULL buffer pointer. The code dereferences this NULL pointer without checking, causing a fatal CPU fault and device crash/reset. The vulnerability impacts availability only and requires the device to have DFU download support enabled with a registered image. The attacker is the USB host controlling the device. The fix adds an explicit check for a non-NULL buffer before invoking the image write callback.
Potential Impact
Exploitation causes a denial of service by triggering a fatal CPU fault that crashes or resets the device. There is no impact on confidentiality or integrity, and no memory corruption or information disclosure occurs. The attacker must control the USB host and the device must have DFU download support enabled. The impact is limited to device availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The fix involves adding a NULL pointer check in the handle_download() function to prevent dereferencing a NULL buffer. Until a patch is available, disabling DFU download support or restricting USB host access may mitigate risk.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- zephyr
- Date Reserved
- 2026-06-11T22:20:54.897Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a7ab61bbf8831d5393186fd
Added to database: 08/11/2026, 05:41:47 UTC
Last enriched: 08/11/2026, 05:59:24 UTC
Last updated: 09/25/2026, 13:47:42 UTC
Views: 56
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.