diff options
| author | Shota Zaizen <s@zaizen.me> | 2026-04-28 19:02:55 +0900 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-05-01 21:49:35 -0500 |
| commit | 996454bc0da84d5a1dedb1a7861823087e01a7ae (patch) | |
| tree | 8e92bd50df88f179611b0f8292e459f761c9bcfd /scripts/package | |
| parent | 6fd7dd4e44d7840cb1ba0c3a895e9f576af3fe5c (diff) | |
ksmbd: validate inherited ACE SID length
smb_inherit_dacl() walks the parent directory DACL loaded from the
security descriptor xattr. It verifies that each ACE contains the fixed
SID header before using it, but does not verify that the variable-length
SID described by sid.num_subauth is fully contained in the ACE.
A malformed inheritable ACE can advertise more subauthorities than are
present in the ACE. compare_sids() may then read past the ACE.
smb_set_ace() also clamps the copied destination SID, but used the
unchecked source SID count to compute the inherited ACE size. That could
advance the temporary inherited ACE buffer pointer and nt_size accounting
past the allocated buffer.
Fix this by validating the parent ACE SID count and SID length before
using the SID during inheritance. Compute the inherited ACE size from the
copied SID so the size matches the bounded destination SID. Reject the
inherited DACL if size accumulation would overflow smb_acl.size or the
security descriptor allocation size.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Shota Zaizen <s@zaizen.me>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'scripts/package')
0 files changed, 0 insertions, 0 deletions
