CVE-2026-95822

LowCVSS 3.3/10Last modified Nov 17, 2026

Description

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.

Metrics

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

Weakness enumeration

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Nov 17, 2026
Last modified
Nov 17, 2026
NVD status
Awaiting Analysis

Related CVEs from 2026

CVE-2026-958237.5tcp_pkt_linearize() in subsys/net/ip/tcp.c is used by th_get() whenever a received TCP header is not contiguous in a single net_buf. While pCVE-2026-958246.5The IPv6 Neighbor Discovery code in subsys/net/ip/ipv6_nbr.c flushes a neighbour's queued packets at the end of handle_ra_input(). The SourcCVE-2026-958255.3net_if_ipv4_addr_rm() and net_if_ipv6_addr_rm() in subsys/net/ip/net_if.c unconditionally called net_if_addr_unref() on the target address. CVE-2026-958267.5The SMSC911x/LAN9220 Ethernet driver stages every outgoing frame in a fixed-size static buffer before pushing it to the controller FIFO. ethCVE-2026-958276.5The IPv6 neighbour discovery code in subsys/net/ip/ipv6_nbr.c keeps packets that are waiting for address resolution on a per-neighbour pendiCVE-2026-958284.3A vulnerability was determined in Mstfakts College-Management-System. This affects the function session_start of the file Front-end/server.pCVE-2026-958296.3A vulnerability was identified in TDuckCloud tduck-platform up to 5.3. This vulnerability affects the function PaginationInnerInterceptor.coCVE-2026-95834.3A weakness has been identified in SourceCodester CET Automated Grading System with AI Predictive Analytics 1.0. This impacts an unknown funcCVE-2026-958306.3A security flaw has been discovered in theRealSain Pixtream up to 866afd4f0cea812b918780fb74b67dccf8c4d6a0. This issue affects some unknown CVE-2026-958317.8Crypt::SelfCertificate versions from 1.01 through 1.05 for Perl contains malware which executes Python code from an obfuscated URL. The genCVE-2026-958329.3Improper Neutralization of Special Elements in Output Used by a Downstream Component in the colour control escape code handler in kitty fromCVE-2026-958336.3A weakness has been identified in itsourcecode Leave Management System 1.0. Impacted is an unknown function of the file /module/leavetype/in
CVE-2026-95822: Low severity, CVSS 3.3 | Vulnix