Re: [PATCH v3 1/2] ksmbd: decode and honor DOS attribute validity flags

From: Namjae Jeon

Date: Mon Nov 16 2026 - 06:50:35 EST


On Mon, Nov 16, 2026 at 11:14 AM Ian Bridges <icb@xxxxxxxxxxxx> wrote:
>
> Hi,
>
> On Sun, Nov 15, 2026 at 04:53:07PM +0100, koraynilay wrote:
> > Currently, when setting file attributes via FSCTL_SET_SPARSE,
> > FSCTL_SET_COMPRESSION, or FileBasicInformation, ksmbd hardcodes
> > flags = 0x51 (XATTR_DOSINFO_ATTRIB | XATTR_DOSINFO_CREATE_TIME |
> > XATTR_DOSINFO_ITIME). This injects unrequested creation time and itime
> > into user.DOSATTRIB on disk, even though the client only requested an
> > attribute modification.
>
> I tested both patches with the server code of ksmbd-for-next
> (3bc1fb9c3b20). Files whose xattr older ksmbd left without the creation
> time flag now report their stored creation time and attributes, and a
> rewrite sets the flag again. A file created over SMB keeps its flags and
> itime when it is made sparse or compressed. A creation time set through
> a second handle survives a later sparse request through the first.
> smbtorture gives the same results as without the series, and KASAN
> reports nothing.
>
> Reviewed-by: Ian Bridges <icb@xxxxxxxxxxxx>
> Tested-by: Ian Bridges <icb@xxxxxxxxxxxx>
Applied it to #ksmbd-for-next.
Thanks!