# CVE-2026-86086: Unvalidated userspace pointer dereference in zsock\_getsockopt syscall verifier allows limited kernel memory disclosure and system halt

- **Severity:** MEDIUM 6.1
- **CVSS:** 6.1 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **CWE:** CWE-822
- **Published:** 2026-12-01T14:23:15.008Z
- **Modified:** 2026-12-01T15:18:11.280Z

> **AI summary (AI-generated, claude-haiku-5-5):** 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.

## Who should check

- Anyone running zephyrproject zephyr \>= 2.0.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0

## 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

- zephyrproject zephyr: \>= 2.0.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0 (cvelist)

## Technologies

Zephyr RTOS

## Mitigation

- Upgrade zephyr to 4.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-mh59-wmcw-fpxj>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/01613dd6e7ec2cd78ab088cfecd9e21f0ad158e5>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-86086>

HTML: <https://flawdb.com/CVE-2026-86086> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-86086>
