Re: [PATCH] NFSD: copy SETXATTR data from all XDR buffer segments

From: Chuck Lever

Date: Tue Sep 15 2026 - 15:12:45 EST


On Tue, 15 Sep 2026 13:00:22 -0300, Aldo Ariel Panzardo wrote:
> 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().
>
> [...]

Applied to nfsd-testing, thanks!

[1/1] NFSD: copy SETXATTR data from all XDR buffer segments
commit: e551e7dde7b82be0d3e6b848c9c5fef728d020dd

--
Chuck Lever