Skip to main content

Zephyr USB Stack EUVDEUVD-2026-84012

| CVE-2026-17050 MEDIUM
Double Free (CWE-415)
2026-09-21 zephyr
5.7
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attach malicious USB device
  2. Delivery
    Answer 9-byte config header then fail a check
  3. Exploit
    Trigger double free on usb_device_heap
  4. Execution
    k_panic or free-list corruption
  5. Impact
    Denial of service of USB host

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Double free prevention
Exploitation Conditions

Requires (1) CONFIG_USB_HOST_STACK enabled - it is experimental and disabled by default in Zephyr, so most builds are not affected; (2) physical access to attach a malicious or malformed USB peripheral (AV:P); and (3) the attacker-controlled device to return a valid 9-byte configuration-descriptor header and then fail one of three checks (failed full GET_DESCRIPTOR(CONFIGURATION), a short-vs-full descriptor mismatch, or a rejected descriptor in parse_configuration_descriptor - e.g. interface count disagreeing with bNumInterfaces). On v4.4.x the double free occurs within a single failed enumeration; on v4.1.0-v4.3.x it additionally requires a device-controlled removal or duplicate-connect event after the failed enumeration. Impact severity also depends on build config: CONFIG_SYS_HEAP_HARDENING_BASIC (default) yields a clean k_panic DoS, while CONFIG_SYS_HEAP_HARDENING_NONE or older releases permit free-list corruption.

Impact

This is a genuine but low-priority issue. The CVSS 3.1 vector (AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H, 5.7 MEDIUM) makes the decisive limitation explicit: AV:P means physical access is required - the attacker must physically attach a malicious or malformed USB device to a Zephyr host running the experimental USB host stack. There is no EPSS score, no CISA KEV listing, and no public exploit code identified at time of analysis, so this is no public exploit identified at time of analysis. The A:H is the dominant impact: on default builds (CONFIG_SYS_HEAP_HARDENING_BASIC) the double free is caught by sys_heap_free() which calls k_panic(), yielding a deterministic peripheral-triggered denial of service. The C:L/I:L reflect only the non-default weaker case (CONFIG_SYS_HEAP_HARDENING_NONE or older releases) where free-list corruption could yield overlapping/invalid allocations, but the description explicitly bounds this: usb_device_heap is a tiny dedicated 1024-byte heap whose sole client is the descriptor buffer, sharply limiting any escalation beyond DoS. Crucially, CONFIG_USB_HOST_STACK is marked experimental and disabled by default, so most fielded Zephyr deployments are not exposed at all. Signals are consistent - no conflict between CVSS, EPSS, and KEV; all point to a targeted, physical-access, DoS-grade issue rather than a widespread remote threat.

Exploit ScenarioDerived

An attacker with brief physical access plugs a malicious or emulated USB device into a Zephyr host that has the experimental USB host stack enabled. The device answers the first 9-byte configuration-descriptor request with a well-formed header, then deliberately fails a validation check (e.g. returns a full descriptor whose interface count disagrees with bNumInterfaces, or answers the second read with different bytes), triggering the double free during enumeration. No public exploit code is known; the result is a k_panic denial of service on hardened builds, or heap free-list corruption on builds without heap hardening.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 21, 2026

A double-free (CWE-415) in Zephyr's experimental USB host stack lets a malicious or malformed USB peripheral crash the device: the stack frees the per-device configuration-descriptor buffer udev->cfg_desc on three error paths in usbh_device_set_configuration() but never clears the pointer, so the guarded cleanup in usbh_device_free() frees the same chunk again. Only builds with CONFIG_USB_HOST_STACK enabled are exposed, and because that stack is experimental and off by default most Zephyr deployments are unaffected; exploitation requires physical access to plug in the attacker-controlled device and, on v4.1.0-v4.3.x, a device-initiated removal or duplicate-connect event after a failed enumeration. With the default CONFIG_SYS_HEAP_HARDENING_BASIC the double free is caught and triggers k_panic() - a deterministic denial of service - while builds using CONFIG_SYS_HEAP_HARDENING_NONE or older releases corrupt the free list of the small 1024-byte usb_device_heap instead. No public exploit identified at time of analysis and no CISA KEV listing; the vendor has published a fix (commit d46a8c1f) and a GitHub security advisory, making this a genuine but low-priority issue given the physical-access and build-configuration prerequisites.

