Re: [PATCH] ksmbd: reject a security descriptor with OffsetDacl but no DACL_PRESENT

From: Namjae Jeon

Date: Mon Nov 23 2026 - 18:10:03 EST


On Mon, Nov 23, 2026 at 12:56 AM Ian Bridges <icb@xxxxxxxxxxxx> wrote:
>
> parse_sec_desc() returns early when DACL_PRESENT is clear and checks
> nothing else in the descriptor. set_info_sec() then removes the POSIX
> ACLs and stores the descriptor as sent, OffsetDacl included. The
> access check, inheritance and QUERY use the DACL at OffsetDacl without
> looking at DACL_PRESENT. A SET_INFO without the flag can therefore
> store a DACL that was never checked or mapped to the mode, and that
> DACL is enforced.
>
> A descriptor without DACL_PRESENT has no DACL, so its OffsetDacl must
> be zero. Reject a nonzero OffsetDacl in that case with -EINVAL, as
> parse_sec_desc() does for other malformed descriptors.
>
> Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Ian Bridges <icb@xxxxxxxxxxxx>
Applied it to #ksmbd-for-next.
Thanks!