CVE-2026-86086
Unvalidated userspace pointer dereference in zsock_getsockopt syscall verifier allows limited kernel memory disclosure and system halt
AI summary AI generated
A user-mode thread can dereference an unvalidated pointer via zsock_getsockopt, causing kernel information leakage and a whole-system halt or reboot in Zephyr builds with CONFIG_USERSPACE.
Mitigation
- Upgrade zephyr to 4.5.0 or later.
Who should check
- Anyone running zephyrproject zephyr >= 2.0.0, < 4.3.2; >= 4.4.0, < 4.5.0
Vulnerability facts
- Affected
- zephyrproject zephyr >= 2.0.0, < 4.3.2; >= 4.4.0, < 4.5.0
- Fixed in
- zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 6.1 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: None
- Availability impact: High
- CWE
- CWE-822
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| zephyrproject zephyr | >= 2.0.0, < 4.3.2; >= 4.4.0, < 4.5.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-86086. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-86086.md Affected: zephyrproject zephyr >= 2.0.0, < 4.3.2; >= 4.4.0, < 4.5.0 Fixed in: zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0 Steps: 1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
Vendor advisories
FAQ
Is CVE-2026-86086 being exploited?
There is no confirmed exploitation: CVE-2026-86086 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is CVE-2026-86086?
Medium: CVSS 6.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2026-86086?
zephyrproject zephyr >= 2.0.0, < 4.3.2; >= 4.4.0, < 4.5.0.
Is there a fix for CVE-2026-86086?
Yes. Fixed in zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0. Upgrade zephyr to 4.5.0 or later.
How do I check if I'm affected by CVE-2026-86086?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More Zephyr RTOS vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| MEDIUM 5.5 | CVE-2026-105418 NULL pointer dereference in SocketCAN getsockopt/setsockopt on an unbound socket | Zephyr RTOS | ||
| MEDIUM 5.4 | CVE-2026-125037 Zephyr Project Manager <= 3.3.210 - Authenticated (Subscriber+) Stored DOM-Based Cross-Site Scripting via 'attachments[0][attachment_id]' Parameter | WordPress+2 | ||
| MEDIUM 4.4 | CVE-2026-105417 Memory domain partition removal does not revoke user-thread access on ARMv8-R AArch64 MPU | Zephyr RTOS | ||
| MEDIUM 4.2 | CVE-2026-105416 UART RX interrupt storm denial of service in ESP32 serial driver async API | Zephyr RTOS | ||
| MEDIUM 4.6 | CVE-2026-104931 NULL pointer dereference in USB device_next class handlers on zero-length control OUT requests | Zephyr RTOS | EPSS 26% |