Re: [PATCH v2] ksmbd: report actual xattr value length in stream enumeration

Namjae Jeon <[email protected]>
Newsgroups org.kernel.vger.linux-cifs
Message-ID <CAKYAXd_eHRx8nm3V=qcp2yE24JBQa1+OHOtEkxHfH5-Cy6X40Q@mail.gmail.com>
On Fri, Jul 10, 2026 at 1:51 AM Gaël Blivet-Bailly
<[email protected]> wrote:
>
> From: Gael Blivet <[email protected]>
>
> get_file_stream_info() (FileStreamInformation QUERY_INFO) reported
> each enumerated stream's StreamSize/StreamAllocationSize as
> stream_name_len -- the byte length of the stream's *name*, not its
> data. This is the same bug class already fixed for EndOfFile/
> AllocationSize on an open stream handle (ksmbd_stream_eof()), just
> missed at this second site: a client enumerating streams sees a size
> derived from the name string length instead of the stream's actual
> content length, inconsistent with what querying the same stream by
> handle reports.
>
> Compute the real value length the same way ksmbd_stream_eof() does,
> via ksmbd_vfs_casexattr_len() on the already-known xattr key.
>
> Signed-off-by: Gael Blivet <[email protected]>
Applied it to #ksmbd-for-next-next.
Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.