{"id":"CVE-2026-82962","kind":"vulnerability","aliases":["CVE-2026-82962"],"related":[],"title":"Zephyr: Ethernet header prepend writes out of bounds on forwarded packets","description":"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.\n\nA 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.\n\nBecause 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.","summary":"When Zephyr forwards a packet from another interface onto Ethernet, ethernet_fill_header() can prepend the 14-byte Ethernet header without checking that the buffer has room for it. The header is written past the start of the buffer, corrupting neighbouring memory and possibly the heap.","severity":"medium","cvss":6.5,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["embedded","iot","ipv4-forwarding","ipv6-forwarding","openthread","runtime","zephyr"],"not_affected_if":["assert-enabled","ethernet-only","no-ip-forwarding"],"how_to_check":"- Check the Zephyr version in the project manifest or `west list zephyr`, and whether `CONFIG_NET_IPV4_FORWARDING` or `CONFIG_NET_IPV6_FORWARDING` is enabled in the build config.\n- Check whether `CONFIG_ASSERT` and `CONFIG_NET_BUF_HARDENING` are both disabled, since that is when the out-of-bounds write is not caught.","fix":"- Update Zephyr to a release that includes the ethernet_fill_header() fix (version unknown from the sources; check the NVD advisory for the patched release).\n- Until then, enable `CONFIG_ASSERT` or `CONFIG_NET_BUF_HARDENING` in the build, or disable IP forwarding between interfaces.","status":"open","published_at":"2026-10-28T17:18:43+00:00","first_seen_at":"2026-10-28T17:34:10+00:00","triaged_at":"2026-10-28T17:36:34+00:00","updated_at":"2026-10-28T17:36:34+00:00","category":"runtime","confidence":0.7,"triage":{"at":"2026-10-28T17:36:34Z","model":"claude-haiku-5-5","output":{"fix":"- Update Zephyr to a release that includes the ethernet_fill_header() fix (version unknown from the sources; check the NVD advisory for the patched release).\n- Until then, enable `CONFIG_ASSERT` or `CONFIG_NET_BUF_HARDENING` in the build, or disable IP forwarding between interfaces.","reach":"network","title":"Zephyr: Ethernet header prepend writes out of bounds on forwarded packets","impact":"medium","summary":"When Zephyr forwards a packet from another interface onto Ethernet, ethernet_fill_header() can prepend the 14-byte Ethernet header without checking that the buffer has room for it. The header is written past the start of the buffer, corrupting neighbouring memory and possibly the heap.","category":"runtime","nicknames":[],"who_cares":["zephyr","embedded","iot","openthread","ipv4-forwarding","ipv6-forwarding"],"confidence":0.7,"needs_auth":"no","worst_case":"memory corruption causing a crash or heap inconsistency on the device","analyst_note":"","how_to_check":"- Check the Zephyr version in the project manifest or `west list zephyr`, and whether `CONFIG_NET_IPV4_FORWARDING` or `CONFIG_NET_IPV6_FORWARDING` is enabled in the build config.\n- Check whether `CONFIG_ASSERT` and `CONFIG_NET_BUF_HARDENING` are both disabled, since that is when the out-of-bounds write is not caught.","needs_analyst":false,"not_affected_if":["no-ip-forwarding","ethernet-only","assert-enabled"],"who_is_affected":"Zephyr devices that forward IP traffic between interfaces, for example an 802.15.4 or OpenThread or PPP link forwarding to Wi-Fi or Ethernet, or an IPIP tunnel, with forwarding enabled. Devices that only send and receive on Ethernet without forwarding or tunnelling are not reached by the forwarding path described in the sources.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000781,"input_tokens":4073,"output_tokens":748,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,16A '-82962':14A,17A '/ethernet':255C '/openthread':246C '14':45B,345C '18':347C '802.15.4':245C 'actual':136C 'adjac':294C 'alloc':101C,153C,159C,164C,168C,189C,283C 'anoth':35B,229C 'array':379C 'assert':313C,322C 'attack':295C,397C 'back':448C 'block':342C 'bound':8A,317C,355C 'buf':144C,309C,329C,438C 'buffer':53B,67B,147C,160C,362C,371C,388C,441C 'build':120C,319C 'build-tim':119C 'byte':46B,346C,402C 'call':142C 'carri':269C 'check':50B,132C 'chunk':394C 'clone':267C 'code':425C 'condit':298C 'config':124C,232C,236C,321C,327C 'configur':290C 'control':398C,424C 'corrupt':68B,412C,418C 'count':390C 'crash':416C 'cve':12A,15A 'data':334C,341C 'default':358C 'devic':305C 'differ':192C 'embed':18B 'enabl':241C 'enough':444C 'ethernet':2A,38B,39B,47B,75C,83C,127C,151C,166C,183C,198C,351C 'exampl':243C 'execut':426C 'fall':447C 'fi':254C 'fill':40B,76C 'first':97C 'fix':108C,360C,428C 'fixed-s':359C 'forward':10A,22B,25B,31B,235C,239C,250C,260C,262C,306C 'fragment':98C,105C,333C,453C 'hand':196C 'harden':330C 'hdr':148C 'header':3A,41B,48B,59B,77C,84C,104C,129C,282C,352C,395C,452C 'headroom':92C,139C,207C,316C,439C 'heap':74B,393C,420C 'hook':165C 'impact':409C 'in-plac':110C,431C 'inconsist':421C 'instead':99C 'interfac':36B,180C,184C,230C,249C,276C,287C 'invok':161C 'iot':19B 'ip':281C 'ipip':274C 'ipv4':21B,234C 'ipv4-forwarding':20B 'ipv6':24B,238C,258C 'ipv6-forwarding':23B 'l2':126C,163C,167C,193C 'larg':443C 'lead':413C 'len':149C 'littl':204C 'mcast':259C 'memori':70B,375C,411C 'move':331C 'neighbour':69B,370C 'neither':399C 'net':125C,143C,157C,218C,233C,237C,256C,308C,328C,437C 'newer':326C 'offset':405C 'onto':37B 'openthread':26B 'ordinari':213C 'otherwis':446C 'outer':280C 'overwrit':365C,386C 'packet':11A,33B,95C,135C,178C,186C,209C,220C,227C,261C,417C 'past':62B 'path':113C,217C,434C 'payload':373C 'pkt':146C,158C,172C,440C 'place':86C,112C,433C 'pointer':335C 'pool':363C,378C,384C 'possibl':72B 'ppp':248C 'practic':408C 'preced':376C 'prepend':4A,43B,81C,278C 'produc':211C 'pure':116C 'push':88C,145C,311C 'rather':422C 're':223C 're-target':222C 'receiv':226C 'refer':389C 'remot':292C 'reserv':128C,154C,271C 'room':55B 'rout':214C,219C,257C 'runtim':27B 'rx':265C 'rx-slab':264C 'select':115C 'send':277C,301C 'separ':103C,451C 'simpl':310C 'simpli':299C 'size':361C,383C 'slab':266C 'space':156C 'start':64B,338C 'subsys/net/l2/ethernet/ethernet.c':79C 'tail':367C 'take':429C 'target':224C 'therefor':201C 'time':121C 'traffic':302C 'transmiss':200C 'trigger':296C 'true':175C 'tunnel':216C,275C 'tx':152C,173C 'usual':205C 'valu':122C 'variabl':382C 'variable-s':381C 'virtual':286C 'vlan':349C 'wi':253C 'wi-fi':252C 'without':49B,320C,324C 'write':5A,344C 'written':61B,401C 'zephyr':1A,28B,30B 'zero':206C","nicknames":[],"mitigations":[],"who_affected":"Zephyr devices that forward IP traffic between interfaces, for example an 802.15.4 or OpenThread or PPP link forwarding to Wi-Fi or Ethernet, or an IPIP tunnel, with forwarding enabled. Devices that only send and receive on Ethernet without forwarding or tunnelling are not reached by the forwarding path described in the sources.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-28T17:18:43+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H","cvss_by":"vulnerabilities@zephyrproject.org","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-82962","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-82962","severity":null,"published_at":"2026-10-28T17:18:43+00:00","modified_at":"2026-10-28T17:18:43+00:00","first_seen_at":"2026-10-28T17:34:10+00:00","fetched_at":"2026-10-28T17:34:10+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}