Zephyr RTOS
CVE-2026-18417
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain adjacent-network position to victim device
-
DeliveryForce listening interface down (poison user_data)
-
ExploitForce interface down again
-
Executionclose_tcp_conn passes stale errno to accept callback
-
PersistWild-pointer store in zsock_accepted_cb
-
ImpactKernel fatal error crashes/resets device
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Type safety enforcement
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the device to run Zephyr v4.3.0 (the full crash path) with an application that holds a listening TCP socket open across repeated network-interface link-down events; the accept callback is not disarmed on v4.3.0, so a second interface-down forwards a previously stored errno as a bogus context pointer. The trigger is a network-interface state change (link down), NOT attacker-supplied packet data, so the attacker must be positioned to force the link down repeatedly - realistically an adjacent attacker disrupting a wireless link (matching CVSS AV:A) or one with local/physical access - and no authentication or user interaction is needed. Limiting factors: v4.3.1 and v4.4.x carry the accept_cb-clearing fix, reducing this to a narrow handshake-vs-interface-down race plus a getsockopt(SO_ERROR) kernel-pointer read-back; a device with no persistent listening TCP socket, or one that is not subject to repeated link-down events, is not practically exploitable. |
| Impact | This is a genuine but conditional issue with a modest real-world priority. The CVSS 3.1 vector (AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, score 6.5) correctly captures the profile: an adjacent, unauthenticated attacker who can force a network interface down can crash the device (availability-only impact, no confidentiality or integrity). The Zephyr GHSA-p8r8-8mw8-3wf9 advisory and the fix commit (ef370a57) confirm the mechanism and that the observed outcome is a kernel fatal error - a denial of service - not attacker-directed memory corruption, because both the faulting address and stored data are fixed small constants derived from the errno value. There is no EPSS score, no CISA KEV listing, and no public exploit code, so exploitation status is: no public exploit identified at time of analysis. The AV:A (adjacent) vector is well-matched to the described attacker (an adjacent party disrupting a wireless link, or someone with local/physical access) and should NOT be read as remote-Internet exploitability. One nuance worth flagging: the full trigger on the crash path is specific to v4.3.0 (accept callback not disarmed); v4.3.1 and v4.4.x reduce this to a narrow race plus a getsockopt(SO_ERROR) kernel-pointer read-back, so the real risk is version-dependent. Overall this is a real-but-narrow availability defect in embedded/IoT deployments rather than a high-urgency, widely-weaponizable flaw. |
| Exploit ScenarioDerived | An embedded/IoT device runs Zephyr v4.3.0 with an application that keeps a listening TCP socket open (e.g. a management or telemetry service) over a wireless link. An adjacent attacker repeatedly forces the interface down (e.g. by disrupting the wireless link); the first interface-down event poisons net_context.user_data with an errno value, and a second one causes zsock_accepted_cb() to dereference that small integer as a context pointer, producing a wild-pointer write and a kernel fatal error that crashes or resets the device. No public exploit code exists, and the trigger is a network-interface state change rather than crafted packets, so success depends on the attacker's ability to repeatedly toggle the link. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 29, 2026
Repeated network-interface link-down events can crash or reset devices running Zephyr RTOS v4.3.0 that keep a listening TCP socket open, because the BSD-socket layer parks a pending errno value in the net_context user_data field while the TCP core simultaneously expects that field to hold a parent context pointer; a second interface-down event forwards the stale integer to zsock_accepted_cb(), which dereferences it as a pointer and writes through it, producing a wild-pointer access and a kernel fatal error (denial of service, not attacker-directed memory corruption). The flaw is reachable by unauthenticated adjacent attackers who can force the link down repeatedly (CVSS 3.1 AV:A/AC:L/PR:N/UI:N, 6.5, availability-only impact), and no public exploit code or confirmed active exploitation has been identified at time of analysis. Zephyr v4.3.1 and v4.4.x carry a follow-up change that clears the accept callback after the error path, reducing the issue to a narrow handshake-versus-interface-down race plus an unconditional getsockopt(SO_ERROR) read-back of the kernel pointer stored in user_data, so those lines are far less practically exploitable than v4.3.0.
RemediationAI
Apply the upstream fix, commit ef370a57d07637aaee8cec7b0bcebf4002ac8f54 (see https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-p8r8-8mw8-3wf9), which adds a dedicated net_context.sock_error field and routes all pending-error handling through sock_set_error()/sock_get_error() so user_data is never repurposed; upstream fix available (commit/PR); released patched version not independently confirmed, so verify the commit is present in whichever Zephyr release you consume. If upgrading is not immediate, preferentially backport the accept-callback disarm change (269cb8823d3 on the v4.3 branch, 913fae5169425550f2364655298fceb79b320066 on main), which closes the repeat path that makes v4.3.0 straightforwardly reachable - this is a targeted, low-risk change but leaves the narrow handshake-versus-interface-down race and the SO_ERROR read-back in place. As compensating controls, applications on v4.3.0 should avoid holding a listening TCP socket open across repeated link events - close and re-bind the listener on interface state changes, at the cost of dropping pending connections and adding re-bind latency; and avoid calling getsockopt(SO_ERROR) on contexts that may carry the SOCK_ERROR flag, since on unpatched builds it can return a kernel address to userspace, though this only removes the information-disclosure facet, not the crash. Because the trigger is a network-interface state change rather than attacker-supplied packets, reduce the attacker's reach by hardening or disabling the wireless/adjacent link the attacker would disrupt (for example prefer wired links or enforce link-layer protection), and restrict local/physical access to the device, accepting that the crash remains reachable by anyone who can already force repeated link-down on an affected device running a persistent listener.
Affected ProductsAI
Zephyr RTOS releases prior to the fix are affected, with the fully reaching configuration being v4.3.0, where a listening TCP socket kept open across repeated network-interface link-down events is sufficient to hit the crash path because the accept callback is not disarmed after the -ENETDOWN error callback. Zephyr v4.3.1 and the v4.4.x line include the later change clearing conn->accept_cb after the error callback (269cb8823d3d on the v4.3 branch and 913fae5169425550f2364655298fceb79b320066 on main), so on those releases the poisoned user_data cookie is reachable only through a much narrower race - a handshake completing alongside the interface-down so a stale cookie is passed to k_fifo_put(&parent->accept_q, ...) - and through getsockopt(SO_ERROR), which reads the field back unconditionally. No CPE entries were supplied with the advisory data; the authoritative affected-product statement and version guidance are in the vendor security advisory at https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-p8r8-8mw8-3wf9, and the fixing change is visible at https://github.com/zephyrproject-rtos/zephyr/commit/ef370a57d07637aaee8cec7b0bcebf4002ac8f54.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The defect is a CWE-843 type confusion in Zephyr's native networking stack, specifically the BSD socket compatibility layer in subsys/net/lib/sockets/sockets_inet.c. Zephyr overloads struct net_context's void *user_data field for two incompatible purposes: for listening TCP contexts, net_tcp_accept() stores the parent context pointer there and the TCP core hands it back to the registered accept callback; for ordinary asynchronous socket errors, zsock_accepted_cb(), zsock_received_cb(), zsock_connected_cb() and zsock_close_ctx() type-pun a small errno integer into the same field with INT_TO_POINTER(-status) and read it back via POINTER_TO_INT(). 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 plus the context's user_data. On v4.3.0 the callback was not disarmed, so a second interface-down event delivered a previously stored errno to zsock_accepted_cb(), which treated that small integer as a struct net_context * and performed stores through it (sock_set_error()'s read-modify-write of socket_data and k_fifo_cancel_wait(&parent->recv_q)), faulting in kernel context. Because both the faulting address and the stored value are small fixed constants derived from the errno, the result is a deterministic wild-pointer access leading to a fatal error rather than controllable corruption. The upstream fix (commit ef370a57d07637aaee8cec7b0bcebf4002ac8f54, tracked as GHSA-p8r8-8mw8-3wf9) introduces a dedicated net_context.sock_error field and converts every producer and consumer of the pending error to sock_set_error()/sock_get_error(), leaving user_data exclusively for the stack's accept plumbing; as a side effect it stops getsockopt(SO_ERROR) - which evaluates the field unconditionally - from returning a kernel address held in user_data to userspace.
Know when Zephyr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Adjacent attacker forcing repeated link-down (AV:A), no auth or interaction needed on v4.3.0 (PR:N/UI:N/AC:L), and impact is device crash only (A:H, C:N/I:N).
Primary rating from Vendor (zephyrproject).
CVSS VectorVendor: zephyrproject
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Related Vulnerabilities in Zephyr RTOS Memory Safety and DoS Vulnerabilities
View all 3Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on
Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit
Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS
Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner
Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability
Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable
DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul
zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(
Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul
The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte
Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB