Zephyr use-after-free in IP fragment reassembly
- Exploited
- No known exploitation
- Fix
- Fixed in 4.3.2, 4.5.0
- Who is exposed
- Not reported
Summary
Zephyr's IPv4, IPv6 and 6LoWPAN fragment reassembly code has a race condition that leads to a use-after-free memory error. A remote attacker who can send fragmented packets to an affected device, without logging in, can time them around the reassembly timeout to win the race, which can disrupt the device.
Written by a model
Original description
Zephyr's IPv6, IPv4 and IEEE 802.15.4 (6LoWPAN) fragment reassembly implementations each keep a global reassembly cache that two threads modify with no synchronization. In the IPv6 code in subsys/net/ip/ipv6_fragment.c, the receive path runs net_ipv6_handle_fragment_hdr() and reassemble_packet(), and the reassembly_timeout() delayable-work handler runs on the system workqueue. When a datagram completes, reassemble_packet() calls only the non-synchronous k_work_cancel_delayable(), which does not stop a timeout handler that is already running. Separately, reassembly_get() treats a slot as free as soon as its timer is no longer pending, even while that slot's handler is still running. The IPv4 code in subsys/net/ip/ipv4_fragment.c has the same structure. In the 6LoWPAN code in subsys/net/l2/ieee802154/ieee802154_6lo_fragment.c, the reass_timeout() handler frees a cache entry's packet and releases the entry while fragment_add_to_cache() on the receive path may still be using it, and set_reass_cache() re-initializes the entry's timer on every allocation.
A remote, unauthenticated attacker who can send fragmented packets to a device built with CONFIG_NET_IPV6_FRAGMENT, CONFIG_NET_IPV4_FRAGMENT or CONFIG_NET_L2_IEEE802154_FRAGMENT (for 6LoWPAN, from within IEEE 802.15.4 radio range) can time fragments around the reassembly timeout. In the IPv6 code two interleavings are reachable. In the first, the timeout handler frees the stored fragments with reassembly_cancel() while the receive path is still merging them. In the second, the receive path reuses the slot and frees a stale first fragment while the handler is blocked inside net_icmpv6_send_error() still using that fragment as the source of the ICMPv6 Time Exceeded message. The race is widest with preemptive network threads, driver-context receive processing, or SMP. With the default cooperative threads on a single core, the attacker needs the handler to block while allocating a buffer.
Winning the race causes use-after-free, double free of net_pkt objects, or a NULL pointer dereference in the network receive or workqueue thread. The typical result is a crash, which is a remote denial of service. The fixes add a mutex to each implementation that serializes its cache between the receive path and the timeout handler (and, for IPv6 and IPv4, the slot iterator net_ipv6_frag_foreach() / net_ipv4_frag_foreach()), and make a handler whose entry was released or reused while it waited leave that entry alone. The IPv6 fix also detaches the first fragment before sending the ICMPv6 error, and the 6LoWPAN fix initializes the entry timers once instead of on every allocation.
What to do
Upgrade to a fixed version: 4.3.2, 4.5.0.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-102961 (Race between IP fragment reassembly and its timeout handler causes use-after-free in the Zephyr IPv6, IPv4 and 6LoWPAN stacks), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-102961 (entry last updated 2026-11-29):
Affected:
- zephyrproject zephyr: from 1.7.0, fixed in 4.3.2; from 4.4.0, fixed in 4.5.0
Fixed versions: 4.3.2, 4.5.0.
Vendor patches: 5c2cf0d, 6222db4, 30f8c58 (source: https://github.com/zephyrproject-rtos/zephyr/commit/5c2cf0d57765550f12b61f712499af744e7bee0b). Check each asset for these patch ids, not only its version.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-102961 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-102961 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/zephyrproject-rtos/zephyr/commit/5c2cf0d57765550f12b61f712499af744e7bee0b
- https://github.com/zephyrproject-rtos/zephyr/commit/6222db4de27ab2418eda5167fade6fa907a8a37c
- https://github.com/zephyrproject-rtos/zephyr/commit/30f8c581fc4623f7d645b864e500c4ecf0b2da85
- https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-rwm8-p5fg-rwq7
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-102961
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-102961"}.Affected versions
- zephyrFrom 1.7.0 · fixed in 4.3.2; From 4.4.0 · fixed in 4.5.0
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure17/25No login or user action needed, reachable over the network without a login · Unknown: Advisories don't say whether default setups are affected
- Reach?/20Unknown. No tracked technology or package matched
- Severity5.9/10CVSS 5.9
- No patch0/5No signal
What would change the score
- Would score about 68 if added to CISA KEV
- Would score about 63 if CISA's SSVC rates exploitation active
- Would score about 28 if advisories confirm default setups are exposed
Timeline
- CVE published
- First seen by cve.now
Evidence 6
| Kind | Source |
|---|---|
| Vendor advisory 1Establishes: Affected and fixed versions. | |
| Advisory | GitHub · zephyrproject-rtos/zephyr · Advisory GHSA-rwm8-p5fg-rwq7 |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-102961 |
| Record | NVD · CVE-2026-102961 |
| Other links 3 | |
| Patch | GitHub · zephyrproject-rtos/zephyr · Commit 5c2cf0d5 |
| Patch | GitHub · zephyrproject-rtos/zephyr · Commit 6222db4d |
| Patch | GitHub · zephyrproject-rtos/zephyr · Commit 30f8c581 |
Questions about CVE-2026-102961
Is CVE-2026-102961 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
Which versions are affected by CVE-2026-102961?
zephyr: from 1.7.0 before 4.3.2; from 4.4.0 before 4.5.0.
Source: cve.now feed data
How do I fix CVE-2026-102961?
Upgrade to Zephyr 4.3.2 or 4.5.0, the fixed versions for the affected branches. The fix is also available as the commits 5c2cf0d, 6222db4 and 30f8c58.
Source: github.com
Related
- CVE-2026-104378Out-of-bounds write in DesignWare I3C driver direct CCC handling via unbounded target count
- CVE-2026-130477Kernel user mode: dynamic thread and stack objects can be freed while their thread is still running or exiting (use-after-free)
- CVE-2026-100374Missing user buffer validation in SMBus block read and block process call syscalls allows kernel memory writes
- CVE-2026-104376Use-after-free write through dangling object-core list node in Zephyr kernel obj_core
- CVE-2026-102957PWM capture syscall leaves callback armed on a dead kernel stack frame when called with K_NO_WAIT
- CVE-2026-105415Out-of-bounds write via unchecked channel index in ESP32 MCPWM PWM driver set_cycles syscall
No corrections so far. Something wrong on this page? Report an error.