CVE-2026-99370: NFSD: copy SETXATTR data from all XDR buffer segments
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-99370 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.11 with commit c1346a1216ab5cb04a265380ac9035d91b16b6d5 and fixed in 6.12.117 with commit 019cf7e0eebf6dc14b465cc984390b41c854da69 Issue introduced in 5.11 with commit c1346a1216ab5cb04a265380ac9035d91b16b6d5 and fixed in 6.18.61 with commit 20b76bdbd029343ea98944cb88bf016da2371739 Issue introduced in 5.11 with commit c1346a1216ab5cb04a265380ac9035d91b16b6d5 and fixed in 7.3.2 with commit fea77ec4a37614cbbe4fb26c621227182439f487 Issue introduced in 5.11 with commit c1346a1216ab5cb04a265380ac9035d91b16b6d5 and fixed in 7.4-rc1 with commit b01319947c69b0e3ea0fcd4b675eb892f9cad8a0 Issue introduced in 5.10.220 with commit bbb0a710a2c7a0b171e7a0d6fbdd6d5a2acd003b
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99370
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/nfsd/nfs4xdr.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/019cf7e0eebf6dc14b465cc984390b41c854da69 https://git.kernel.org/stable/c/20b76bdbd029343ea98944cb88bf016da2371739 https://git.kernel.org/stable/c/fea77ec4a37614cbbe4fb26c621227182439f487 https://git.kernel.org/stable/c/b01319947c69b0e3ea0fcd4b675eb892f9cad8a0