CVE-2026-10638: Use-after-free in Zephyr ICMPv6 RX path when updating statistics after sending an echo reply or error

Published Jun 16, 2026
·
Updated

subsys/net/ip/icmpv6.c reads the network interface from a netpkt after that packet has been handed to nettrysenddata(). In icmpv6handleechorequest() and neticmpv6senderror(), the post-send statistics update calls netpktiface(reply)/netpktiface(pkt) on the just-sent packet.

The send path (nettrysenddata -> netiftx) unreferences and may free the packet back to its memory slab before returning — synchronously in the RX thread when no TX queue is configured (CONFIGNETTCTXCOUNT == 0), and asynchronously the driver/L2 may already have freed it otherwise. netpktiface() therefore dereferences a freed (and possibly reused) netpkt; with CONFIGNETSTATISTICSPERINTERFACE 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 netcore.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 CONFIGNETNATIVEIPV6, 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.

Affected Software

2 affected components
Zephyr Zephyr networking>=4.2.0<=4.4.0
zephyrproject zephyr>=4.2.0<4.5.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade zephyr/subsys/net/ip/icmpv6.c to a version that resolves this vulnerability.

    Patch 86e21665d46
  2. Configuration

    Apply the fix in the ICMPv6 RX path used by Zephyr when CONFIG_NET_NATIVE_IPV6 is enabled; specifically ensure iface is cached before sending and used for statistics updates rather than calling net_pkt_iface() on the just-sent/released packet.

    Zephyr networking (CONFIG_NET_NATIVE_IPV6) CONFIG_NET_NATIVE_IPV6 = enable

Event History

Jun 16, 2026
CVE Published
via MITRE·01:16 PM
Data Sourced
via MITRE·01:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-10638?

The severity of CVE-2026-10638 is rated medium with a score of 5.9.

2

What are the risks associated with CVE-2026-10638?

CVE-2026-10638 poses a risk of use-after-free vulnerabilities in the Zephyr networking stack, potentially leading to denial of service.

3

How do I fix CVE-2026-10638?

To fix CVE-2026-10638, update to the latest version of the Zephyr software where the vulnerability has been patched.

4

Which software is affected by CVE-2026-10638?

CVE-2026-10638 affects the Zephyr networking components, particularly within the ICMPv6 handling code.

5

What is the cause of CVE-2026-10638?

CVE-2026-10638 is caused by the mishandling of a network packet after it has been sent, which leads to reading freed memory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203