summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorAldo Ariel Panzardo <qwe.aldo@gmail.com>2026-09-23 08:58:23 -0300
committerCarlos Maiolino <cem@kernel.org>2026-10-08 19:25:49 +0200
commit15ccd92a782a0253f4a17895f3d3f71e5c1d1973 (patch)
tree3bab8c635d36b1b11f11af210631cc3fc8117440 /tools/lib/python
parent0643549ffecaeb716c0b75590a9b76dfa5eb35b3 (diff)
downloadlinux-next-15ccd92a782a0253f4a17895f3d3f71e5c1d1973.tar.gz
linux-next-15ccd92a782a0253f4a17895f3d3f71e5c1d1973.zip
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. Fixes: c84760659dcf ("xfs: check attribute leaf block structure") Cc: stable@vger.kernel.org Signed-off-by: Aldo Ariel Panzardo <qwe.aldo@gmail.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions