Skip to main content

Zephyr RTOS CVE-2026-10646

| EUVDEUVD-2026-39980 HIGH
Use After Free (CWE-416)
2026-06-28 zephyr
7.4
CVSS 3.1 · Vendor: zephyr
Share

Severity by source

Vendor (zephyr) PRIMARY
7.4 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
vuln.today AI
7.4 HIGH

Network-influenceable via spoofable DNS id (AV:N) needing no auth or interaction (PR:N/UI:N) but gated by a timeout/race window (AC:H); stack corruption gives I:H/A:H with no confidentiality impact (C:N).

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

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

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

Lifecycle Timeline

2
Source Code Evidence Fetched
Jun 28, 2026 - 05:15 vuln.today
Analysis Generated
Jun 28, 2026 - 05:15 vuln.today

DescriptionCVE.org

Zephyr's BSD-sockets getaddrinfo() implementation (subsys/net/lib/sockets/getaddrinfo.c) passes a pointer to a stack-allocated state object (struct getaddrinfo_state ai_state) as the user_data of an asynchronous DNS resolver query. The socket layer waits on a semaphore with a timeout deliberately set slightly longer than the resolver's own per-query timeout. When that semaphore wait nonetheless times out (-EAGAIN) - which can occur when the resolver's timeout work is delayed by workqueue contention, or in the documented multi-retry configuration where CONFIG_NET_SOCKETS_DNS_TIMEOUT exceeds CONFIG_NET_SOCKETS_DNS_BACKOFF_INTERVAL - the pre-fix code retries the query (goto again) without cancelling the previous one and without resetting the semaphore. The previous query slot remains active in the resolver with its callback and the stack pointer as user_data, and ai_state-dns_id is overwritten so the stale query can no longer be cancelled. A subsequent DNS response delivered over UDP and matched by its 16-bit transaction id (in dispatcher_cb()/dns_read()), or the resolver's own delayed query-timeout work, then invokes dns_resolve_cb() against the now out-of-scope stack frame, writing through the stale pointer (state-status, state-idx, state-ai_arr[], and k_sem_give()). Because the triggering response is network-delivered and its 16-bit id is spoofable/replayable by an on- or off-path attacker, this is a network-influenceable use-after-return that can corrupt reused stack memory, leading to crashes/denial of service or memory corruption. The fix cancels the timed-out query by name and type before retrying and resets the local semaphore, eliminating the stale callback path. Affected: Zephyr v4.0.0 through v4.4.0.

AnalysisAI

Memory corruption and denial of service in Zephyr RTOS (v4.0.0 through v4.4.0) arises in the BSD-sockets getaddrinfo() implementation, where a timed-out DNS query is retried without cancelling the prior query, leaving a callback holding a pointer into a stack frame that goes out of scope after getaddrinfo() returns. A network-delivered DNS response matched by its spoofable 16-bit transaction id, or the resolver's own delayed timeout work, then writes through that stale pointer, enabling crashes or reused-stack corruption. There is no public exploit identified at time of analysis and the issue is not in CISA KEV; exploitation is gated by a timing/race window reflected in CVSS AC:H.

Technical ContextAI

The defect is a CWE-416 use-after-free, more precisely a use-after-return: subsys/net/lib/sockets/getaddrinfo.c registers a pointer to a stack-allocated 'struct getaddrinfo_state ai_state' as the user_data for an asynchronous DNS resolver query and waits on a per-call semaphore. The socket layer sizes its semaphore timeout slightly longer than the resolver's per-query timeout to normally avoid cancellation, but if the semaphore still returns -EAGAIN, the pre-fix code executes 'goto again' to retry, overwriting ai_state->dns_id (so the old query can no longer be cancelled) without resetting the semaphore. The orphaned query remains active inside the DNS resolver subsystem; when a UDP DNS response is matched by transaction id in dispatcher_cb()/dns_read(), or the resolver's delayed query-timeout work fires, dns_resolve_cb() dereferences the now-invalid stack pointer and writes to state->status, state->idx, state->ai_arr[], and calls k_sem_give(). The affected product per CPE is cpe:2.3:a:zephyrproject:zephyr, the open-source real-time operating system and its native BSD-sockets/DNS networking stack.

RemediationAI

Upstream fix available (PR/commit); released patched version not independently confirmed - apply Zephyr commit cd27da58eedb8d0fe380dd340b81ca5afa35de45 (referenced by advisory GHSA-h752-vhmf-29w6) or upgrade to the first tagged release after v4.4.0 that contains it once published. The fix cancels the timed-out query by name and type via the new dns_cancel_addr_info_with_name() helper and resets the local semaphore before retrying, removing the stale callback path. If you cannot patch immediately, reduce the chance of the retry/race by configuring CONFIG_NET_SOCKETS_DNS_TIMEOUT so it does not exceed CONFIG_NET_SOCKETS_DNS_BACKOFF_INTERVAL (avoiding the documented multi-retry path) and by relieving workqueue contention that delays the resolver's timeout work - trade-off: tighter timeouts can cause more legitimate lookups to fail on slow networks. Additionally, restrict DNS to a trusted resolver and filter/validate UDP DNS responses at the network boundary to limit an attacker's ability to inject spoofed responses, accepting that this does not close the off-path race entirely. Build and verify against the vendor advisory at https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-h752-vhmf-29w6.

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-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-2026-1678 CRITICAL POC
9.4 Mar 05

Buffer overflow in Zephyr RTOS dns_unpack_name() function causing OOB writes. PoC available.

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

Share

CVE-2026-10646 vulnerability details – vuln.today

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