mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Bridges <icb@fastmail.org>
To: koray.fra@gmail.com
Cc: linkinjeon@kernel.org, senozhatsky@chromium.org, tom@talpey.com,
	chenxiaosong@chenxiaosong.com, hyc.lee@gmail.com,
	linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ian Bridges <icb@fastmail.org>
Subject: Re: [PATCH v3 2/2] ksmbd: decode version 3 fields in ndr_decode_dos_attr()
Date: Sun, 15 Nov 2026 20:14:48 -0600	[thread overview]
Message-ID: <20261116021448.2485495-1-icb@fastmail.org> (raw)
In-Reply-To: <20261115155308.415734-2-koray.fra@gmail.com>

Hi,

On Sun, Nov 15, 2026 at 04:53:08PM +0100, koraynilay wrote:
> When decoding a version 3 user.DOSATTRIB xattr, ndr_decode_dos_attr()
> discards ea_size, size, alloc_size, and change_time into NULL. When the
> xattr is subsequently rewritten, ndr_encode_dos_attr() writes zeros for
> these fields, clobbering their existing values on disk.

I tested this on top of 1/2. A version 3 xattr keeps its flags and its
size fields when ksmbd rewrites it. Without the series the rewrite
cleared the creation time flag and zeroed the sizes. smbtorture gives
the same results as without the series, and KASAN reports nothing.

Reviewed-by: Ian Bridges <icb@fastmail.org>
Tested-by: Ian Bridges <icb@fastmail.org>

  reply	other threads:[~2026-11-16  2:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 15:53 [PATCH v3 1/2] ksmbd: decode and honor DOS attribute validity flags koraynilay
2026-11-15 15:53 ` [PATCH v3 2/2] ksmbd: decode version 3 fields in ndr_decode_dos_attr() koraynilay
2026-11-16  2:14   ` Ian Bridges [this message]
2026-11-16  2:13 ` [PATCH v3 1/2] ksmbd: decode and honor DOS attribute validity flags Ian Bridges

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=20261116021448.2485495-1-icb@fastmail.org \
    --to=icb@fastmail.org \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=hyc.lee@gmail.com \
    --cc=koray.fra@gmail.com \
    --cc=linkinjeon@kernel.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®