{"schemaVersion":4,"id":"CVE-2026-95822","aliases":[],"status":"published","duplicateOf":null,"title":"Out-of-bounds read and kernel stack disclosure in the SOCKS5 client when the destination address family differs from the proxy address family","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.\n\nWith 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.\n\nImpact 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.\n\nThe 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.","dates":{"published":"2026-11-17T19:39:10.656Z","modified":"2026-11-17T20:13:27.798Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":3.3,"severity":"low","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":3.3,"severity":"low","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":3.3,"severity":"low","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00139,"percentile":0.03492,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[{"date":"2026-11-18T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00139,"percentile":0.03492}],"last30":[{"date":"2026-11-18T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00146,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00139,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00139,"percentile":0.03492}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-125","name":"Out-of-bounds Read","description":"The product reads data past the end, or before the beginning, of the intended buffer.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/125.html"}],"affected":[{"vendor":"zephyrproject","product":"zephyr","name":"zephyr","label":"zephyr","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 2.0.0, < 4.3.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"2.0.0","startInclusive":true,"end":"4.3.2","endInclusive":false}},{"text":"≥ 4.4.0, < 4.5.0","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"4.4.0","startInclusive":true,"end":"4.5.0","endInclusive":false}}],"versionsText":"≥ 2.0.0, < 4.3.2 | ≥ 4.4.0, < 4.5.0","eol":null,"hubHref":"/vendor/zephyrproject/zephyr"}],"affectedCount":1,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/zephyrproject-rtos/zephyr/commit/b066e8a6ae1706cd0b3a6dbc61a5861f62944f95","label":"github.com/zephyrproject-rtos/zephyr/commit/b066e8a6ae1706cd0b3a6dbc61a5861f62944f95","hostname":"github.com","tags":["Patch"]},{"url":"https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-xvvw-v57r-7rwm","label":"github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-xvvw-v57r-7rwm","hostname":"github.com","tags":[]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-11-17T19:39:10.656Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-11-17T20:13:27.798Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 3.3, local access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,0,33],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.00139,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2026-11-17T20:13:27.798Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":3.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","version":"3.1","headline":true},{"type":"cvss","source":"nvd","date":"2026-11-17T20:13:27.798Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":3.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2026-11-17T20:12:29.255Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"none"}],"epss":{"value":0.00139,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T11:16:59.273Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T11:16:59.802Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T11:16:59.995Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T11:01:01.512Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T11:16:57.726Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T11:16:56.764Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T11:47:39.551Z","stale":false,"partial":false}}