# CVE-2026-10653: Non-atomic `net_buf` reference counts cause double-free / free-list corruption under concurrent unref

> Concurrent unref operations on shared network buffers cause double-frees and heap corruption, potentially leading to code execution or crashes in Zephyr RTOS.

- **Severity:** Medium 6.4 (`CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 30 Jun 2026
- **Updated:** 15 Oct 2026
- **Also known as:** GHSA-284j-5jm9-55hh

## What is CVE-2026-10653?

CVE-2026-10653 is a medium-severity vulnerability in Zephyrproject Zephyr, published on 30 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

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.

This fix is not being backported to v3.7-branch (LTS). The backport was attempted and closed unmerged (#111181): the v3.7 networking tree has diverged from main, and the new atomic word-packing -- together with the assertions it adds -- turns pre-existing v3.7-only reference-counting defects elsewhere in the stack into hard faults, so landing the change faithfully would mean pulling an open-ended set of additional v3.7-only fixes into an LTS branch. v3.7 remains affected. Applications on v3.7 that share one net_buf across threads should serialize their own net_buf_unref() calls rather than rely on the documented self-synchronizing behaviour. The fix is on main and has been backported to v4.3-branch (#110852) and v4.4-branch (#110853).

Weakness: CWE-415 (Double Free)

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

It affects 1 product.


Products: Zephyrproject Zephyr.

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

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

## Is CVE-2026-10653 being exploited?

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

## Other vulnerabilities in Zephyrproject Zephyr

- [CVE-2026-5067](https://insights.sbomify.com/CVE-2026-5067/): Out-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-Key (critical 9.8)
- [CVE-2022-3806](https://insights.sbomify.com/CVE-2022-3806/): Bluetooth HCI Error Handling Double Free (critical 9.8)
- [CVE-2017-14199](https://insights.sbomify.com/CVE-2017-14199/): Memory corruption in getaddrinfo (critical 9.8)
- [CVE-2018-1000800](https://insights.sbomify.com/CVE-2018-1000800/): Null dereference in n/a (critical 9.8)
- [CVE-2021-3329](https://insights.sbomify.com/CVE-2021-3329/): DOS: Incorrect handling of the initial HCI ACL_MTU handshake packet leads to crash of bluetooth host layer (critical 9.6)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-10653 is a medium-severity vulnerability in Zephyrproject Zephyr, published on 30 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-10653 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-10653/ (Markdown: https://insights.sbomify.com/CVE-2026-10653/index.md)
```

## Sources

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

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