# CVE-2026-102963: Use-after-return in getaddrinfo() when a DNS query that followed a CNAME cannot be cancelled

- **Severity:** MEDIUM 6.5
- **CVSS:** 6.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: Low; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **CWE:** CWE-416
- **Published:** 2026-11-27T15:42:06.863Z
- **Modified:** 2026-11-27T16:18:02.640Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker who can supply DNS responses can corrupt the stack of a Zephyr thread calling getaddrinfo() through a use-after-return after a CNAME-only reply, causing a crash or memory corruption.

## Who should check

- Anyone running zephyrproject zephyr \>= 4.4.2, \< 4.5.0

## Description

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.

## Affected and fixed versions

- zephyrproject zephyr: \>= 4.4.2, \< 4.5.0 (cvelist)

## Technologies

Linux kernel (AI-matched), Zephyr RTOS

## Mitigation

- Upgrade zephyr to 4.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-102963. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-102963.md
Affected: zephyrproject zephyr >= 4.4.2, < 4.5.0
Fixed in: zephyrproject zephyr 4.5.0

Steps:
1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-102963 being exploited?

There is no confirmed exploitation: CVE-2026-102963 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-102963?

Medium: CVSS 6.5 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-102963?

zephyrproject zephyr \>= 4.4.2, \< 4.5.0.

### Is there a fix for CVE-2026-102963?

Yes. Fixed in zephyrproject zephyr 4.5.0. Upgrade zephyr to 4.5.0 or later.

### How do I check if I'm affected by CVE-2026-102963?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-j577-282h-9jjr>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/50a1257c045af73bc3e00df92728ede68627ffe8>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-102963>

HTML: <https://flawdb.com/CVE-2026-102963> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-102963>
