CVE-2026-95826 in Zephyr
Summary
by MITRE • 11/20/2026
The SMSC911x/LAN9220 Ethernet driver stages every outgoing frame in a fixed-size static buffer before pushing it to the controller FIFO. eth_tx() in drivers/ethernet/eth_smsc911x.c took the frame length from net_pkt_get_len(pkt) and passed it directly to net_pkt_read(pkt, tx_buf, total_len), with no comparison against the size of tx_buf (NET_ETH_MAX_FRAME_SIZE). net_pkt_read() takes no destination size and only fails when the packet is shorter than the requested length, so any packet longer than the staging buffer was copied past its end.
Nothing between the IP layer and the driver bounds the frame to what the link can carry: ethernet_send() in subsys/net/l2/ethernet/ethernet.c performs no length check, and the IPv6 output path only compares the packet against the interface MTU when CONFIG_NET_IPV6_FRAGMENT is enabled (it is disabled by default). The size the stack will build is therefore governed by the interface MTU, and that MTU is remotely settable: handle_ra_input() in subsys/net/ip/ipv6_nbr.c honours the MTU option of any Router Advertisement with a value up to 0xffff, gated only by the standard hop-limit-255 and link-local-source checks. An unauthenticated attacker on the same link can raise the MTU and then have the device emit a single frame of several kilobytes, for example as a TCP segment from any service that returns more than ~1.5 KB or as an oversized UDP datagram.
The result is an out-of-bounds write into .bss immediately after tx_buf, with the overrun length and much of its content derived from the transmitted frame. Consequences range from corruption of adjacent kernel data and a crash to potential control-flow influence where the clobbered globals hold pointers; the practical overrun size is bounded by the network buffer pool rather than by the advertised MTU. The fix rejects frames larger than NET_ETH_MAX_FRAME_SIZE with -EMSGSIZE before any TX_DATA_PORT write, so the controller FIFO is also not left holding a command word without its payload.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/20/2026
The vulnerability in question resides within the SMSC911x and LAN9220 Ethernet driver implementation for Zephyr RTOS, specifically affecting the transmission path where outgoing network frames are processed before being handed off to the hardware controller. The core technical flaw is a classic buffer overflow caused by insufficient bounds checking during data staging. When the eth_tx function prepares an outbound packet, it utilizes a fixed-size static buffer defined as NET_ETH_MAX_FRAME_SIZE to stage the frame content prior to writing it into the device's FIFO via TX_DATA_PORT operations. However, the code retrieves the length of the incoming network packet using net_pkt_get_len and passes this value directly to net_pkt_read without verifying that the requested read size does not exceed the capacity of the staging buffer. Since the net_pkt_read function lacks a destination size parameter for safety checks, it proceeds to copy data beyond the allocated memory boundary whenever the source packet exceeds the static buffer limit. This represents a fundamental failure in input validation at the driver level, where external inputs are assumed to be within safe limits without explicit verification against local resource constraints.
The operational impact of this flaw is exacerbated by how the network stack handles Maximum Transmission Unit (MTU) configuration and frame sizing upstream from the driver. There is no intermediate layer between the IP protocol handlers and the Ethernet driver that enforces a hard cap on frame sizes relative to the physical link capabilities or internal buffer limits. Specifically, while IPv6 fragmentation logic can check packet size against MTU when CONFIG_NET_IPV6_FRAGMENT is enabled, this feature is disabled by default in many configurations. Consequently, the stack relies heavily on the interface MTU setting to determine how large a single Ethernet frame should be. Crucially, this MTU value is not static or strictly controlled; it can be dynamically altered through Router Advertisement messages received from network neighbors. The handle_ra_input function processes these advertisements and accepts MTU options with values up to 0xffff, subject only to standard hop-limit checks and link-local source validation. This design allows an unauthenticated attacker positioned on the same local area network segment to manipulate the device's perception of its maximum transmission unit. By sending a crafted Router Advertisement that sets an excessively high MTU value, such as one exceeding approximately 1500 bytes or even approaching several kilobytes depending on system configuration, the attacker can induce the stack to construct outgoing frames significantly larger than what the driver’s staging buffer can accommodate.
When this manipulated frame is transmitted, for instance via a TCP response from a service returning more than roughly 1.5 KB of data or an oversized UDP datagram, the resulting out-of-bounds write occurs immediately after the tx_buf in the .bss section of kernel memory. The overrun length and content are directly derived from the maliciously sized transmitted frame. This corruption poses severe security risks ranging from immediate system instability to remote code execution potential. Corruption of adjacent kernel data structures can lead to a denial of service through a crash or panic, disrupting critical real-time operations. More critically, if the overwritten memory locations contain pointers or function addresses, an attacker may achieve control-flow hijacking, allowing for arbitrary code execution within the privileged kernel context. The practical scope of this buffer overflow is bounded by the available network buffer pool rather than just the advertised MTU, but even small overruns can compromise system integrity given the contiguous nature of .bss memory layout in embedded systems.
From a classification perspective, this vulnerability aligns with CWE-120: Buffer Copy without Checking Size of Input (Classic Buffer Overflow), as it involves copying data into a buffer without verifying that the input length fits within the allocated space. It also relates to CWE-787: Out-of-bounds Write, since memory outside the intended boundary is modified. In terms of attack vectors and tactics, this flaw facilitates exploitation via ATT&CK technique T1059: Command and Scripting Interpreter if code execution is achieved, or more broadly under initial access techniques involving network-based attacks such as T1498: Network Denial of Service when used to crash the device. The lack of input validation at multiple layers of the networking stack highlights a systemic issue in how external parameters influence internal resource allocation and data handling routines.
To mitigate this vulnerability, it is essential that drivers implement strict size verification before performing memory copy operations. In this specific case, the fix involves rejecting frames larger than NET_ETH_MAX_FRAME_SIZE by returning an -EMSGSIZE error code prior to any interaction with the TX_DATA_PORT hardware register. This prevents both the buffer overflow and ensures that the controller FIFO does not receive a command word without its corresponding payload, which could otherwise lead to undefined hardware behavior or further instability. Beyond this specific patch, broader architectural improvements are recommended for network stacks in embedded environments. Implementing mandatory MTU clamping at the IP layer regardless of fragmentation configuration settings would prevent oversized frames from reaching lower-level drivers. Additionally, introducing explicit bounds checking functions that accept both source and destination sizes can eliminate reliance on implicit assumptions about packet dimensions. Regular security audits focusing on data flow between protocol layers and hardware interfaces are crucial to identifying similar patterns where external network inputs influence internal buffer allocations without adequate validation.