# CVE-2026-18417: Wild pointer dereference in Zephyr BSD sockets when a TCP listening socket reports an asynchronous error

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

- **Severity:** MEDIUM 6.5
- **CVSS:** 6.5 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.29% (percentile 14, 2026-11-28)
- **CWE:** CWE-843
- **Published:** 2026-09-28T23:25:23.903Z
- **Modified:** 2026-11-06T17:52:07.567Z

## Who should check

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

## Description

The native BSD-socket layer recorded a pending asynchronous socket error by type-punning it into struct net\_context's void user\_data field (ctx-\>user\_data = INT\_TO\_POINTER(-status) in zsock\_accepted\_cb(), zsock\_received\_cb(), zsock\_connected\_cb() and zsock\_close\_ctx() in subsys/net/lib/sockets/sockets\_inet.c), reading it back with POINTER\_TO\_INT(). That same field is owned by the network stack for listening TCP contexts: net\_tcp\_accept() stores the parent context pointer there and the TCP core passes it back to the registered accept callback. A failed accept therefore left a small integer (an errno value) where the stack expected a struct net\_context .

When the network interface carrying a listening TCP socket goes down, close\_tcp\_conn() in subsys/net/ip/tcp.c invokes the accept callback with -ENETDOWN and the context's user\_data. In v4.3.0 the callback was not disarmed afterwards, so a second interface-down event forwarded the previously stored errno to zsock\_accepted\_cb(), which dereferenced it as the parent context and performed several stores through it (sock\_set\_error()'s read-modify-write of socket\_data, k\_fifo\_cancel\_wait(&parent-\>recv\_q)) — the crash described in the fix's commit message. v4.3.1 and v4.4.x carry a later change clearing conn-\>accept\_cb after the error callback (269cb8823d3 on the v4.3 branch, 913fae5169425550f2364655298fceb79b320066 on main), which closes that repeat path; on those releases the poisoned cookie remains reachable only by a narrower race, a handshake completing alongside the interface-down still passing the stale cookie to k\_fifo\_put(&parent-\>accept\_q, ...), and by getsockopt(SO\_ERROR), which reads the field back unconditionally.

On v4.3.0 an application that keeps a listening TCP socket open across repeated link-down events is sufficient to reach the defect; the triggering condition is a network-interface state change, not attacker-supplied packet data, so the practical attacker is one able to force the link down repeatedly (for example an adjacent attacker disrupting a wireless link) or one with local/physical access. Because both the faulting address and the stored data are fixed small constants derived from the errno value, the outcome is a wild-pointer access leading to a kernel fatal error — a denial of service (device crash or reset) rather than an attacker-directed memory corruption.

The fix stores the pending error in a dedicated net\_context.sock\_error field and converts every producer and consumer to sock\_set\_error()/sock\_get\_error(), leaving user\_data untouched. As a side effect it also stops getsockopt(SO\_ERROR) — which is evaluated unconditionally — from returning the kernel address held in user\_data to a userspace application.

## Affected and fixed versions

- zephyrproject zephyr: \>= 4.3.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-18417. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-18417.md
Affected: zephyrproject zephyr >= 4.3.0, < 4.4.2
Fixed in: 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-18417 being exploited?

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

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

Medium: CVSS 6.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

zephyrproject zephyr \>= 4.3.0, \< 4.4.2.

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

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

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

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-p8r8-8mw8-3wf9>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/ef370a57d07637aaee8cec7b0bcebf4002ac8f54>

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

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