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,
	stable@vger.kernel.org, Ian Bridges <icb@fastmail.org>
Subject: Re: [PATCH] ksmbd: fix timestamp corruption on special values
Date: Wed, 11 Nov 2026 21:11:57 -0600	[thread overview]
Message-ID: <20261112031157.677256-1-icb@fastmail.org> (raw)
In-Reply-To: <20261111222534.839117-1-koray.fra@gmail.com>

Hi,

On Wed, Nov 11, 2026 at 11:25:34PM +0100, koraynilay wrote:
> When a timestamp is being sent with "-1" or "-2" as its value because it
> should be ignored, as specified in MS-FSCC 2.4.7 FileBasicInformation,
> ksmbd would clobber it in both the xattr and on-disk value by setting it
> to -1.

I tested this with the ksmbd code from ksmbd-for-next. Before the
patch, setting any of the four times to -1 or -2 stored that value.
The access and write times on disk moved to 1901, and the creation
time in the DOS attribute xattr was overwritten. With the patch, -1
and -2 leave every time unchanged, and valid times are still set as
before. smbtorture confirms the result in the commit message, the rest
of its results are unchanged, and KASAN reports nothing.

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

      reply	other threads:[~2026-11-12  3:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 22:25 koraynilay
2026-11-12  3:11 ` Ian Bridges [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=20261112031157.677256-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=stable@vger.kernel.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®