CVE-2026-10639: Use-after-free reading `net_pkt_iface()` of a sent ICMPv4 echo-reply packet in `icmpv4_handle_echo_request()`
In Zephyr's native IPv4 stack, icmpv4handleechorequest() in subsys/net/ip/icmpv4.c builds an echo-reply packet (reply), hands it to nettrysenddata(), and then, on success, calls netstatsupdateicmpsent(netpktiface(reply)). nettrysenddata() transfers ownership of reply to the TX path (netiftryqueuetx -> netiftx -> L2/driver send, or the asynchronous netiftxthread), which can unref it to refcount 0 and return the struct netpkt to its slab (netpktunref -> kmemslabfree) before the stats line runs. netcore.c documents this exact contract ('the pkt might contain garbage already ... do not use pkt after that call').
The post-send netpktiface(reply) therefore reads reply->iface out of a freed (and possibly already reallocated) netpkt, a use-after-free read; with CONFIGNETSTATISTICSPERINTERFACE the stats macro additionally increments a counter through that value, i.e. a dereference/write through a stale or recycled-slot pointer.
The path is reached unauthenticated by any remote host that pings the device (neticmpv4input -> neticmpcallipv4handlers -> icmpv4handleechorequest) and is gated on CONFIGNETSTATISTICSICMP. Impact is a probabilistic read of recycled packet memory plus a possible wild-pointer write under a timing race, leading most likely to corrupted interface statistics or a remotely triggerable crash (DoS).
The defect was introduced in 2019 (v1.14) and is present through v4.4.0. The companion change in neticmpv4senderror() is not a use-after-free because it reads netpktiface(orig), the caller-owned received packet, which stays alive across the send. The fix caches the interface pointer from the live received packet before sending and uses it for the post-send stats updates.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Zephyr native IPv4 stack (icmpv4)to a version that resolves this vulnerability.Fixed in v4.4.0 - Configuration
Disable ICMP statistics to prevent the unauthenticated remote ping path from reaching the post-send stats update in icmpv4_handle_echo_request(). (The vulnerable post-send net_stats_update_icmp_sent(...) is gated on CONFIG_NET_STATISTICS_ICMP.)
Zephyr CONFIG_NET_STATISTICS_ICMP = disabled - Compensating control
Restrict unauthenticated ICMP echo traffic to reduce exposure to the unauthenticated ping path (net_icmpv4_input -> net_icmp_call_ipv4_handlers -> icmpv4_handle_echo_request).
- Operational
After upgrading to the fixed Zephyr version, perform a restart/reinitialization of affected network interfaces/services so any potentially corrupted interface statistics from prior triggered crashes/DoS conditions are cleared.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-10639?
The severity of CVE-2026-10639 is classified as medium with a score of 4.8.
What specific vulnerability does CVE-2026-10639 describe?
CVE-2026-10639 describes a use-after-free vulnerability in the handling of ICMPv4 echo-reply packets in the Zephyr native IPv4 stack.
How does CVE-2026-10639 impact the Zephyr Project?
CVE-2026-10639 may allow an attacker to exploit the use-after-free issue, potentially leading to memory corruption or denial of service.
What systems are affected by CVE-2026-10639?
CVE-2026-10639 affects the Zephyr Project's IPv4 stack implementation.
How can CVE-2026-10639 be mitigated?
To mitigate CVE-2026-10639, it is recommended to update Zephyr to the latest version that addresses this vulnerability.