CVE-2026-12234
Awaiting Analysis Awaiting Analysis - Queue

Double-Fetch Race Condition in Zephyr RTOS Sockets

Vulnerability report for CVE-2026-12234, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-12

Last updated on: 2026-08-26

Assigner: Zephyr Project

Description

The userspace syscall verifiers z_vrfy_zsock_sendmsg() and z_vrfy_zsock_recvmsg() in subsys/net/lib/sockets/sockets.c snapshot the caller-supplied struct net_msghdr into a kernel-side copy with k_usermode_from_copy(), but then re-read the still-live user struct for subsequent decisions. The kernel iovec shadow buffer is sized from one read of msg->msg_iovlen, while the population loop is bounded by a second, live read of the same field. Because msg points into ordinary user memory, a cooperating second thread in the same memory domain can inflate msg->msg_iovlen in the window between the sizing read and the loop test (a classic double-fetch / TOCTOU). The population loop then iterates past the number of net_iovec slots actually allocated, writing attacker-influenced iov_base/iov_len values beyond the end of the kernel-heap shadow buffer. The recvmsg verifier has the same defect on both its inbound and result write-back loops. The code is reachable from an unprivileged user thread whenever CONFIG_USERSPACE is enabled and the zsock_sendmsg/zsock_recvmsg syscalls are available. A successful race corrupts kernel-managed heap memory across the user-to-kernel privilege boundary, yielding a local privilege-escalation primitive or, at minimum, a kernel-fault denial of service. The fix copies the header once and derives every size, bound, and gate from the snapshot, copying each iovec entry atomically so its base and length can no longer be raced apart.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-12
Last Modified
2026-08-26
Generated
2026-09-02
AI Q&A
2026-08-12
EPSS Evaluated
2026-08-31
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
zephyrproject zephyr From 2.3.0 (inc) to 4.4.0-rc3 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-367 The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-12234 is a kernel heap overflow in Zephyr RTOS's socket functions zsock_sendmsg and zsock_recvmsg. It occurs due to a double-fetch race condition where the kernel reads a user-provided msg_iovlen value twice: first to allocate memory and then during processing. A concurrent thread can modify msg_iovlen between these reads, causing the kernel to write beyond allocated heap space and corrupt kernel memory.

Detection Guidance

Detecting this vulnerability requires checking Zephyr RTOS versions and socket-related kernel functions. Inspect Zephyr version with `zephyr_version` or check build files for versions between 2.3.0 and 4.4.0-rc3. Monitor kernel logs for crashes or heap corruption during socket operations. No direct detection commands exist, but enabling CONFIG_USERSPACE and testing zsock_sendmsg/zsock_recvmsg syscalls may reveal instability.

Impact Analysis

This vulnerability allows a local attacker with low privileges to corrupt kernel heap memory, potentially leading to local privilege escalation or kernel crashes (denial of service). It requires CONFIG_USERSPACE enabled and access to zsock_sendmsg/zsock_recvmsg syscalls, which are available to unprivileged user threads.

Compliance Impact

This vulnerability could potentially impact compliance with GDPR and HIPAA by enabling local privilege escalation or kernel crashes. A successful exploit may allow unauthorized access to sensitive data or disruption of critical services, which could violate confidentiality and availability requirements in these regulations.

Mitigation Strategies

Apply the official patches from Zephyr Project by updating to versions beyond 4.4.0-rc3 or merging commits like 2e0f9cf. Disable CONFIG_USERSPACE if not required. Restrict unprivileged user access to zsock_sendmsg/zsock_recvmsg syscalls. Monitor kernel logs for heap corruption or crashes as indicators of exploitation attempts.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-12234. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart