# CVE-2026-10646: Use-after-return in \`zsock\_getaddrinfo()\` when a timed-out DNS query is retried without cancellation

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.4
- **CVSS:** 7.4 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.45% (percentile 31, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2026-06-28T04:04:11.008Z
- **Modified:** 2026-10-25T17:10:00.197Z

## Who should check

- Anyone running zephyrproject zephyr \>= 3.7.0, \< 4.3.1; \>= 4.4.0, \< 4.4.2

## Description

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.

## Affected and fixed versions

- zephyrproject zephyr: \>= 3.7.0, \< 4.3.1; \>= 4.4.0, \< 4.4.2 (cvelist)

## Mitigation

- Upgrade zephyr to 4.4.2 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-10646. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-10646.md
Affected: zephyrproject zephyr >= 3.7.0, < 4.3.1; >= 4.4.0, < 4.4.2
Fixed in: zephyrproject zephyr 4.3.1, zephyrproject zephyr 4.4.2

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-10646 being exploited?

There is no confirmed exploitation: CVE-2026-10646 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.45% chance of exploitation in the next 30 days (as of 2026-11-26).

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

High: CVSS 7.4 (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-10646?

zephyrproject zephyr \>= 3.7.0, \< 4.3.1; \>= 4.4.0, \< 4.4.2.

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

Yes. Fixed in zephyrproject zephyr 4.3.1, zephyrproject zephyr 4.4.2. Upgrade zephyr to 4.4.2 or later.

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

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-h752-vhmf-29w6>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/cd27da58eedb8d0fe380dd340b81ca5afa35de45>

## 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-10646>

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