MEDIUM 5.9

CVE-2026-10638: Zephyr ICMPv6 Use-After-Free Denial of Service

A use-after-free vulnerability exists in Zephyr's ICMPv6 network stack. When the kernel sends an ICMPv6 response (such as a reply to a ping or an error message), it tries to update statistics using a packet pointer after that packet has already been freed and returned to memory. An attacker on the network can trigger this by sending a simple ICMPv6 Echo Request or crafting packets that cause IPv6 errors, causing the device to crash or potentially corrupt memory. The flaw affects Zephyr versions roughly 4.2.0 through 4.4.0 when IPv6 networking is enabled.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.9 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-416
Affected products
1 configuration(s)
Published / Modified
2026-06-16 / 2026-07-17

NVD description (verbatim)

subsys/net/ip/icmpv6.c reads the network interface from a net_pkt after that packet has been handed to net_try_send_data(). In icmpv6_handle_echo_request() and net_icmpv6_send_error(), the post-send statistics update calls net_pkt_iface(reply)/net_pkt_iface(pkt) on the just-sent packet. The send path (net_try_send_data -> net_if_tx) unreferences and may free the packet back to its memory slab before returning — synchronously in the RX thread when no TX queue is configured (CONFIG_NET_TC_TX_COUNT == 0), and asynchronously the driver/L2 may already have freed it otherwise. net_pkt_iface() therefore dereferences a freed (and possibly reused) net_pkt; with CONFIG_NET_STATISTICS_PER_INTERFACE the stale iface pointer is further dereferenced and written through (iface->stats.icmp.sent++), turning the use-after-free read into a write through an attacker-influenceable pointer. The core stack already documents this hazard in net_core.c ("do not use pkt after that call") and caches iface before sending; the ICMPv6 callers did not. An unauthenticated remote attacker triggers the flaw simply by sending an ICMPv6 Echo Request (ping) or an IPv6 packet that elicits an ICMPv6 error (unknown next header, fragment reassembly timeout, destination unreachable), leading to denial of service via crash and potential memory corruption. Affected: Zephyr networking with CONFIG_NET_NATIVE_IPV6, roughly v4.2.0 through v4.4.0. The fix caches the interface pointer before sending and uses it for all statistics updates; the sibling commit 86e21665d46 fixes the identical bug in ICMPv4.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability resides in subsys/net/ip/icmpv6.c, where icmpv6_handle_echo_request() and net_icmpv6_send_error() call net_pkt_iface() on outbound packets after those packets have been passed to net_try_send_data(). The send path (net_try_send_data → net_if_tx) unreferences and may synchronously free the packet (when CONFIG_NET_TC_TX_COUNT == 0) or permit asynchronous freeing by the driver/L2 layer. This creates a use-after-free read on net_pkt_iface(). When CONFIG_NET_STATISTICS_PER_INTERFACE is enabled, the stale interface pointer is dereferenced and written to (iface->stats.icmp.sent++), escalating the vulnerability to a controlled write through an attacker-influenced pointer. The core stack (net_core.c) already documents this hazard and caches the interface pointer before sending; the ICMPv6 callers did not follow this pattern. A parallel vulnerability exists in ICMPv4 (addressed by commit 86e21665d46).

Business impact

Embedded and IoT systems running Zephyr with IPv6 enabled are vulnerable to remote denial of service. An unauthenticated attacker can crash the device or potentially corrupt kernel memory without any authentication, network credentials, or local access. For deployments in safety-critical or production environments (industrial control, medical devices, edge gateways), this creates both availability and integrity risks. The attack surface is large: any exposed IPv6 interface accepts ICMPv6 packets by default. Recovery requires device restart, incurring downtime proportional to the device's role in the system.

Affected systems

Zephyr project versions approximately 4.2.0 through 4.4.0 with CONFIG_NET_NATIVE_IPV6 enabled and an exposed IPv6 network interface. Systems with CONFIG_NET_STATISTICS_PER_INTERFACE enabled face elevated risk (potential memory corruption write), while those without it experience use-after-free reads (memory disclosure, instability, crash). Verify your Zephyr version and build configuration (menuconfig or prj.conf) for both IPv6 and statistics settings.

Exploitability

Exploitability is straightforward: no authentication, privilege escalation, or user interaction required. An unauthenticated remote attacker sends ordinary ICMPv6 packets (ping/Echo Request, or packets triggering IPv6 error responses such as unknown next header or destination unreachable) over an IPv6-enabled network. The vulnerability is triggered synchronously when no TX queue is configured and may be asynchronous otherwise. The barrier to exploitation is low—standard networking tools can craft the necessary packets. However, the actual impact depends on the device's role and whether memory corruption can be reliably weaponized; denial of service via crash is the primary practical outcome.

Remediation

