← Vulnerability feed

Vulnerability record · CVE-2026-12234 · published 12 August 2026

CVE-2026-12234: TOCTOU race condition vulnerability

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.

7.8 CVSS 3.1 High EPSS 0.11% · top 98.9% CWE-367 · TOCTOU race condition Awaiting Analysis
7.8CVSS 3.1 base score
0.11%EPSS exploitation probability, 30 days
NoNot in CISA KEV
0Affected product versions listed by NVD
3References
26 Aug 2026Last modified by NVD

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:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H

References

Track CVE-2026-12234 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

5.1CVE-2015-3246libuser userhelper direct /etc/passwd write race conditionlibuser before 0.56.13-8 and 0.60 before 0.60-7, as used by the userhelper program in the usermode package, modifies /etc/passwd directly instead of …KEVEPSS 8.8%analysed7.8CVE-2025-38352Linux kernel POSIX CPU timer TOCTOU race enables local privilege escalationA time-of-check to time-of-use race exists in the Linux kernel between handle_posix_cpu_timers() and posix_cpu_timer_del(). When an exiting non-autor…KEVEPSS 1.3%analysed8.2CVE-2025-22224VMware ESXi and Workstation TOCTOU race leads to out-of-bounds writeVMware ESXi, Workstation, and related products contain a TOCTOU race condition that results in an out-of-bounds write. An attacker with local adminis…KEVEPSS 1.6%analysed7.0CVE-2024-30088Windows Kernel TOCTOU race condition privilege escalationCVE-2024-30088 is a time-of-check time-of-use (TOCTOU) race condition in the Windows kernel that allows a local user to elevate privileges. It affect…KEVEPSS 68%analysed7.0CVE-2022-48618Apple OS Pointer Authentication Bypass via TOCTOU Race ConditionA time-of-check time-of-use race condition in Apple's pointer authentication implementation allows an attacker who already holds arbitrary read and w…KEVEPSS 0.49%analysed8.8CVE-2023-35311Microsoft Outlook security feature bypass via TOCTOU race conditionCVE-2023-35311 is a security feature bypass in Microsoft Outlook caused by a time-of-check time-of-use (TOCTOU) race condition (CWE-367). It affects …KEVEPSS 16%analysed

Source: NIST National Vulnerability Database (record CVE-2026-12234), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.