summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorAldo Ariel Panzardo <qwe.aldo@gmail.com>2026-09-15 13:00:22 -0300
committerChuck Lever <cel@kernel.org>2026-10-11 23:11:47 -0400
commitb01319947c69b0e3ea0fcd4b675eb892f9cad8a0 (patch)
treee45367e26f8422710ae46275fe2a600898a4834a /rust/kernel/alloc
parentcfcfe0b38a66bbc4122c78a2b75e1b97b3534761 (diff)
NFSD: copy SETXATTR data from all XDR buffer segments
nfsd4_vbuf_from_vector() manually copies the head followed by whole pages starting at offset zero. This assumes that all remaining data starts at the beginning of the page array and that no data is stored in the tail. However, nfsd4_decode_setxattr() passes an xdr_buf returned by xdr_stream_subsegment(). Such a sub-buffer can have a nonzero page_base and can span its page and tail segments. Ignoring that layout can copy the wrong bytes into the value passed to vfs_setxattr(). Use read_bytes_from_xdr_buf(), which observes the complete xdr_buf layout. Fixes: c1346a1216ab ("NFSD: Replace the internals of the READ_BUF() macro") 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/20260915160022.3105295-1-qwe.aldo@gmail.com Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions