Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessConfigure SO_SOCKS5 proxy under attacker control
-
DeliveryOpen AF_INET6 socket, call connect() with short AF_INET dest
-
ExploitKernel over-reads 16 bytes from 8-byte sockaddr
-
Execution12 bytes of stack residue sent to proxy
-
ImpactRepeat connect() to harvest memory
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a Zephyr image built with the non-default CONFIG_SOCKS option, a socket explicitly configured with SO_SOCKS5 pointing at an attacker-controlled or malicious SOCKS5 proxy, and image support for BOTH IPv4 and IPv6. The trigger is a destination/proxy address-family mismatch: an IPv6 proxy with an AF_INET (short) destination passed to connect(), which causes a 16-byte read from an 8-byte struct net_sockaddr_in. The disclosure target is whoever operates the SOCKS5 proxy. Two deployment modes are distinguished by the vendor: with CONFIG_USERSPACE, an unprivileged user-mode thread can trigger it deliberately and leak uninitialised kernel-stack bytes (the read stays within the stack net_sockaddr_storage); without CONFIG_USERSPACE, the over-read runs past the caller's own struct and can arise UNINTENTIONALLY when a destination is resolved via DNS while an IPv6 proxy is configured. Limiting factors: no write primitive, at most 12 bytes per connect() call, local attacker position required, and the whole SOCKS5 client feature is opt-in rather than built by default. |
| Impact | All signals converge on low real-world priority. The CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N, base 3.3) describes a local, low-privilege information-disclosure flaw with no integrity or availability impact, and my independent assessment agrees with it. The SSVC decision framework reinforces this: Exploitation=none, Automatable=no, Technical Impact=partial, yielding the vuln.today 'monitor' priority. There is no CISA KEV listing and no EPSS score was supplied, consistent with no observed exploitation. The impact ceiling is intrinsically small - at most 12 bytes of adjacent or uninitialised kernel-stack memory leaked per connect() call, with no write primitive - and exploitation is gated behind the non-default CONFIG_SOCKS option plus a socket explicitly configured with SO_SOCKS5 and an image built with both IPv4 and IPv6 support. The most privilege-relevant variant (CONFIG_USERSPACE, where an unprivileged user-mode thread leaks supervisor-stack residue) still only discloses small amounts of memory to a proxy the attacker already controls. This is a genuine but minor hardening issue, not an emergency; the dominant risk is slow, incremental disclosure of possibly sensitive kernel-stack contents to a malicious or compromised SOCKS5 proxy operator. No key signals conflict; the main caveat is the absence of an EPSS value, which is immaterial given Exploitation=none and the local, config-gated attack surface. |
| Exploit ScenarioDerived | On a Zephyr image built with CONFIG_SOCKS, CONFIG_USERSPACE and both IPv4/IPv6 support, an unprivileged user-mode thread opens an AF_INET6 stream socket, points setsockopt(SO_SOCKS5) at a proxy it controls, and calls connect() with a short AF_INET destination; the kernel mis-selects the IPv6 address type from the proxy family and copies 16 bytes out of the 8-byte destination, transmitting 12 bytes of uninitialised kernel-stack memory to the attacker-run proxy per attempt. No public exploit is identified at time of analysis; the mechanism and a vendor fix are documented in GHSA-xvvw-v57r-7rwm, but no working proof-of-concept is referenced. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 18, 2026
Information disclosure in the Zephyr RTOS SOCKS5 client (subsys/net/lib/socks/socks.c) lets a local attacker obtain up to 12 bytes of memory per connect() call when the destination address family does not match the proxy's address family. Affected builds are those with the non-default CONFIG_SOCKS option plus both IPv4 and IPv6 support, in Zephyr 2.0.0 through 4.3.1 and 4.4.0 through 4.4.x. With CONFIG_USERSPACE an unprivileged user-mode thread can deliberately leak uninitialised kernel-stack residue to a SOCKS5 proxy it controls, while without userspace the over-read past the caller's own struct net_sockaddr_in can also arise unintentionally when a DNS-resolved AF_INET destination is used with an IPv6 proxy; no public exploit code was identified at time of analysis, and SSVC records exploitation as none and automatable as no.
RemediationAI
Upgrade to Zephyr 4.3.2 or 4.5.0, which contain the socks5_encode_dest() helper that derives the address type from dest->sa_family and validates dest_len before copying. Vendor-released patch: 4.3.2 and 4.5.0; the fix was merged on main via PR #117987 (commit b066e8a6ae17) and backported through PR #119591 (v4.4-branch), PR #119945 (v4.3-branch) and PR #119946 (v3.7-branch), so downstreams tracking those branches should pull the corresponding update. Because CONFIG_SOCKS is an opt-in menuconfig, images that never enable the SOCKS5 client are not exposed and leaving the option disabled is the simplest avoidance measure; for images that do need it before patching, ensure the SO_SOCKS5 proxy family always matches the family of the destination passed to connect() and avoid pointing SO_SOCKS5 at untrusted proxies, since the leak is delivered to whoever operates the proxy. Details are in the advisory at https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-xvvw-v57r-7rwm.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is a CWE-125 out-of-bounds read in Zephyr's SOCKS5 client. socks5_tcp_connect() selected the SOCKS5 address type (ATYP) from the address family of the proxy (proxy->sa_family) but copied the address bytes from the destination sockaddr passed to connect(). A SOCKS5 CONNECT 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 agreement: 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, an 8-byte struct net_sockaddr_in was treated as a struct net_sockaddr_in6 and the 16-byte sin6_addr at offset 4 was copied out, reading 12 bytes past the object. With CONFIG_USERSPACE, z_vrfy_zsock_connect() copies only addrlen user bytes into a stack-resident struct net_sockaddr_storage (sized to the IPv6 sockaddr when IPv6 is enabled) and enforces no per-family minimum length, so the oversized read stays inside the storage but returns stale, uninitialised kernel-stack bytes; without CONFIG_USERSPACE the read runs past the caller's own object and discloses adjacent memory. The mirrored case (IPv6 destination through an IPv4 proxy) is memory-safe but encoded ATYP_IPV4 from the first four bytes of the IPv6 address, causing the proxy to connect to an unrelated host. The bug was introduced by 39ed77e4387 which made the proxy-family encoding reachable through SO_SOCKS5 in v2.0.0, though the encoding itself dates to the initial SOCKS5 support in v1.14.0, where the MQTT transport caller always used sizeof(struct sockaddr_in) and could not reach an IPv6 proxy. The upstream fix introduces socks5_encode_dest(), which selects ATYP from dest->sa_family and rejects dest_len shorter than the matching struct net_sockaddr_in or struct net_sockaddr_in6 with -EINVAL, and returns -EAFNOSUPPORT for unsupported families.
Know when Zephyr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Local user-mode thread (AV:L, PR:L) triggers the over-read deterministically (AC:L); only a small bounded memory leak to the proxy (C:L), no write so I:N/A:N.
Primary rating from Vendor (zephyr).
CVSS VectorVendor: zephyr
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on
Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit
Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS
Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner
Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability
Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable
DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul
zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(
Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul
The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte
Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c
EUVD-2026-127367
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB