diff options
| author | Aldo Ariel Panzardo <qwe.aldo@gmail.com> | 2026-09-15 13:01:19 -0300 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-10-11 23:11:51 -0400 |
| commit | daba58690339ae86f1ebeb5197aa1369fae37e57 (patch) | |
| tree | 1189f079e3009dbaa773cacc4e266dee28d3a495 /include | |
| parent | 3f1181cb09c85499286c7f462d93530b0ebcafcc (diff) | |
| download | linux-next-daba58690339ae86f1ebeb5197aa1369fae37e57.tar.gz linux-next-daba58690339ae86f1ebeb5197aa1369fae37e57.zip | |
nfsd: clear XDR padding in GETXATTR replies
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.
Encode the first fragment with xdr_encode_opaque_fixed(), matching the
final-fragment path and ensuring that any XDR padding is zeroed.
Fixes: 23e50fe3a5e6 ("nfsd: implement the xattr functions and en/decode logic")
Cc: stable@vger.kernel.org
Signed-off-by: Aldo Ariel Panzardo <qwe.aldo@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260915160119.3105745-1-qwe.aldo@gmail.com
Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
