nday
CVE-2026-95822

Out-of-bounds read and kernel stack disclosure in the SOCKS5 client when the destination address family differs from the proxy address family

zephyrproject / zephyr

Disclosed . nday has no fix record for it yet; that does not mean no patch exists. None of the four PoC sources lists it. Not in CISA KEV.

tags weakness typeout-of-bounds read accesslocalno user interaction productZephyr RTOS product typeoperating system
why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

out-of-bounds read
CWE-125, stated by the CNA zephyr and NVD, republishing [email protected]
local
AV:L in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N (CVSS 3.1) from the CNA zephyr
no user interaction
UI:N in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N (CVSS 3.1) from the CNA zephyr
Zephyr RTOS
affected products in the CVE record: zephyrproject · zephyr
operating system
affected products in the CVE record: zephyrproject · zephyrthe product type of Zephyr RTOS in nday's product registry
stage
DIS
disclosed
cvss
3.3 LOW v3.1

Lifecycle

x axis UTC; dot = exact minute, wide bar = date only, hollow = unknown or inferred.
time unknown
DISdisclosed
11-17T19:39Z
PATpatch
no record yet
ANAanalysis
no record yet
POCPoC
no record yet
ITWexploited
no record yet
KEVKEV
no record yet

Summary

The SOCKS5 client in subsys/net/lib/socks/socks.c built the CONNECT request in socks5_tcp_connect() by choosing the SOCKS5 address type from the address family of the proxy (proxy->sa_family) while reading the bytes out of the destination address supplied to connect(). A SOCKS5 request encodes the destination independently of the transport used to reach the proxy, so the two families are unrelated and nothing in the path forces them to agree: set_context_proxy() only requires the proxy family to match the socket, and zsock_connect_ctx() enters the SOCKS branch before any destination validation. With an IPv6 proxy and an AF_INET destination the code treated an 8-byte struct net_sockaddr_in as a struct net_sockaddr_in6 and copied the 16-byte sin6_addr from it, reading 12 bytes past the end of the object and transmitting them to the proxy.

With CONFIG_USERSPACE enabled, z_vrfy_zsock_connect() copies only addrlen user bytes into a stack-resident struct net_sockaddr_storage and enforces no per-family minimum length, so the oversized read stays within the storage but returns stale, uninitialised kernel-stack bytes. An unprivileged user-mode thread can therefore open an AF_INET6 stream socket, point setsockopt(SO_SOCKS5) at a proxy it controls, and call connect() with a short AF_INET destination to have the kernel send it 12 bytes of supervisor stack residue per attempt. Without CONFIG_USERSPACE the read runs past the end of the caller's own struct net_sockaddr_in, disclosing adjacent memory to the proxy; the family mismatch can arise unintentionally when a destination is obtained from DNS while an IPv6 proxy is configured.

Impact is limited to information disclosure of at most 12 bytes per connect() call, with no write primitive; the leak is delivered to whoever operates the SOCKS5 proxy. The mirrored pairing (IPv6 destination through an IPv4 proxy) is memory-safe but encoded the destination as SOCKS5_ATYP_IPV4 from the first four bytes of the IPv6 address, causing the proxy to connect to an unrelated host. Exploitation requires the non-default CONFIG_SOCKS option, a socket with SO_SOCKS5 configured, and both IPv4 and IPv6 support in the image.

The fix moves the encoding into a helper that selects the address type from dest->sa_family and validates dest_len against the matching struct net_sockaddr_in/struct net_sockaddr_in6 before copying, rejecting under-length or unsupported destinations with an error.

Original text of the CVE record (cvelist), shown as published.

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:L
Local: needs a local or SSH session, or a user tricked into acting on the machine
Attack complexity AC:L
Low: no special conditions; the attacker can expect repeatable success
Privileges required PR:L
Low: ordinary user privileges
User interaction UI:N
None: no action by anyone other than the attacker

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

CVSS 3.1 vector from the CVE record, scored by the CNA zephyr.

Event log

+DISdisclosed

CVE record published by zephyr. CVSS 3.3, low.

src cvelist · nday , observed live · raw
{
  "id": 477082,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-95822",
  "occurred_at": "2026-11-17T19:39:10.656Z",
  "observed_at": "2026-11-17T20:03:12.564625Z",
  "is_backfill": false,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "cna",
      "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
      "version": "3.1",
      "base_score": 3.3,
      "base_severity": "LOW"
    },
    "ssvc": {
      "timestamp": "2026-11-17T20:12:29.255208Z",
      "automatable": "no",
      "exploitation": "none",
      "technical_impact": "partial"
    },
    "state": "PUBLISHED",
    "date_published": "2026-11-17T19:39:10.656Z",
    "assigner_short_name": "zephyr"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

Researcher discussion

0 researchers mentioned this in the last 7 days

Posts on X by researchers on nday's list that mention this CVE, shown as posted. nday does not check them.

nday has not collected any post on X by listed researchers that mentions this CVE.

Discussion

0 comments

No comments yet.