CVE-2026-143035: smb: client: validate descriptor headers before query result allocation
In the Linux kernel, the following vulnerability has been resolved:
smb: client: validate descriptor headers before query result allocation
queryinfo() uses the server's returned length instead of the caller's minimum when a dynamic result is requested. A zero-length ACL response can therefore return ZEROSIZEPTR to idmodetocifsacl(), whose ownership-change path reads dacloffset before checking the header size. A KASAN-enabled test shows a read at address 0x20 and a kernel Oops.
Validate the returned range and the caller's minimum before allocating the dynamic result. Keep the reported length zero if validation fails.
Use the security descriptor header size as the minimum in SMB2queryacl(). DACL-only and SACL-only xattr queries do not require owner and group SIDs, so enforcing MINSECDESCLEN would reject short descriptors that these queries could previously return. The rewrite paths validate the required owner/group SIDs and DACL separately before using their contents.
These issues were discovered and fixed by Qihoo 360's Tulongfeng multi-agent system.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the SMB client ACL query and rewrite paths, validate the security descriptor header, returned range, and caller’s minimum before allocating or using descriptor contents; use the security descriptor header size as the minimum in SMB2_query_acl(), validate owner/group SIDs and the DACL separately, and keep the reported length zero if validation fails.
Event History
Frequently Asked Questions
What would an attacker need to exploit this issue?
The attacker would need to control or impersonate an SMB server that a Linux client queries for ACL or security-descriptor information. The server would need to return a malformed, zero-length ACL response that reaches the client’s ownership-change handling path.
What is the observed impact of a successful trigger?
The reported test case causes an invalid kernel read and a kernel Oops. The failure was observed with KASAN reporting a read at address 0x20.
Are DACL-only and SACL-only queries handled differently?
Yes. DACL-only and SACL-only xattr queries can legitimately use shorter descriptors because they do not require owner and group SIDs. The corrected rewrite paths validate the owner and group SIDs and the DACL independently before using them.