CVE-2026-99399: xfs: reject remote xattr entries with an out-of-range value length
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
xfs: reject remote xattr entries with an out-of-range value length
xfs_attr3_leaf_verify_entry() validates a remote attribute entry's name but never bounds its on-disk value length (xfs_attr_leaf_name_remote. valuelen, a __be32). A crafted leaf with valuelen = 0x80000000 passes the verifier and the CRC.
That length is later assigned into the signed int args->rmtvaluelen (xfs_attr3_leaf_getvalue), becoming negative, which slips past the signed -ERANGE check in xfs_attr_copy_value(); a getxattr() with a small buffer then memcpy()s a full remote block into the small kvalue buffer (xfs_attr_rmtval_copyout) -- a heap out-of-bounds write with attacker-controlled content, from an unprivileged getxattr(2) on a mounted crafted image.
Reject remote entries whose value length exceeds XFS_XATTR_SIZE_MAX in the leaf verifier, so the malicious block is rejected at read time.
The Linux kernel CVE team has assigned CVE-2026-99399 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.5 with commit c84760659dcf237902d4cc997cd5f55cb3b2807f and fixed in 6.12.117 with commit 56b701b3c272f143bb5f6a346bfbb1fe28ee14b1 Issue introduced in 5.5 with commit c84760659dcf237902d4cc997cd5f55cb3b2807f and fixed in 6.18.61 with commit 97b85a593188f63e133883525c9159f77e660197 Issue introduced in 5.5 with commit c84760659dcf237902d4cc997cd5f55cb3b2807f and fixed in 7.3.2 with commit 1481b4644cd640f0a603d97ced300a1fbd7d3a94 Issue introduced in 5.5 with commit c84760659dcf237902d4cc997cd5f55cb3b2807f and fixed in 7.4-rc1 with commit 15ccd92a782a0253f4a17895f3d3f71e5c1d1973
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-99399
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/xfs/libxfs/xfs_attr_leaf.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/56b701b3c272f143bb5f6a346bfbb1fe28ee14b1 https://git.kernel.org/stable/c/97b85a593188f63e133883525c9159f77e660197 https://git.kernel.org/stable/c/1481b4644cd640f0a603d97ced300a1fbd7d3a94 https://git.kernel.org/stable/c/15ccd92a782a0253f4a17895f3d3f71e5c1d1973