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

CVE-2026-43490 ksmbd继承ACE SID长度验证缺失漏洞

披露日期: 2026-05-15
来源: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

漏洞信息

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

相关标签

Linux KernelksmbdMemory CorruptionOOB ReadBuffer OverflowCVE-2026-43490

漏洞概述

Linux内核的ksmbd驱动程序中存在安全漏洞,源于smb_inherit_dacl()函数在处理继承的自主访问控制列表(DACL)时,未充分验证访问控制项(ACE)中安全标识符(SID)的长度。恶意构造的ACE可误导系统读取越界数据或导致缓冲区溢出,从而可能引发拒绝服务或更严重的后果。

技术细节

该漏洞位于ksmbd处理文件权限继承的逻辑中。当在父目录下创建新对象时,smb_inherit_dacl()会遍历父目录的DACL。虽然它检查了ACE的固定头,但未验证sid.num_subauth字段指定的子授权数量是否实际包含在ACE数据区中。攻击者可设置过大的num_subauth值。当compare_sids()处理此SID时,会读取ACE边界之外的内存(越界读)。同时,smb_set_ace()利用未校验的计数计算大小,导致在复制继承的ACE时写入超出预分配缓冲区的数据(缓冲区溢出)。这可能导致内核崩溃或潜在的代码执行。

攻击链分析

STEP 1
侦察与访问
攻击者通过网络访问开启了ksmbd服务的Linux服务器。
STEP 2
恶意构造
攻击者创建一个特制的目录,并设置一个包含畸形ACE(SID长度字段与实际数据不符)的安全描述符。
STEP 3
触发继承
攻击者在该特制目录下尝试创建新文件或子目录,触发ksmbd的权限继承逻辑。
STEP 4
漏洞利用
smb_inherit_dacl()函数处理畸形ACE,导致越界读取或缓冲区溢出,可能造成内核崩溃(DoS)或潜在的代码执行。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# PoC Concept: Creating a malformed ACE to trigger OOB read in ksmbd # This is a conceptual demonstration and requires interaction with a vulnerable ksmbd server. import socket import struct # Malformed SID structure with excessive subauthority count # SID: Revision (1 byte), SubAuthCount (1 byte), Authority (6 bytes), SubAuthorities (4 bytes each) # We set SubAuthCount to a high value (e.g., 255) but provide fewer bytes. def build_malformed_sid(): revision = 1 sub_auth_count = 255 # Malformed: Claiming 255 sub-auths authority = b'\x00\x00\x00\x00\x00\x05' # Example Authority (NT Authority) # We provide only 1 sub-authority, but claim 255 sub_authorities = struct.pack('<I', 1234) return struct.pack('<BB6s', revision, sub_auth_count, authority) + sub_authorities # This SID would be placed inside an ACE within a Security Descriptor # sent to the server to set on a parent directory. # When a child is created, ksmbd attempts to inherit this ACE, # triggering the vulnerability. malformed_sid = build_malformed_sid() print(f"Generated malformed SID length: {len(malformed_sid)}") # Further implementation would involve wrapping this in an SMB2 CREATE request # with a specific security descriptor context.

影响范围

Linux Kernel (ksmbd) < 6.x (具体修复版本见Git提交)

防御指南

临时缓解措施
限制对SMB服务端口的网络访问,仅允许可信IP连接;在内核升级前,可考虑禁用ksmbd服务以降低风险。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表