{"id":"CVE-2026-99399","state":"PUBLISHED","title":"xfs: reject remote xattr entries with an out-of-range value length","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfs: reject remote xattr entries with an out-of-range value length\n\nxfs_attr3_leaf_verify_entry() validates a remote attribute entry's name\nbut never bounds its on-disk value length (xfs_attr_leaf_name_remote.\nvaluelen, a __be32). A crafted leaf with valuelen = 0x80000000 passes\nthe verifier and the CRC.\n\nThat length is later assigned into the signed int args->rmtvaluelen\n(xfs_attr3_leaf_getvalue), becoming negative, which slips past the signed\n-ERANGE check in xfs_attr_copy_value(); a getxattr() with a small buffer\nthen memcpy()s a full remote block into the small kvalue buffer\n(xfs_attr_rmtval_copyout) -- a heap out-of-bounds write with\nattacker-controlled content, from an unprivileged getxattr(2) on a\nmounted crafted image.\n\nReject remote entries whose value length exceeds XFS_XATTR_SIZE_MAX in\nthe leaf verifier, so the malicious block is rejected at read time.","publishedAt":"2026-11-19T14:23:36.794Z","updatedAt":"2026-11-22T11:08:05.160Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c84760659dcf237902d4cc997cd5f55cb3b2807f","status":"affected","lessThan":"56b701b3c272f143bb5f6a346bfbb1fe28ee14b1","versionType":"git"},{"version":"c84760659dcf237902d4cc997cd5f55cb3b2807f","status":"affected","lessThan":"97b85a593188f63e133883525c9159f77e660197","versionType":"git"},{"version":"c84760659dcf237902d4cc997cd5f55cb3b2807f","status":"affected","lessThan":"1481b4644cd640f0a603d97ced300a1fbd7d3a94","versionType":"git"},{"version":"c84760659dcf237902d4cc997cd5f55cb3b2807f","status":"affected","lessThan":"15ccd92a782a0253f4a17895f3d3f71e5c1d1973","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/xfs/libxfs/xfs_attr_leaf.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.5","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/xfs/libxfs/xfs_attr_leaf.c"]}],"references":["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"],"weaknesses":[],"ingestedAt":"2026-11-22T11:18:06.032Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99399.json","commit":"247cc9beefd85903834df0592e88a44f4d599223","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99399","state":"PUBLISHED","datePublished":"2026-11-19T14:23:36.794Z","dateUpdated":"2026-11-22T11:08:05.160Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.412Z"},"containers":{"cna":{"title":"xfs: reject remote xattr entries with an out-of-range value length","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfs: reject remote xattr entries with an out-of-range value length\n\nxfs_attr3_leaf_verify_entry() validates a remote attribute entry's name\nbut never bounds its on-disk value length (xfs_attr_leaf_name_remote.\nvaluelen, a __be32). A crafted leaf with valuelen = 0x80000000 passes\nthe verifier and the CRC.\n\nThat length is later assigned into the signed int args->rmtvaluelen\n(xfs_attr3_leaf_getvalue), becoming negative, which slips past the signed\n-ERANGE check in xfs_attr_copy_value(); a getxattr() with a small buffer\nthen memcpy()s a full remote block into the small kvalue buffer\n(xfs_attr_rmtval_copyout) -- a heap out-of-bounds write with\nattacker-controlled content, from an unprivileged getxattr(2) on a\nmounted crafted image.\n\nReject remote entries whose value length exceeds XFS_XATTR_SIZE_MAX in\nthe leaf verifier, so the malicious block is rejected at read time."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c84760659dcf237902d4cc997cd5f55cb3b2807f","status":"affected","lessThan":"56b701b3c272f143bb5f6a346bfbb1fe28ee14b1","versionType":"git"},{"version":"c84760659dcf237902d4cc997cd5f55cb3b2807f","status":"affected","lessThan":"97b85a593188f63e133883525c9159f77e660197","versionType":"git"},{"version":"c84760659dcf237902d4cc997cd5f55cb3b2807f","status":"affected","lessThan":"1481b4644cd640f0a603d97ced300a1fbd7d3a94","versionType":"git"},{"version":"c84760659dcf237902d4cc997cd5f55cb3b2807f","status":"affected","lessThan":"15ccd92a782a0253f4a17895f3d3f71e5c1d1973","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/xfs/libxfs/xfs_attr_leaf.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.5","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/xfs/libxfs/xfs_attr_leaf.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/56b701b3c272f143bb5f6a346bfbb1fe28ee14b1"},{"url":"https://git.kernel.org/stable/c/97b85a593188f63e133883525c9159f77e660197"},{"url":"https://git.kernel.org/stable/c/1481b4644cd640f0a603d97ced300a1fbd7d3a94"},{"url":"https://git.kernel.org/stable/c/15ccd92a782a0253f4a17895f3d3f71e5c1d1973"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The malformed input is the on-disk __be32 xfs_attr_leaf_name_remote.valuelen. xfs_attr3_leaf_read_verify() accepts the leaf because xfs_attr3_leaf_verify_entry() checks the name and valueblk but, before this fix, not valuelen. do_getxattr() and get_vfs_caps_from_disk() pass only a name and a short buffer.\nAC:L - The attacker sets that valuelen to 0x80000000, points valueblk at a remote block, and gives the block a header xfs_attr3_rmt_hdr_ok() accepts. xfs_attr3_leaf_getvalue() stores the __be32 in signed args->rmtvaluelen, the signed comparison in xfs_attr_copy_value() does not reject it, and xfs_attr_rmtval_copyout() copies one remote payload on every such get.\nPR:N - The attacker needs no host credential. After the victim mounts the image, cap_bprm_creds_from_file() calls get_vfs_caps_from_disk(), and that __vfs_getxattr(XATTR_NAME_CAPS) copies into a 24-byte stack buffer with no capability check. inode_doinit_use_xattr() likewise calls __vfs_getxattr(XATTR_NAME_SELINUX) into a 255-byte buffer during d_instantiate.\nUI:R - The out-of-range valuelen cannot be created by setxattr; it has to be planted in the leaf of a crafted image. mount_capable() requires capable(CAP_SYS_ADMIN) for XFS, so a privileged user must mount that image before xfs_attr_node_get() will read the leaf.\nS:U - The memcpy destination is a kernel buffer in the kernel that mounted the image (vfs_ns_cap_data on the execve stack, or the kvzalloc buffer in do_getxattr), so the corruption and the resulting privilege change stay within that kernel.\nC:H - xfs_attr_rmtval_copyout() memcpy's xfs_attr3_rmt_buf_space() bytes of image-chosen payload over the short destination. That out-of-bounds write can replace neighboring kernel pointers and is usable as a disclosure primitive.\nI:H - The destination is smaller than one remote block: 24 bytes in get_vfs_caps_from_disk(), or the exact user size kvzalloc'd by do_getxattr(). The controlled memcpy past that object can overwrite a return address or heap metadata and hijack kernel control flow.\nA:H - The overflow corrupts kernel stack or slab memory and panics the system. xfs_attr_rmtval_get() keeps calling xfs_bmapi_read() while the length, converted from the negative rmtvaluelen to unsigned 0x80000000, remains non-zero."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-22T11:08:05.160Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"6.18.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"7.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}