CVE-2026-82962 in Zephyrinfo

Summary

by MITRE • 10/28/2026

ethernet_fill_header() in subsys/net/l2/ethernet/ethernet.c can prepend the Ethernet header in place, by pushing it into the headroom of the packet's first fragment, instead of allocating a separate header fragment. Before this fix the in-place path was selected purely from the build-time value of CONFIG_NET_L2_ETHERNET_RESERVE_HEADER, with no check that the packet actually has that headroom, and then called net_buf_push(pkt->buffer, hdr_len). Only Ethernet TX allocations reserve that space: net_pkt_alloc_buffer() invokes the L2 alloc hook (ethernet_l2_alloc()) only when is_pkt_tx() is true and the packet's interface is the Ethernet interface.

A packet that was allocated by a different L2 and then handed to Ethernet for transmission therefore has too little (usually zero) headroom. Such packets are produced by ordinary routing and tunnelling paths: net_route_packet_if() re-targets a received packet to another interface when CONFIG_NET_IPV4_FORWARDING / CONFIG_NET_IPV6_FORWARDING are enabled (for example an 802.15.4/OpenThread or PPP interface forwarding to Wi-Fi/Ethernet), net_route_ipv6_mcast_forward_packet() forwards an RX-slab clone that carries no reserve, and the IPIP tunnel interface_send() prepends an outer IP header allocated on the virtual interface. In these configurations a remote or adjacent attacker triggers the condition simply by sending traffic that the device forwards.

Because net_buf_simple_push() only asserts on the headroom bound, a build without CONFIG_ASSERT (and without the newer CONFIG_NET_BUF_HARDENING) moves the fragment data pointer below the start of its data block and writes 14 bytes — 18 with VLAN — of Ethernet header out of bounds. With the default fixed-size buffer pools this overwrites the tail of the neighbouring buffer's payload or memory preceding the pool array; with variable-size pools it overwrites the buffer reference count and the heap chunk header. The attacker controls neither the written bytes nor the offset, so the practical impact is memory corruption leading to a crash, packet corruption, or heap inconsistency rather than controlled code execution. The fix takes the in-place path only when net_buf_headroom(pkt->buffer) is large enough and otherwise falls back to a separate header fragment.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 10/28/2026

The vulnerability resides within the ethernet_fill_header function located in the Zephyr RTOS networking subsystem, specifically at subsys/net/l2/ethernet/ethernet.c. This component is responsible for prepending Ethernet headers to network packets prior to transmission. The core technical flaw stems from an incorrect assumption regarding buffer headroom availability during packet processing. Prior to the fix, the decision to prepend the header in place was determined solely by a build-time configuration flag, CONFIG_NET_L2_ETHERNET_RESERVE_HEADER, without any runtime verification that the specific network buffer actually possessed sufficient reserved space at its beginning. The function would unconditionally invoke net_buf_push on the packet's first fragment, assuming adequate headroom existed based on static compilation settings rather than dynamic memory state.

This design oversight creates a critical mismatch in scenarios where packets are routed or tunneled across different Layer 2 interfaces. Standard Ethernet transmission paths typically reserve header space through specific allocation hooks like ethernet_l2_alloc, which is triggered only when the packet interface is explicitly identified as Ethernet via net_pkt_alloc_buffer and is_pkt checks. However, routing operations such as those handled by net_route_packet_if or multicast forwarding functions often re-target received packets from other interfaces, such as 802.15.4/OpenThread or PPP links, to be transmitted over Ethernet. Similarly, tunneling mechanisms like IPIP prepend outer headers using allocations tied to the virtual interface rather than reserving space for an additional Ethernet header. In these cases, the incoming packet buffer typically has zero headroom because it was allocated by a different Layer 2 driver that did not anticipate subsequent Ethernet encapsulation.

When such under-reserved packets are processed by the vulnerable ethernet_fill_header function on builds lacking assertion checks or hardening configurations like CONFIG_NET_BUF_HARDENING, the net_buf_simple_push operation causes an out-of-bounds write. The function moves the fragment data pointer backward below the start of its allocated memory block and writes fourteen bytes for a standard Ethernet header, or eighteen bytes if VLAN tagging is enabled. This action results in severe memory corruption because it overwrites adjacent buffer payloads, preceding pool array structures, heap chunk headers, or reference counts depending on whether fixed-size or variable-size buffer pools are utilized. The vulnerability aligns with CWE-787 Out-of-bounds Write and falls under the ATT&CK technique of T1496 Resource Hijacking due to its potential for denial of service through system crashes.

The operational impact is primarily characterized by memory corruption leading to system instability rather than direct code execution, as the attacker does not control the specific bytes written or the exact offset of the overwrite. Consequently, an adjacent or remote attacker can trigger this condition simply by sending traffic that the device forwards across interfaces. The resulting consequences include random crashes due to heap inconsistency, packet data corruption affecting network integrity, and potential denial of service conditions where the system becomes unresponsive. Mitigation requires ensuring that the in-place header prepending path is only executed when net_buf_headroom confirms sufficient space exists; otherwise, the system must fall back to allocating a separate fragment for the header. Users should apply the provided patch which adds runtime headroom checks and consider enabling CONFIG_NET_BUF_HARDENING or CONFIG_ASSERT during development to detect such buffer violations early in the software lifecycle.

Responsible

Zephyr

Reservation

08/31/2026

Disclosure

10/28/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!