Skip to main content

Zephyr RTOS CVE-2026-10653

| EUVDEUVD-2026-40367 HIGH
Double Free (CWE-415)
2026-06-30 zephyr
8.1
CVSS 3.1 · NVD
Share

Severity by source

Vendor (zephyr) PRIMARY
MEDIUM
qualitative
NVD
8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
7.4 HIGH

The trigger is a non-attacker-controlled timing race, so AV:L and AC:H; no privileges or user interaction are needed to reach the code path, but memory corruption yields full C/I/A impact.

3.1 AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (zephyr).

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

9
Analysis Updated
Jul 06, 2026 - 21:42 vuln.today
v5 (cvss_changed)
Analysis Updated
Jul 06, 2026 - 21:40 vuln.today
v4 (cvss_changed)
Analysis Updated
Jul 06, 2026 - 21:40 vuln.today
v3 (cvss_changed)
Source Code Evidence Fetched
Jul 06, 2026 - 21:39 vuln.today
Analysis Updated
Jul 06, 2026 - 21:39 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Jul 06, 2026 - 19:52 vuln.today
cvss_changed
Severity Changed
Jul 06, 2026 - 19:52 NVD
MEDIUM HIGH
CVSS changed
Jul 06, 2026 - 19:52 NVD
6.4 (MEDIUM) 8.1 (HIGH)
Analysis Generated
Jun 30, 2026 - 17:25 vuln.today

DescriptionNVD

The Zephyr net_buf library (lib/net_buf/buf.c) manipulated both of its reference counts -- the per-header buf->ref and the per-data-block ref_count at the start of each variable/heap data allocation -- with plain non-atomic C operators (buf->ref++, if (--buf->ref > 0), if (--(*ref_count))). The API is documented as self-synchronizing: callers may share one buffer across threads (e.g. via k_fifo) and each holder independently calls net_buf_unref() with no surrounding lock. Under true concurrency (SMP, or single-core preemption between the non-atomic load and store while another context unrefs the same buffer), two holders can both observe the same prior reference value and both conclude they are the last reference. For heap/variable-data pools (mem_pool_data_unref/heap_data_unref, used by zbus message subscribers, the IP stack RX/TX buffers when CONFIG_NET_BUF_FIXED_DATA_SIZE=n, capture, wireguard, ISO-TP and usbip) this produces a double k_heap_free()/k_free() of the same block -- heap-metadata corruption and a use-after-free on the heap-hardening poison pattern. For the per-header refcount the buffer is returned to the pool free LIFO twice for any pool type (including fixed-data pools used by Bluetooth and networking), corrupting the free list so a later allocation hands the same buffer to two owners. The fix converts both refcounts to atomic_inc/atomic_dec (overlaying buf->ref in an atomic_t-sized union and changing the data-block refcount from uint8_t to atomic_t). Impact is gated on genuine concurrency and on an application architecture that shares one buffer among multiple independent unref'ers; the trigger is a refcount/timing race rather than packet content, so an external attacker has at most weak indirect influence over the race window. Affects all Zephyr releases through v4.4.0.

AnalysisAI

Non-atomic reference-count manipulation in the Zephyr RTOS net_buf library (lib/net_buf/buf.c) allows a double-free/use-after-free when a single buffer is shared and independently unref'd across concurrent contexts. Because buf->ref and the per-data-block ref_count were incremented/decremented with plain C operators despite the API being documented as self-synchronizing, two holders racing net_buf_unref() under SMP or single-core preemption can each conclude they hold the last reference, causing a double k_heap_free()/k_free() (heap-metadata corruption and UAF on heap-hardening poison) for heap/variable-data pools, or a double return to the pool free list for any pool type. All Zephyr releases through v4.4.0 are affected; no public exploit is identified at time of analysis and EPSS risk is low (0.16%, 6th percentile).

Technical ContextAI

Zephyr is a widely-used real-time operating system for resource-constrained embedded and IoT devices. Its net_buf library provides reference-counted buffers passed between subsystems and threads (e.g. handed off through a k_fifo), and the public contract states each holder may independently call net_buf_unref() with no surrounding lock. Two counters exist: the per-header buf->ref inside struct net_buf, and a per-data-block ref_count at the start of each variable/heap data allocation. Both were mutated with non-atomic read-modify-write sequences (buf->ref++, if (--buf->ref > 0), if (--(*ref_count))), which is the root cause captured by CWE-415 (Double Free). Under genuine concurrency the load and store are not indivisible, so two contexts can read the same prior value and both drive the counter to the 'last reference' state. The fix overlays buf->ref in an atomic_t-sized union (packed with the write-once flags/pool_id/user_data_size bytes) and converts the data-block ref_count from uint8_t to atomic_t, replacing operations with atomic_inc/atomic_dec. Affected consumers include zbus message subscribers, the IP stack RX/TX buffers when CONFIG_NET_BUF_FIXED_DATA_SIZE=n, packet capture, WireGuard, ISO-TP, usbip, and (for the header refcount) Bluetooth and networking fixed-data pools.

RemediationAI

Vendor-released patch: upgrade to Zephyr v4.5.0, which contains the fix (per EUVD the fixed version is 4.5.0); the change converts both reference counts to atomic operations in commit 9bb2878319d5f46c29ab5fe855a378d87cd75fc3 (https://github.com/zephyrproject-rtos/zephyr/commit/9bb2878319d5f46c29ab5fe855a378d87cd75fc3) and is documented in advisory GHSA-284j-5jm9-55hh (https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-284j-5jm9-55hh). If you cannot upgrade the whole tree, backport that single self-contained commit (net_buf.h union plus the buf.c atomic_inc/atomic_dec conversion) to your Zephyr version. As compensating controls until patched: avoid application designs where one net_buf is shared and independently net_buf_unref'd by multiple concurrent contexts - have a single owner perform the final unref, or serialize unref calls behind your own lock (trade-off: added latency and code changes); on single-core builds you can shrink the preemption window by not preempting between paired ref/unref sequences, and where feasible prefer fixed-data pools with a single-consumer handoff model, accepting that this does not eliminate the header-refcount race and is risk-reduction only, not a fix.

More in Zephyr

View all
CVE-2023-4260 CRITICAL POC
10.0 Sep 27

Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),

CVE-2023-5055 CRITICAL POC
9.8 Nov 21

Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2023-4257 CRITICAL POC
9.8 Oct 13

Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS

CVE-2023-3725 CRITICAL POC
9.8 Oct 06

Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner

CVE-2021-3323 CRITICAL POC
9.8 Oct 12

Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability

CVE-2021-3625 CRITICAL POC
9.8 Oct 05

Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable

CVE-2021-3319 CRITICAL POC
9.8 Oct 05

DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul

CVE-2018-1000800 CRITICAL POC
9.8 Sep 06

zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(

CVE-2023-4264 CRITICAL POC
9.6 Sep 27

Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul

CVE-2026-1678 CRITICAL POC
9.4 Mar 05

Buffer overflow in Zephyr RTOS dns_unpack_name() function causing OOB writes. PoC available.

CVE-2024-1638 CRITICAL POC
9.1 Feb 19

The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte

CVE-2023-5753 HIGH POC
8.8 Oct 25

Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c

Share

CVE-2026-10653 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy