Read the docs

Use-after-return in Zephyr getaddrinfo() after CNAME-only DNS replies

Priority LOW 29CWE-416Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
None · Low · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA.

Summary

Zephyr's DNS resolver and getaddrinfo(), from 4.4.2 before 4.5.0, can use a stack frame after it has been released (CWE-416). When a DNS reply contains only a CNAME, cancelling the query by its original name fails, so a timed-out getaddrinfo() call returns while the query stays pending. The later reply callback writes to the dead stack frame when an attacker who can supply DNS responses (a malicious server, an on-path attacker, or a host answering mDNS or LLMNR queries) sends a CNAME-only reply late, causing a kernel fault or memory corruption in the calling thread's stack. CVSS 3.1 base score: 6.5 (medium).

Written with Claude Haiku 5.5 from the sources below · 2026-11-27

Description from the CNA

dns_resolve_cancel_with_name() in subsys/net/lib/dns/resolve.c looks up the pending query to cancel by DNS id plus a hash of the name the caller originally asked for. When a reply contains only a CNAME, the resolver sends a new query for the alias and overwrites the slot's query_hash with the hash of the alias name. After one or more CNAME hops, cancelling by the original name silently fails with -ENOENT and the query stays pending. zsock_getaddrinfo() (exec_query() in subsys/net/lib/sockets/getaddrinfo.c) passes a pointer to its stack-local ai_state as the resolver callback context. When its semaphore wait times out, it calls dns_cancel_addr_info_with_name(), ignores the result, and returns. The CNAME re-query restarts the resolver timer, so a CNAME-only response that arrives more than about 100 ms after the query lets the getaddrinfo() wait expire first. The cancel then fails and getaddrinfo() returns. An attacker who can supply DNS responses can trigger this reliably: a malicious or compromised DNS server, an on-path attacker, or any host on the link for mDNS/LLMNR lookups. The device only has to resolve a name with getaddrinfo(). When the orphaned query later times out, dns_resolve_cb() writes the status and calls k_sem_give() on the dead stack frame. If the attacker answers the alias query instead, the callback copies attacker-supplied address data through a stale ai_arr pointer read from the reused stack. The result is a kernel fault (denial of service) or memory corruption in the calling thread's stack and whatever memory the stale pointer references.

Why it matters now

EPSS 0.00383 24th percentileScored 2026-11-30
Fix Fixed zephyr (zephyrproject): 4.5.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
zephyrprojectzephyr4.4.2 to before 4.5.04.5.0Patch availableCNA
  • zephyr Vendorzephyrproject Affected 4.4.2 to before 4.5.0 Fixed in 4.5.0 Patch available CNA

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:*——zephyrproject
  • cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:* Versions — — ·zephyrproject

Remediation

Upgrade Zephyr to version 4.5.0 or later.

Written with Claude Haiku 5.5 from the sources below · 2026-11-27

  • Fix · CNA zephyr (zephyrproject) Fixed in 4.5.0

Timeline

  1. 2026-11-27 Threatist record created from CVE-2026-102963

References

  • TI-2026-04422 Out-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-Key CVSS 3.1CRITICAL 9.8
  • TI-2026-01361 dns: memory‑safety issue in the DNS name parser CVSS 3.1CRITICAL 9.8
  • TI-2026-09174 Unterminated URI buffer causes out-of-bounds read in LwM2M firmware pull (Package URI) CVSS 3.1CRITICAL 9.1
  • TI-2026-09168 Stack buffer overflow in `net_ipaddr_parse()` IPv4 address-with-port parsing in `subsys/net/ip/utils.c` CVSS 3.1CRITICAL 9.8
  • TI-2024-09625 net: lib: http_server: Buffer Under-read CVSS 3.1HIGH 8.6
  • TI-2021-02863 Usb bluetooth device ACL read cb buffer overflow CVSS 3.1CRITICAL 9.6
See all 399 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences