Re: [PATCH] ksmbd: count the ACL header when bounding the DACL size

From: Namjae Jeon

Date: Fri Nov 20 2026 - 05:22:51 EST


On Fri, Nov 20, 2026 at 4:20 AM Ian Bridges <icb@xxxxxxxxxxxx> wrote:
>
> set_posix_acl_entries_dacl() and set_ntacl_dacl() stop adding ACEs when
> their total size would no longer fit in 16 bits. The 8-byte ACL header
> is added to that total afterwards, so when the ACEs take 65528 to 65535
> bytes, the DACL size wraps to a value below 8. A POSIX ACL with about
> 1800 entries is enough, and tmpfs and XFS can hold one. The security
> descriptor built for a new file is then stored cut off before its DACL,
> and a query returns DACL_PRESENT with no DACL, which reads as a NULL
> DACL.
>
> Leave room for the header when bounding the ACEs.
>
> Fixes: 299f962c0b02 ("ksmbd: use check_add_overflow() to prevent u16 DACL size overflow")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Ian Bridges <icb@xxxxxxxxxxxx>
Applied it to #ksmbd-for-next.
Thanks!