Re: [PATCH] ksmbd: read create context data at its DataOffset

From: Namjae Jeon

Date: Mon Nov 16 2026 - 09:03:56 EST


On Mon, Nov 16, 2026 at 9:44 PM Ian Bridges <icb@xxxxxxxxxxxx> wrote:
>
> ksmbd reads most create context data at a fixed offset instead of the
> client's DataOffset. When the data starts later, ksmbd reads padding or
> other bytes. For a security descriptor, zero padding can be parsed as
> having no DACL, so CREATE succeeds without applying the client's
> descriptor.
>
> Use DataOffset for security descriptor, extended attribute, lease,
> durable handle, POSIX and allocation size contexts. The context lookup
> already validates DataOffset and DataLength. Check each payload's
> minimum length and keep the existing parser checks. Add
> smb2_context_data() and a structure for the durable reconnect data, and
> remove the request structures that no longer have users. Contexts using
> the usual offset behave as before.
>
> Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
> Fixes: c8efcc786146 ("ksmbd: add support for durable handles v1/v2")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Ian Bridges <icb@xxxxxxxxxxxx>
Applied it to #ksmbd-for-next.
Thanks.