RemediationAI

Apply the upstream fix, which is the commit at https://github.com/zephyrproject-rtos/zephyr/commit/d46a8c1f8fb65e1f80b44bd651a6dafea747602e and the vendor advisory at https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-r7xw-9jhg-88cm; the change adds udev->cfg_desc = NULL after each k_heap_free() in usbh_device_set_configuration() and in usbh_device_free(), and no specific tagged release version is given in the provided data, so upgrade to a Zephyr release or vendor SDK revision that includes this commit and confirm the commit is in your tree. Because the stack is experimental and disabled by default, the most direct compensating control for systems that cannot be updated is to keep CONFIG_USB_HOST_STACK disabled; enabling it is a prerequisite for the bug, so disabling it removes the attack surface entirely at the cost of losing USB host functionality. Where USB host operation is required, restrict physical access to the device's USB ports and avoid enumerating untrusted or unknown peripherals, since the trigger is a malicious or malformed device response and the assessed vector is AV:P; sealing or port-blocking has the obvious trade-off of preventing legitimate hot-plug use. Enabling heap hardening (CONFIG_SYS_HEAP_HARDENING_BASIC, the current default) does not prevent the bug but converts the double free into a deterministic k_panic() rather than silent free-list corruption, and leaving hardening disabled or running an older release trades a visible crash for a potentially worse heap-corruption state, so hardening should not be treated as a fix. Finally, since on v4.1.0-v4.3.x the second free is reached through the removal/duplicate-connect handlers in usbh_core.c, and on v4.4.x within the same failed enumeration, an update to the fixed code is the only remediation that removes the double free in both paths; do not rely on unplugging order or enumeration sequencing as a mitigation, as those events are controlled by the attached device.

Affected VersionsENISA

Zephyr 4.1.0 <4.4.2

Affected Packages

euvd zephyr fix: 4.4.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw lives in subsys/usb/host/usbh_device.c in Zephyr's experimental USB host class driver. During enumeration usbh_device_connect() calls usbh_device_init(), which ends in usbh_device_set_configuration(); that routine allocates udev->cfg_desc from the dedicated usb_device_heap (CONFIG_USBH_USB_DEVICE_HEAP, default 1024 bytes) to hold the full configuration descriptor. Three error paths - a failed full-length GET_DESCRIPTOR(CONFIGURATION) read, a mismatch between the short 9-byte header read and the full descriptor read, and a descriptor rejected by parse_configuration_descriptor() (for example when the interface count disagrees with bNumInterfaces) - call k_heap_free() on the buffer without setting udev->cfg_desc to NULL. The cleanup in usbh_device_free() only checks if (udev->cfg_desc != NULL), so an already-freed pointer is passed to k_heap_free() a second time. The root-cause class is CWE-415 (Double Free), i.e. a dangling-pointer/lifetime-management defect rather than a memory-safety flaw in parsing itself. The consequence is build-dependent: sys_heap_free() under CONFIG_SYS_HEAP_HARDENING_BASIC (the current default) detects a chunk already marked free and calls k_panic(), whereas hardening disabled or older releases let the second free relink a chunk that is already on the free list, so subsequent allocations can hand back overlapping or invalid blocks. The security relevance is deliberately bounded: usb_device_heap is a small dedicated heap whose only client is this descriptor buffer, and CONFIG_USB_HOST_STACK is marked experimental and disabled by default, which limits escalation beyond denial of service. The upstream fix simply assigns udev->cfg_desc = NULL after every k_heap_free(), making the NULL guard in usbh_device_free() sound.

