CVE-2026-10634: Zephyr TCP Stack Use-After-Free Race Condition
A race condition in Zephyr's TCP stack allows an attacker on the local network to crash the system or potentially read sensitive memory. The vulnerability exists in how the TCP layer iterates through active connections while a background thread can simultaneously free those connections, causing the iterator to access memory that has already been released. While the attacker needs local network access and user privileges to trigger the issue reliably, the outcome is denial of service or information disclosure on affected embedded and IoT devices running Zephyr.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 4.8 MEDIUM · CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-416
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-15 / 2026-07-14
NVD description (verbatim)
Zephyr's native TCP stack iterates the global connection list in net_tcp_foreach() (subsys/net/ip/tcp.c) using the SYS_SLIST_FOR_EACH_CONTAINER_SAFE macro, which caches a pointer to the next list node. Prior to this fix the function released tcp_lock while invoking the per-connection callback and re-acquired it afterwards. During that window a concurrent tcp_conn_release(), running on the dedicated TCP work-queue thread when a connection's reference count drops to zero (e.g. a remote peer closing or resetting the connection), can remove and k_mem_slab_free() the cached next connection. When the iterator advances it dereferences the freed (and possibly reallocated) slab memory — a use-after-free that can crash the system (denial of service) and, if the slot has been reused, cause the callback to operate on an attacker-influenced object (potential information disclosure or further fault). net_tcp_foreach() is reached in production via the net conn network shell command and via net_tcp_close_all_for_iface() on interface-down; the freeing side is driven by ordinary TCP traffic. The fix moves the connection/context teardown in tcp_conn_release() inside the tcp_lock critical section and keeps tcp_lock held across the callback in net_tcp_foreach(). The defect was introduced with the modern (TCP2) stack in 2020 and affects releases up to and including v4.4.0.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-10634 is a use-after-free vulnerability in net_tcp_foreach() (subsys/net/ip/tcp.c) of Zephyr's TCP2 stack. The function iterates a global connection list using SYS_SLIST_FOR_EACH_CONTAINER_SAFE, which caches the next node pointer. Before the fix, tcp_lock was released during per-connection callback execution and re-acquired afterward. A concurrent tcp_conn_release() running on the dedicated TCP work-queue thread can remove and free the cached next connection object during this window. When the iterator resumes, it dereferences freed slab memory—a classic use-after-free. If the slab slot is reused before the dereference, the callback operates on attacker-influenced data. The vulnerability is reachable via the net conn shell command and net_tcp_close_all_for_iface() (invoked on interface-down events), with the freeing triggered by ordinary TCP traffic or connection termination.
Business impact
This vulnerability primarily affects Zephyr-based IoT and embedded devices in network-connected deployments. The denial of service impact can cause critical infrastructure, industrial controllers, medical devices, or consumer IoT products to crash unexpectedly. Information disclosure, if triggered, could expose session state or internal kernel memory. For organizations deploying Zephyr in safety-critical or high-availability environments, unplanned system crashes introduce operational risk and potential compliance violations. The local network access requirement narrows the attack surface to insider threats, compromised adjacent devices, or environments where untrusted nodes can join the network segment.
Affected systems
Zephyr releases up to and including v4.4.0 are affected. The defect was introduced with the modern TCP2 stack implementation in 2020. Any device or application running Zephyr with the native TCP stack enabled and exposed to local network traffic is potentially vulnerable. This includes IoT gateways, edge controllers, wireless mesh nodes, and embedded systems that rely on Zephyr's networking stack. Version v4.4.1 and later contain the fix; versions prior to 2020 (before TCP2) are not affected due to use of a different stack implementation.
Exploitability
Exploitation requires local network access (AV:A) and limited privileges (PR:L), making this a moderate-complexity attack. The attacker must induce concurrent TCP events—typically by initiating or terminating connections while triggering net_tcp_foreach() via the shell command or by downing an interface. The race condition is timing-dependent (AC:H) and not trivial to trigger reliably. However, the attack does not require user interaction (UI:N), and once triggered, the outcome is deterministic: either a crash or memory access on attacker-controlled data. The vulnerability does not yet appear on CISA's KEV catalog, indicating limited evidence of active exploitation in the wild.
Remediation
Upgrade Zephyr to v4.4.1 or later, which includes the fix that moves tcp_conn_release() teardown logic inside the tcp_lock critical section and maintains the lock across callbacks in net_tcp_foreach(). Organizations unable to upgrade immediately should implement network segmentation to restrict local network access to trusted devices only, disable the net conn shell command in production builds, and monitor for unexpected TCP stack crashes or anomalous memory access patterns. Consider running Zephyr applications with minimal privileges and applying static analysis tools to identify other potential race conditions in the codebase.
Patch guidance
Apply Zephyr v4.4.1 or later. Verify the fix by confirming that tcp_lock is held throughout net_tcp_foreach() and that tcp_conn_release() no longer frees connection state outside the critical section. Organizations managing custom Zephyr builds should cherry-pick the fix commit from the upstream repository if immediate version upgrade is not feasible. Test the patched build against your specific TCP workload (connection churn, interface transitions, shell commands) to ensure stability. After patching, monitor system logs for TCP-related faults or unexpected resets to confirm the race condition is resolved.
Detection guidance
Monitor for kernel crashes, panics, or unexpected TCP stack faults, particularly those involving memory access violations or heap corruption. Enable kernel memory protections (CONFIG_HEAP_MEM_POOL_SIZE, CONFIG_DEBUG_MEMORY_HEAP) in development to catch use-after-free earlier. Use Zephyr's network shell (net conn list) in a loop while simultaneously inducing connection state changes—if the system crashes or behaves erratically under this load, the vulnerability may be present. ASAN (Address Sanitizer) or similar runtime analysis tools, if available in your Zephyr build, will flag use-after-free. Baseline your system's stability with known-good builds, then compare behavior after patching to confirm mitigation.
Why prioritize this
Although CVSS score is moderate (4.8), this vulnerability warrants prompt attention because it affects embedded and IoT devices where denial of service and information disclosure are high-impact. The root cause—a classic race condition in core network infrastructure—indicates potential for similar bugs elsewhere in the stack. The local-only requirement reduces the threat vector in most IoT deployments, but in shared network environments (mesh networks, edge gateways, industrial controllers) the risk is elevated. Prioritize patches for customer-facing or safety-critical deployments first; defer for isolated or air-gapped systems if internal resources are constrained.
Risk score, explained
The CVSS v3.1 score of 4.8 (MEDIUM) reflects: limited attack vector (adjacent network only, AV:A), modest complexity to exploit (AC:H, race condition timing), and requirement for user privileges (PR:L). However, the impact is significant—high availability loss via crash (A:H)—balanced by no confidentiality or integrity impact in most scenarios. The use-after-free could theoretically enable information disclosure or further fault if memory is reused, which the CVSS vector does not fully capture. In practice, the score appropriately reflects a moderate risk that demands patching but is not an emergency in low-risk network environments.
Frequently asked questions
Can this vulnerability be exploited remotely over the internet?
No. The attack requires adjacent network access (AV:A in CVSS terms), meaning the attacker must be on the same local network segment as the Zephyr device. Remote exploitation over the Internet is not possible with this vulnerability alone.
What Zephyr versions are safe from this issue?
Zephyr v4.4.1 and later include the fix. Versions v4.4.0 and earlier with the TCP2 stack (introduced in 2020) are vulnerable. If you are running a release before 2020, verify which TCP stack implementation you have enabled; consult your Zephyr version documentation.
Does this vulnerability allow remote code execution?
No. The vulnerability causes denial of service (crash) or potential information disclosure (if freed memory is reused). Remote code execution is not a known outcome of this race condition, though it is theoretically possible if memory layout and timing align in ways not yet documented. Focus on availability and confidentiality mitigation.
How can I tell if my device has been affected by this vulnerability?
Affected devices will show TCP stack crashes, kernel panics, or unexplained system resets, especially during periods of active connection churn or after network interface transitions. Enable verbose kernel logging and correlate crashes with TCP operations. After applying the patch, crashes should cease. If you cannot upgrade immediately, contact Zephyr support or your device manufacturer for guidance.
This analysis is based on the CVE-2026-10634 official description and CVSS assessment as of the publication date. No exploit code or weaponized proof-of-concept is provided. Actual impact and exploitability may vary based on device configuration, network topology, and deployment context. Organizations should verify patch applicability against their specific Zephyr build, conduct internal testing before production deployment, and consult Zephyr project advisories and their device manufacturer's documentation for authoritative guidance. SEC.co makes no warranty regarding the completeness or accuracy of remediation steps and recommends engaging a security specialist for critical or high-availability systems. Source: NVD (public-domain), retrieved 2026-07-23. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10635MEDIUMXtensa Memory Domain Use-After-Free in Zephyr RTOS
- CVE-2026-10637MEDIUMZephyr IPv6 MLD Use-After-Free Denial of Service
- CVE-2026-10638MEDIUMZephyr ICMPv6 Use-After-Free Denial of Service
- CVE-2026-10639MEDIUMZephyr IPv4 Use-After-Free in ICMP Echo Reply Statistics
- CVE-2026-10640MEDIUMZephyr IPv6 Neighbor Discovery Use-After-Free Vulnerability
- CVE-2026-10636LOWUse-After-Free in Zephyr IPv4 IGMP Implementation
- CVE-2025-55644MEDIUMHeap Use-After-Free in GPAC MP4Box v2.4 DoS Vulnerability
- CVE-2025-55650MEDIUMHeap Use-After-Free in GPAC MP4Box v2.4 DoS Vulnerability