目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2026-95821— SOCKS5握手失败栈悬挂回调漏洞

一分钟漏洞结论

影响对象
zephyrproject zephyr
利用判断
尚无明确在野利用证据,仍需结合暴露面评估
建议动作
优先检查厂商安全公告和参考链接中的修复版本;无法立即升级时,限制受影响服务暴露并加强监测。

下面是中文翻译;仅作为说明/核查材料,不新增利用细节: 在 中,SOCKS5 客户端把 自身两个栈变量 和 的地址,作为协商和 CONNECT 响应回调的用户数据,传给 。对于 TCP 上下文, 最终会进入 ;而它只保存了 和 ,并不移除这些回调。成功路径上, 会立即把它们替换为 ;但凡是错误路径,都没有清理这些指针,因此网络上下文会继续持有指向已经销毁的栈帧的指针。 任何作为代理的远程对等方,都可以通过协议合法的响应使其生效:例如在方法协商中返回 NO ACCEPTABLE METHODS( )、发送错误的版本字

CVSS 6.5 · Medium
获取后续新漏洞提醒 登录后订阅

一、 漏洞 CVE-2026-95821 基础信息

漏洞信息

对漏洞内容有疑问?看看神龙的深度分析是否有帮助!
查看神龙十问 ↗

尽管我们使用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。神龙努力确保数据的准确性,但请您根据实际情况进行核实和判断。

Vulnerability Title
Dangling stack pointer left installed as TCP receive callback after a failed SOCKS5 handshake
来源: CVE Program / CVE List V5
Vulnerability Description
The SOCKS5 client in subsys/net/lib/socks/socks.c passes the addresses of two of socks5_tcp_connect()'s own stack variables, method_rsp and cmd_rsp, to net_context_recv() as the user data for the negotiation and CONNECT response callbacks. For a TCP context net_context_recv() reaches net_tcp_recv(), which only stores context->recv_cb and conn->recv_user_data and never removes them. On the success path zsock_connect_ctx() immediately replaces them with zsock_received_cb(), but on every error path nothing did, so the network context was left holding a pointer into a stack frame that had already been destroyed. Any remote peer acting as the proxy can arm this with a protocol-legal response: answering the method negotiation with NO ACCEPTABLE METHODS (0xFF), sending a bad version byte, returning a non-success REP in the CONNECT reply, or simply stalling until CONFIG_NET_SOCKETS_CONNECT_TIMEOUT expires all make socks5_tcp_connect() return an error while the callbacks stay installed. The dangling pointer is then dereferenced asynchronously from the networking threads: tcp_conn_close() in subsys/net/ip/tcp.c invokes context->recv_cb() on FIN, RST or timeout, and the callback memset()s through the stale pointer, while any further data on the socket reaches net_context_packet_received() and makes net_pkt_read() write peer-supplied bytes there. The result is a write of two to four bytes (zeroes on the teardown path, peer-chosen bytes on the data path) into a stack region of the thread that called connect(), at a moment when that thread may have reused the memory for a live frame. The write address is not attacker-controlled, so the practical impact is limited corruption or a crash rather than a directed memory-write primitive; the author observed it as a SEGV in tcp_conn_close() under CONFIG_ASAN. Only configurations with CONFIG_SOCKS enabled and a SOCKS5 proxy configured on the socket are affected. The fix routes the error returns through a common exit that calls net_context_recv(ctx, NULL, K_NO_WAIT, NULL), uninstalling the callback and the user-data pointer before the stack frame goes away.
来源: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
来源: CVE Program / CVE List V5
Vulnerability Type
无效指针解引用
来源: CVE Program / CVE List V5

受影响产品

厂商 产品 影响版本 CPE 订阅
zephyrproject zephyr 2.0.0 ~ 4.3.2 -

二、漏洞 CVE-2026-95821 的公开POC

# POC 描述 源链接 神龙链接
AI 生成 POC 高级

未找到公开 POC。

登录以生成 AI POC

三、漏洞 CVE-2026-95821 的情报信息

请登录查看更多情报信息。

CVE-2026-95821 其他参考 (3)

同批安全公告 · zephyrproject · 2026-11-29 · 共 10 条

CVE-2026-104378 8.8 HIGH DesignWare I3C驱动 越界写漏洞
CVE-2026-130477 8.8 HIGH 内核线程/栈对象提前释放(释放后使用)
CVE-2026-104376 7.7 HIGH Zephyr内核对象核心释放后写漏洞
CVE-2026-105415 7.0 HIGH ESP32 MCPWM驱动越界写漏洞
CVE-2026-104929 6.5 MEDIUM STM32WBA HCI 远程蓝牙接收活锁
CVE-2026-102961 5.9 MEDIUM Zephyr IPv6/IPv4/6LoWPAN UAF
CVE-2026-104930 5.9 MEDIUM STM32 HAL v2以太网RX丢帧后卡死
CVE-2026-104379 5.9 MEDIUM Zephyr IPv6 释放后使用漏洞
CVE-2026-104377 3.7 LOW Zephyr TFTP客户端越界读漏洞

IV. Related Vulnerabilities