Skip to main content

CVE-2026-15924: use-after-free in zephyrproject zephyr

0
Medium
VulnerabilityCVE-2026-15924cvecve-2026-15924
Published: 09/14/2026 (09/14/2026, 19:33:45 UTC)
Source: CVE Database V5
Vendor/Project: zephyrproject
Product: zephyr

Description

Zephyr's TLS socket layer in subsys/net/lib/sockets/sockets_tls.c keeps a single process-global array, client_cache, of cached client sessions that is shared by every TLS socket context. The functions that mutate and read it — tls_session_save(), tls_session_get(), tls_session_cache_reset(), and the settings restore handler — allocate, free, and dereference each entry's heap buffer (entry->session). Before the fix these accesses were serialized only by the per-socket context mutex ctx->lock (assigned per socket in ctx_set_lock()), which provides no mutual exclusion between different sockets touching the shared cache. Because CONFIG_NET_SOCKETS_TLS_MAX_CLIENT_SESSION_COUNT defaults to 1, any two concurrent client sockets contend for the same slot. A thread in tls_session_get() reading entry->session inside mbedtls_ssl_session_load() can run concurrently with another thread in tls_session_save() that selects the same entry for reuse and executes mbedtls_free(entry->session) before reallocating — a use-after-free read, and a double-free when two saves evict the same entry. Both corrupt the mbedTLS heap. The cache is reached on ordinary client paths: at connect time via tls_session_store()/tls_session_restore(), and (on main) whenever a TLS 1.3 session ticket arrives during recv()/poll() via tls_session_store_current(). Exploitation requires an application that opts into per-socket client session caching (the TLS_SESSION_CACHE socket option, off by default) and runs concurrent TLS client connections on multiple threads; the timing that opens the window is influenced by the remote peer(s), so a malicious or compromised server can raise session-ticket frequency to widen it. The reliably-demonstrable impact is memory corruption leading to a crash or heap corruption (denial of service). The fix adds a dedicated session_cache_lock mutex taken across every accessor of client_cache, serializing all reads and frees and closing the race.

CVSS v3.1

Score 5.9medium

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

zephyrproject

zephyr

Affected versions
>=3.1.0 <4.4.2
GitHub Actionsmore threats →cve
zephyr
pkg:github/zephyr
Affected versions
>=3.1.0 <4.4.2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/14/2026, 20:02:00 UTC

Technical Analysis

Zephyr's TLS socket layer maintains a single global array, client_cache, for cached client sessions shared across all TLS socket contexts. Functions that mutate or read this cache allocate, free, and dereference heap buffers without adequate mutual exclusion between different sockets. Because the default maximum client session count is one, concurrent client sockets contend for the same cache slot. This leads to a race condition where one thread may free a session buffer while another thread reads it, causing use-after-free and double-free conditions that corrupt the mbedTLS heap. The vulnerability manifests during ordinary client operations such as connect time and when TLS 1.3 session tickets arrive. Exploitation requires the TLS_SESSION_CACHE socket option to be enabled and concurrent TLS client connections. The fix adds a dedicated session_cache_lock mutex to serialize all accesses to the client_cache, preventing concurrent unsafe operations.

Potential Impact

The vulnerability can cause memory corruption in the mbedTLS heap, leading to crashes or denial of service. There is no indication of confidentiality or integrity impact. Exploitation requires specific application configuration and concurrent TLS client connections, and a malicious or compromised server can increase the likelihood by raising session-ticket frequency. No known exploits are reported in the wild.

Mitigation Recommendations

A fix is available that adds a dedicated mutex to serialize access to the shared client session cache, preventing the race condition. Users should upgrade to Zephyr version 4.4.2 or later where this fix is included. If upgrading is not immediately possible, disabling the TLS_SESSION_CACHE socket option (which is off by default) will prevent exploitation. Patch status is confirmed by the vendor advisory indicating the fix in version 4.4.2.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
zephyr
Date Reserved
2026-07-16T04:55:25.214Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6aa84f4555bf5e2cf585ab0e

Added to database: 09/14/2026, 19:47:17 UTC

Last enriched: 09/14/2026, 20:02:00 UTC

Last updated: 09/14/2026, 20:21:36 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses