summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHang Nan <2122295973@qq.com>2026-08-17 09:52:45 +0900
committerNamjae Jeon <linkinjeon@kernel.org>2026-08-17 22:38:26 +0900
commit79decd88dd3f0d42e7fb0689b1a7853bfa302459 (patch)
tree9d42dcb69396d160b6e9f0646f66edc397fc0f43 /scripts
parentf7157d148d05a800a9a24028266f8f821f8b2b98 (diff)
downloadlinux-79decd88dd3f0d42e7fb0689b1a7853bfa302459.tar.gz
linux-79decd88dd3f0d42e7fb0689b1a7853bfa302459.zip
ksmbd: bound smb_check_perm_dacl() ACE walks by DACL size
smb_check_perm_dacl() validates that the DACL fits inside the NT security descriptor, but then bounds its two ACE walks by the remaining NTSD length (acl_size) rather than the DACL's declared size (pdacl_size). When pdacl->size is smaller than the trailing NTSD buffer, bytes after the declared DACL boundary - still inside the stored security descriptor - are parsed as ACEs during access checks. A crafted DACL can place an access-granting ACE beyond pdacl->size, and the current code accepts it during SMB2_CREATE access validation, while parse_dacl() and smb_inherit_dacl() stop at pdacl_size. Bound both ACE walks by pdacl_size to match the DACL boundary semantics used elsewhere in the server. Validation: - semantic KUnit harness shows the post-boundary ACE is selected before the fix and rejected (EACCES) after it - linux master (7.2-rc6), x86_64 Fixes: 8f0541186e9a ("ksmbd: fix heap-based overflow in set_ntacl_dacl()") Signed-off-by: Hang Nan <2122295973@qq.com> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions