mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namjae Jeon <linkinjeon@kernel.org>
To: Ian Bridges <icb@fastmail.org>
Cc: senozhatsky@chromium.org, tom@talpey.com,
	chenxiaosong@chenxiaosong.com,  linux-cifs@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ksmbd: store the security descriptor from a copy
Date: Tue, 17 Nov 2026 19:45:42 +0900	[thread overview]
Message-ID: <CAKYAXd9VH3wkHvDsUXjxpZe9AB-MW7Xh1A+JcbCPL49oty++Jg@mail.gmail.com> (raw)
In-Reply-To: <20261116231923.2587994-1-icb@fastmail.org>

On Tue, Nov 17, 2026 at 8:19 AM Ian Bridges <icb@fastmail.org> wrote:
>
> Storing a security descriptor changes the buffer passed by the caller.
> ksmbd_vfs_set_sd_xattr() adjusts three offsets for the on-disk format in
> place. For SET_INFO, and for CREATE with a security descriptor context,
> this modifies the client's request buffer. Current callers do not reuse
> the descriptor after storing it, but a later reader would find incorrect
> offsets.
>
> Adjust the offsets in a private copy and make the input argument const.
> Reject a length shorter than the descriptor header before copying it.
> This keeps the caller's data intact and preserves the stored format.
>
> Add a KUnit test that checks the input stays unchanged after a
> successful store and after a short length is rejected.
>
> Signed-off-by: Ian Bridges <icb@fastmail.org>
Applied it to #ksmbd-for-next.
Thanks.

      reply	other threads:[~2026-11-17 10:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 23:19 Ian Bridges
2026-11-17 10:45 ` Namjae Jeon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKYAXd9VH3wkHvDsUXjxpZe9AB-MW7Xh1A+JcbCPL49oty++Jg@mail.gmail.com \
    --to=linkinjeon@kernel.org \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=icb@fastmail.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®