Re: [PATCH] nfsd: clear XDR padding in GETXATTR replies

From: Chuck Lever

Date: Tue Sep 15 2026 - 15:08:38 EST


On Tue, 15 Sep 2026 13:01:19 -0300, Aldo Ariel Panzardo wrote:
> nfsd4_vbuf_to_stream() uses a raw memcpy() for the first fragment of an
> attribute value. xdr_reserve_space() aligns the reservation but does not
> initialize the extra bytes. If the complete value fits in that fragment,
> the loop that clears padding for the final fragment is never entered.
>
> A remote client reading an attribute whose length is not a multiple of
> four can therefore receive one to three stale bytes from the response
> page.
>
> [...]

Applied to nfsd-testing, thanks!

[1/1] nfsd: clear XDR padding in GETXATTR replies
commit: 37f0c2bea92e2c37a3ea0bb93a357336883a84a4

--
Chuck Lever