Know when Zephyr gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (zephyr) PRIMARY 5.7 MEDIUM
AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
vuln.today AI 5.7 MEDIUM

Physical malicious USB device (AV:P), no auth as attacker controls the peripheral (PR:N), reliable trigger (AC:L); A:H from deterministic k_panic, C:L/I:L only from non-default unhardened heap corruption.

3.1 AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
4.0 AV:P/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

Attack Vector
Physical
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
High

DescriptionCVE.org

The experimental USB host stack allocates a per-device configuration-descriptor buffer, udev->cfg_desc, from the dedicated usb_device_heap in usbh_device_set_configuration() (subsys/usb/host/usbh_device.c). On three failure paths - a failed full-length GET_DESCRIPTOR(CONFIGURATION) read, a mismatch between the short and full descriptor reads, and a rejected descriptor in parse_configuration_descriptor() - the buffer was released with k_heap_free() but the pointer was left dangling. The cleanup in usbh_device_free() is guarded only by if (udev->cfg_desc != NULL), so it frees the same block a second time.

The path is driven entirely by the attached peripheral: usbh_device_connect() calls usbh_device_init(), which ends in usbh_device_set_configuration(), and on failure usbh_device_connect() calls usbh_device_free(). On v4.4.x this happens during the same enumeration, with no unplug required; on v4.1.0-v4.3.x the second free instead arrives via dev_removed_handler()/dev_connected_handler() in subsys/usb/host/usbh_core.c, so it requires a removal or duplicate-connect event after the failed enumeration - a sequence the attached device fully controls. A malicious or malformed USB device only has to answer the first 9-byte configuration-descriptor request with a well-formed header and then fail any of the three checks, for example by returning a full descriptor whose interface count disagrees with bNumInterfaces, or by answering the second read with different bytes.

The result is a double free on usb_device_heap. On builds where lib/heap hardening is active (the current default CONFIG_SYS_HEAP_HARDENING_BASIC), sys_heap_free() detects the already-free chunk and calls k_panic(), giving a deterministic, peripheral-triggered denial of service of the USB host. On builds without that detection - earlier releases, or CONFIG_SYS_HEAP_HARDENING_NONE - the second free manipulates a chunk already on the free list, corrupting the heap's free list so that later allocations can return overlapping or invalid blocks.

Exploitation beyond denial of service is bounded by the fact that usb_device_heap is a small dedicated heap (CONFIG_USBH_USB_DEVICE_HEAP, default 1024 bytes) whose only client is this descriptor buffer, and by CONFIG_USB_HOST_STACK being marked experimental and disabled by default. The fix sets udev->cfg_desc = NULL after every k_heap_free(), making the cleanup guard sound.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Low
Zephyr is a popular RTOS, but this USB host stack is experimental and disabled by default
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

28
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Zephyr

View all
CVE-2023-4260 CRITICAL POC
10.0 Sep 27

Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),

CVE-2026-1678 CRITICAL POC
9.8 Mar 05

An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on

CVE-2023-5055 CRITICAL POC
9.8 Nov 21

Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2023-4257 CRITICAL POC
9.8 Oct 13

Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS

CVE-2023-3725 CRITICAL POC
9.8 Oct 06

Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner

CVE-2021-3323 CRITICAL POC
9.8 Oct 12

Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability

CVE-2021-3625 CRITICAL POC
9.8 Oct 05

Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable

CVE-2021-3319 CRITICAL POC
9.8 Oct 05

DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul

CVE-2018-1000800 CRITICAL POC
9.8 Sep 06

zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(

CVE-2023-4264 CRITICAL POC
9.6 Sep 27

Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul

CVE-2024-1638 CRITICAL POC
9.1 Feb 19

The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte

CVE-2023-5753 HIGH POC
8.8 Oct 25

Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy