CVE-2026-99370 PUBLISHED

NFSD: copy SETXATTR data from all XDR buffer segments

Assigner: Linux
Reserved: 25.09.2026 Published: 19.11.2026 Updated: 22.11.2026

In the Linux kernel, the following vulnerability has been resolved:

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.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H
CVSS Score: 9.4

AV:N - The OP_SETXATTR xattr value is attacker-controlled XDR inside an NFSv4.2 COMPOUND. nfs4svc_decode_compoundargs calls nfsd4_decode_setxattr, which takes the value with xdr_stream_subsegment() from rq_arg filled by svc_tcp_recvfrom or svc_rdma_recvfrom and passes that sub-buffer to nfsd4_vbuf_from_vector. SUNRPC on TCP port 2049 is routable. AC:L - The client chooses the COMPOUND offset of the value and, for a single Read chunk, the position and length that svc_rdma_read_complete_one splits into rq_arg.pages and rq_arg.tail. A nonzero page_base, or a value that continues from the chunk into that tail, makes the pre-fix walk in nfsd4_vbuf_from_vector copy the wrong bytes on every send. PR:N - nfsd_dispatch reaches the decoder only after svcauth_unix_accept returns SVC_OK. That path records the uid and gid from the AUTH_SYS credential and accepts an empty AUTH_NULL verifier. nfsd4_vbuf_from_vector then runs inside nfsd4_decode_setxattr, before nfsd_setxattr calls fh_verify. UI:N - The client triggers nfsd4_decode_setxattr by sending the COMPOUND, and the Read chunk if it uses one, on its own connection. No second party has to mount an export, open a file, or answer a prompt. S:U - The memcpy in nfsd4_vbuf_from_vector and the later __vfs_setxattr_locked of that buffer both affect only the nfsd host kernel and the exported inode's user xattr, which is the same security authority as the server. C:H - When the value extends past the Read-chunk page_len into the tail built by svc_rdma_read_complete_one, nfsd4_vbuf_from_vector copies the overrun from the following rq_pages entry. svc_fill_pages obtains those pages with alloc_pages_bulk(GFP_KERNEL) and does not zero them, and a completed SETXATTR is readable back with GETXATTR. The overrun is the tail fragment, up to the 4096-byte default inline threshold. I:L - nfsd_setxattr feeds the mis-copied buffer to __vfs_setxattr_locked as the value of the user.* name built in nfsd4_decode_xattr_name, with length setxa_len. svcxdr_tmpalloc sizes the destination to that length, so the modification is that one attribute. A:H - A Read chunk that fills every svc_serv_maxpages slot of rq_pages leaves rq_pages[rq_maxpages] NULL from kcalloc. A value that begins on the last chunk page and spills into the tail makes nfsd4_vbuf_from_vector pass that NULL to page_address, and memcpy from page_to_virt(NULL) faults in kernel context.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from c1346a1216ab5cb04a265380ac9035d91b16b6d5 to 019cf7e0eebf6dc14b465cc984390b41c854da69 (excl.)
  • affected from c1346a1216ab5cb04a265380ac9035d91b16b6d5 to 20b76bdbd029343ea98944cb88bf016da2371739 (excl.)
  • affected from c1346a1216ab5cb04a265380ac9035d91b16b6d5 to fea77ec4a37614cbbe4fb26c621227182439f487 (excl.)
  • affected from c1346a1216ab5cb04a265380ac9035d91b16b6d5 to b01319947c69b0e3ea0fcd4b675eb892f9cad8a0 (excl.)
  • Version bbb0a710a2c7a0b171e7a0d6fbdd6d5a2acd003b is affected
  • affected from 5.10.220 to 5.11 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 5.11 is affected
  • unaffected from 0 to 5.11 (excl.)
  • unaffected from 6.12.117 to 6.12.* (incl.)
  • unaffected from 6.18.61 to 6.18.* (incl.)
  • unaffected from 7.3.2 to 7.3.* (incl.)
  • unaffected from 7.4-rc1 to * (incl.)

References