CVE-2026-99371: nfsd: clear XDR padding in GETXATTR replies
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
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.
The Linux kernel CVE team has assigned CVE-2026-99371 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.9 with commit 23e50fe3a5e6045a573c69d4b0e3d78aa6183323 and fixed in 6.12.117 with commit 842e2215a87d062b69d5170840f34fbd83f47b41 Issue introduced in 5.9 with commit 23e50fe3a5e6045a573c69d4b0e3d78aa6183323 and fixed in 6.18.61 with commit 624531ecd48b96be2a94c964685762960bd11208 Issue introduced in 5.9 with commit 23e50fe3a5e6045a573c69d4b0e3d78aa6183323 and fixed in 7.3.2 with commit 99ab5346b69834587b4ae59d1addea5960b50c8b Issue introduced in 5.9 with commit 23e50fe3a5e6045a573c69d4b0e3d78aa6183323 and fixed in 7.4-rc1 with commit daba58690339ae86f1ebeb5197aa1369fae37e57
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-99371
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/842e2215a87d062b69d5170840f34fbd83f47b41 https://git.kernel.org/stable/c/624531ecd48b96be2a94c964685762960bd11208 https://git.kernel.org/stable/c/99ab5346b69834587b4ae59d1addea5960b50c8b https://git.kernel.org/stable/c/daba58690339ae86f1ebeb5197aa1369fae37e57