# CVE-2026-82962: Out-of-bounds write in Zephyr Ethernet L2 when adding the link-layer header to a forwarded packet


- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Fix available:** No
- **Published:** 28 Oct 2026
- **Updated:** 28 Oct 2026
- **Also known as:** GHSA-56gp-jq94-c9hh

## What is CVE-2026-82962?

CVE-2026-82962 is a medium-severity vulnerability in zephyrproject zephyr, published on 28 Oct 2026. 

### Official 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.

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.

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2026-82962?


## How do I fix CVE-2026-82962?

No fix has been published for CVE-2026-82962 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-82962 being exploited?

There is no known exploitation of CVE-2026-82962 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-82962 and fix it if it is affected.

What it is: CVE-2026-82962 is a medium-severity vulnerability in zephyrproject zephyr, published on 28 Oct 2026. 
Exploitation: There is no known exploitation of CVE-2026-82962 in the wild and no public exploit code.

Affected product: zephyrproject zephyr. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-82962/ (Markdown: https://insights.sbomify.com/CVE-2026-82962/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-82962
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-82962
- OSV: https://osv.dev/vulnerability/CVE-2026-82962

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-82962/
Summaries are generated and may contain mistakes; the official description above is the record.
