IPBUF安全漏洞报告
English
CVE-2026-8449 CVSS 8.8 高危

CVE-2026-8449 Linux ksmbd远程内存损坏漏洞

披露日期: 2026-05-12

漏洞信息

漏洞编号
CVE-2026-8449
漏洞类型
内存损坏
CVSS评分
8.8 高危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Linux Kernel (ksmbd)

相关标签

Linux KernelksmbdMemory CorruptionRemote Code ExecutionSMBCVE-2026-8449

漏洞概述

Linux内核ksmbd模块在ACL继承路径中存在远程内存损坏漏洞。拥有目录创建权限的攻击者可通过构造畸形SID的恶意DACL触发堆越界读取,进而导致堆损坏。利用该漏洞可造成内核拒绝服务或潜在的内核级代码执行。

技术细节

该漏洞位于Linux内核ksmbd服务器的ACL继承处理逻辑中。漏洞成因是程序未正确校验DACL中SID结构体的num_subauth字段长度。攻击者利用目录创建权限,首先建立SMB连接并创建目录,随后发送SMB2_SET_INFO请求,传入一个精心构造的恶意DACL。该DACL包含一个num_subauth字段异常大的畸形SID。当攻击者在目标目录下创建子文件或子目录时,内核触发ACL继承机制,解析该畸形SID导致堆越界读取。此越界读取可引发后续的堆内存损坏,破坏内核数据结构,从而造成系统崩溃或潜在的内核代码执行。

攻击链分析

STEP 1
Reconnaissance
Identify a target Linux system running the ksmbd SMB server.
STEP 2
Initial Access
Connect to the SMB service (port 445) with valid credentials that have directory creation permissions.
STEP 3
Exploitation Setup
Create a new directory on the share.
STEP 4
Malicious Configuration
Send an SMB2_SET_INFO request to the created directory, setting a DACL containing a malformed SID with an inflated num_subauth field.
STEP 5
Trigger
Create a child file or directory within the parent directory. This forces the kernel to process the inherited ACL, triggering the heap out-of-bounds read and memory corruption.
STEP 6
Impact
Achieve Denial of Service (kernel panic) or potentially execute arbitrary kernel code.

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#!/usr/bin/env python3 """ PoC for CVE-2026-8449: Linux ksmbd Remote Memory Corruption via ACL Inheritance This script demonstrates the logic of triggering the vulnerability by setting a malformed DACL. Note: Actual exploitation requires precise memory layout control. """ import socket import struct # Simplified pseudo-code for the attack flow # 1. Connect to SMB server # 2. Authenticate and get Tree Connect # 3. Create a directory # 4. Craft SMB2_SET_INFO request with a malformed DACL # The DACL contains a SID with an inflated 'num_subauth' field. MALFORMED_SID = b"\x01\x00\x00\x00" + b"\x00\x00\x00\x00" + b"\xFF\xFF" # Example malformed SID structure def trigger_vulnerability(target_ip, username, password): print(f"[*] Connecting to {target_ip}...") # Implementation of SMB handshake and auth would go here (using impacket or similar) print("[*] Creating directory...") # SMB2_CREATE request for a directory print("[*] Setting malicious DACL via SMB2_SET_INFO...") # SMB2_SET_INFO request # SecurityInfo field = 0x04 (DACL_SECURITY_INFORMATION) # Buffer contains the MALFORMED_SID print("[*] Creating child entry to trigger inheritance...") # SMB2_CREATE request inside the previous directory # This triggers ksmbd to parse the parent ACL, leading to OOB Read print("[+] Trigger sent. Check target kernel status.") if __name__ == "__main__": # Usage: python3 poc.py <TARGET_IP> <USER> <PASS> pass

影响范围

Linux Kernel (ksmbd enabled) < Commit 996454bc0da84d5a1dedb1a7861823087e01a7ae

防御指南

临时缓解措施
如果无法立即升级内核,建议禁用ksmbd服务以阻断攻击路径。或者通过网络防火墙限制对TCP 445端口的访问,仅允许可信IP连接。

参考链接