CVE-2026-12234: TOCTOU double-fetch in `zsock_sendmsg`/`recvmsg` userspace verifiers allows kernel-heap out-of-bounds write

Published Aug 12, 2026
·
Updated

The userspace syscall verifiers zvrfyzsocksendmsg() and zvrfyzsockrecvmsg() in subsys/net/lib/sockets/sockets.c snapshot the caller-supplied struct netmsghdr into a kernel-side copy with kusermodefromcopy(), but then re-read the still-live user struct for subsequent decisions. The kernel iovec shadow buffer is sized from one read of msg->msgiovlen, 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->msgiovlen 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 netiovec slots actually allocated, writing attacker-influenced iovbase/iovlen 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 CONFIGUSERSPACE is enabled and the zsocksendmsg/zsockrecvmsg 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.

Affected Software

1 affected component
Linux Kernel

Event History

Aug 12, 2026
CVE Published
via MITRE·04:39 AM
Data Sourced
via MITRE·04:39 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 AM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-12234?

The severity of CVE-2026-12234 is high, with a score of 7.8.

2

How can CVE-2026-12234 be mitigated?

Mitigation for CVE-2026-12234 involves updating to the latest Linux Kernel version that addresses the vulnerability.

3

What type of vulnerability is CVE-2026-12234?

CVE-2026-12234 is a TOCTOU double-fetch vulnerability that allows for a kernel-heap out-of-bounds write.

4

What software is affected by CVE-2026-12234?

CVE-2026-12234 affects the Linux Kernel.

5

What are the impacts of exploiting CVE-2026-12234?

Exploiting CVE-2026-12234 may lead to potential privilege escalation or arbitrary code execution in the kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203