Technical impact
The vulnerability arises when the DNS resolver in Zephyr’s getaddrinfo() use a stack‑local call context that is reused after a CNAME‑only reply. The resolver updates the query hash during a CNAME hop and later attempts to cancel a query by the original name; the cancel fails silently. When the orphaned query eventually completes, the resolver writes status back to a context that has been freed, causing a stale pointer dereference. This use‑after‑return can trigger a kernel fault or arbitrary memory corruption in the calling thread’s stack, resulting in denial of service or even escalation of privileges within the kernel.
Affected Systems
The affected product is Zephyr RTOS (zephyrproject:zephyr). No specific version ranges are listed in the advisories; any build that includes the getaddrinfo() implementation in subsys/net/lib/sockets/getaddrinfo.c and the resolver code in subsys/net/lib/dns/resolve.c is potentially vulnerable.
Risk and Exploitability
The CVSS score is 6.5, indicating a moderate severity. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. An attacker who can control or observe DNS responses on the network – such as a compromised DNS server, an on‑path attacker, or a host on the same link for mDNS/LLMNR – can reliably exploit the flaw by sending a CNAME‑only reply that arrives several hundred milliseconds after the initial query, causing the getaddrinfo() call to timeout and the stale pointer to be used. The exploit requires network access to the host performing the resolution, and the attack surface is limited to DNS queries made through getaddrinfo().