CVE-2026-10634: use-after-free in zephyrproject zephyr
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.
AI Analysis
Technical Summary
The vulnerability exists in Zephyr's native TCP stack where net_tcp_foreach() uses the SYS_SLIST_FOR_EACH_CONTAINER_SAFE macro to iterate over connections, caching a pointer to the next node. The function releases tcp_lock during the callback, permitting a concurrent tcp_conn_release() to free the cached next connection's memory. When the iterator advances, it dereferences freed memory, causing a use-after-free condition. This can lead to system crashes or, if the freed memory is reallocated, potential information disclosure or further faults. The fix involves moving connection teardown inside the tcp_lock critical section and holding tcp_lock across the callback. The flaw affects releases up to and including version 4.4.0 and was introduced with the TCP2 stack in 2020.
Potential Impact
The use-after-free vulnerability can cause a denial of service via system crashes when the freed memory is accessed. Additionally, if the freed memory is reallocated and controlled by an attacker, it may lead to information disclosure or further faults. The vulnerability is triggered by normal TCP traffic or network shell commands that invoke net_tcp_foreach().
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The described fix involves changes to locking in the TCP stack to prevent use-after-free conditions. Until an official fix is released, avoid triggering the net_tcp_foreach() function concurrently with connection teardown if possible.
CVE-2026-10634: use-after-free in zephyrproject zephyr
Description
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.
CVSS v3.1
Score 4.8medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in Zephyr's native TCP stack where net_tcp_foreach() uses the SYS_SLIST_FOR_EACH_CONTAINER_SAFE macro to iterate over connections, caching a pointer to the next node. The function releases tcp_lock during the callback, permitting a concurrent tcp_conn_release() to free the cached next connection's memory. When the iterator advances, it dereferences freed memory, causing a use-after-free condition. This can lead to system crashes or, if the freed memory is reallocated, potential information disclosure or further faults. The fix involves moving connection teardown inside the tcp_lock critical section and holding tcp_lock across the callback. The flaw affects releases up to and including version 4.4.0 and was introduced with the TCP2 stack in 2020.
Potential Impact
The use-after-free vulnerability can cause a denial of service via system crashes when the freed memory is accessed. Additionally, if the freed memory is reallocated and controlled by an attacker, it may lead to information disclosure or further faults. The vulnerability is triggered by normal TCP traffic or network shell commands that invoke net_tcp_foreach().
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The described fix involves changes to locking in the TCP stack to prevent use-after-free conditions. Until an official fix is released, avoid triggering the net_tcp_foreach() function concurrently with connection teardown if possible.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- zephyr
- Date Reserved
- 2026-06-02T15:10:50.607Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3021a40b89be688846b9b4
Added to database: 06/15/2026, 16:00:36 UTC
Last enriched: 07/15/2026, 10:44:42 UTC
Last updated: 07/31/2026, 19:22:57 UTC
Views: 65
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.