CVE-2026-86086: zephyrproject zephyr Out-of-Bounds

CVE-2026-86086

NVDCVSS scored by vulnerabilities@zephyrproject.org

Vulnerability Summary

The CONFIG_USERSPACE syscall verifier for getsockopt() in subsys/net/lib/sockets/sockets.c dereferenced the caller-supplied optlen pointer without validating it. z_vrfy_zsock_getsockopt() began with net_socklen_t kernel_optlen = (net_socklen_t )optlen;, reading four bytes through an unprivileged thread's pointer while executing in supervisor mode, before any K_SYSCALL_MEMORY_READ or k_usermode_from_copy() check. Every sibling verifier in the same file β€” z_vrfy_zsock_accept(), z_vrfy_zsock_recvfrom(), z_vrfy_zsock_getpeername(), z_vrfy_zsock_getsockname() β€” validated the equivalent addrlen pointer correctly; getsockopt was the sole outlier.

zsock_getsockopt() is declared __syscall in include/zephyr/net/socket.h, so any user-mode thread holding (or able to create) a socket can invoke it directly with an arbitrary pointer value. No preparation, race, or heap grooming is required: a single call is enough. The issue is only present in builds with CONFIG_USERSPACE=y and CONFIG_NET_SOCKETS=y, which is precisely the configuration intended to contain an untrusted thread.

The word read is not returned to the caller directly: the trailing k_usermode_to_copy() writes the updated length back through optlen itself, and for a kernel address that write is rejected with a kernel oops. The leak is instead an oracle. The word read through optlen becomes the length checked by K_SYSCALL_MEMORY_WRITE(optval, kernel_optlen): a value larger than the caller's writable span at optval fails cleanly with -EPERM, while a smaller one proceeds to the oopsing write-back (or, for a large value, to a failed k_usermode_alloc_from_copy()). A thread can therefore learn whether a chosen kernel word is below a chosen threshold, but every "yes" answer costs a fatal error, which keeps the disclosure limited. That fatal error is the larger impact: the default k_sys_fatal_error_handler() halts or warm-reboots the whole system on a kernel oops rather than aborting only the offending thread, and passing NULL or an address not mapped for supervisor access as optlen faults in supervisor mode with the same result. The subsequent length-bounded copies remain checked, so there is no out-of-bounds write.

The fix replaces the raw dereference with K_OOPS(k_usermode_from_copy(&kernel_optlen, optlen, sizeof(net_socklen_t))), which validates read access before copying and turns a malicious pointer into a clean kernel oops on the calling thread.
Severity Level
MEDIUM(6.1)
Published Date
Dec 1, 2026
Last Modified
Dec 1, 2026
Exploitation Status
No confirmed exploitation yet
EPSS Score (30-Day)
0.34%Probability
Root Weakness (CWE)
The product obtains a value from an untrusted source, converts this value to a pointer, and dereferences the resulting pointer.
CVSS v3.1 Base Metrics — Score 6.1 (MEDIUM)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H
Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged
ConfidentialityLow
IntegrityNone
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • zephyrproject zephyr >= 2.0.0 and < 4.3.2
  • zephyrproject zephyr >= 4.4.0 and < 4.5.0
Patched Versions
  • zephyrproject zephyr 4.3.2
  • zephyrproject zephyr 4.5.0

What to do

Fix it during your normal patch cycle. No exploitation is confirmed yet.

  1. Check whether you run zephyrproject zephyr and which version.
  2. Update to a patched version listed above, then confirm the new version.

Timeline

  • Dec 1, 2026Published
  • Dec 1, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new zephyrproject zephyr CVEsYou are reading CVE-2026-86086. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Dec 3, 2026 01:10 UTC