Patch to a Zephyr version containing the fix (verify against the official Zephyr advisory for exact version numbers). The fix caches the interface pointer before sending the packet and uses the cached value for all subsequent statistics updates. Interim mitigations include disabling IPv6 if not required (CONFIG_NET_NATIVE_IPV6=n), disabling statistics per interface (CONFIG_NET_STATISTICS_PER_INTERFACE=n), or restricting IPv6 traffic at the network boundary. However, patching is the only complete solution.

Patch guidance

Consult the official Zephyr project security advisory and commit history for the exact patched version. The fix is described as caching the interface pointer before sending and using it for all statistics updates. Apply patches to development boards and production devices in a staged manner, testing IPv6 and ICMPv6 functionality after upgrade to confirm no regressions. Verify your build configuration includes the patches and that CONFIG_NET_NATIVE_IPV6 is still required for your use case.

Detection guidance

Monitor for unexpected kernel crashes or panics on Zephyr devices receiving IPv6 traffic, particularly spikes in ICMPv6 traffic (Echo Requests, time-exceeded, or destination-unreachable messages). Memory corruption signatures (heap corruption warnings, stack overflow messages, or unaligned pointer dereferences in network code) may appear in device logs. Network-side detection is limited without deep packet inspection; consider blocking unexpected ICMPv6 traffic at network ingress if the application does not require it. If possible, enable kernel debugging and memory poisoning (KASAN) on a test device to catch the flaw in development.

Why prioritize this

Although assigned CVSS 5.9 (Medium), this vulnerability merits higher prioritization for embedded and IoT deployments. The attack surface is large (any IPv6 interface), the barrier to exploitation is trivial (no credentials, standard packets), and the impact is immediate (denial of service). For safety-critical or production systems, memory corruption risk (when CONFIG_NET_STATISTICS_PER_INTERFACE is enabled) elevates concern. Zephyr's typical deployment in long-lived embedded devices means patching delays compound risk. Organizations with Zephyr-based systems exposed to untrusted networks should prioritize rapidly.

Risk score, explained

CVSS 5.9 reflects a remotely triggered, unauthenticated denial-of-service vulnerability with no attack complexity requirements beyond packet crafting (AC:H reflects only the synchronicity conditions). The score reflects the flaw's severity (crash via use-after-free) while stopping short of critical due to the lack of confidentiality impact in the base case and the controlled write's dependency on specific configuration (CONFIG_NET_STATISTICS_PER_INTERFACE). However, risk is context-dependent: highly networked or safety-critical deployments should treat this as high priority; isolated or IoT devices may tolerate slightly longer patch cycles if other controls exist.

Frequently asked questions

Do I need to disable IPv6 entirely to be safe?

Disabling IPv6 (CONFIG_NET_NATIVE_IPV6=n) eliminates the vulnerability but may break applications that rely on IPv6. Similarly, disabling per-interface statistics (CONFIG_NET_STATISTICS_PER_INTERFACE=n) reduces the write-based memory corruption risk. However, patching to a fixed Zephyr version is the correct solution. Interim mitigations should be temporary only.

What if my device is on an isolated network without Internet access?

Isolation reduces but does not eliminate risk. An attacker with access to the local network segment (insider threat, compromised peer device, or rogue access point) can still send ICMPv6 packets to trigger the vulnerability. IPv6 Link-Local addresses are auto-configured and reachable without upstream routing. Patching is still recommended for defense in depth.

How do I check if I am affected?

Check your Zephyr version (zephyr/VERSION file or 'west --version'). If you are on v4.2.0 through v4.4.0 and CONFIG_NET_NATIVE_IPV6 is enabled in your build (visible in the .config or prj.conf file), you are affected. Review the official Zephyr security advisory to confirm the exact fixed version for your release branch.

Can this be exploited from outside my organization?

Yes, if the device has an Internet-routable IPv6 address or is reachable via an IPv6 tunnel. An attacker on any IPv6 network path can craft ICMPv6 packets to the device. Even Link-Local-only devices are vulnerable if an attacker has network access to the subnet. Firewalling or restricting ICMPv6 can help, but patching is the proper fix.

This analysis is provided for informational purposes and reflects publicly available information as of the publication date. The vulnerability details, affected versions, and remediation guidance are based on official Zephyr project advisories and CVE data. Organizations should verify patch availability and compatibility with their specific Zephyr builds, board support packages, and applications. Memory corruption and denial-of-service risks are context-dependent and may vary by device architecture, configuration, and network exposure. This analysis does not constitute legal or compliance advice. Consult your vendor and security team before applying patches in production environments. SEC.co assumes no liability for decisions made based on this analysis. Source: NVD (public-domain), retrieved 2026-07-23. Analysis generated by SEC.co (claude-haiku-4-5).