Re: [PATCH v3 2/2] ksmbd: decode version 3 fields in ndr_decode_dos_attr()

From: Ian Bridges

Date: Sun Nov 15 2026 - 21:15:03 EST


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@xxxxxxxxxxxx>
Tested-by: Ian Bridges <icb@xxxxxxxxxxxx>