]> git.ipfire.org Git - thirdparty/linux.git/commit
xfs: strengthen attr leaf block freemap checking
authorDarrick J. Wong <djwong@kernel.org>
Fri, 23 Jan 2026 17:27:32 +0000 (09:27 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 23 Jan 2026 17:27:32 +0000 (09:27 -0800)
commit27a0c41f33d8d31558d334b07eb58701aab0b3dd
tree12f2ff569dfcd8082ca1c0039e2250de1642a104
parenta165f7e7633ee0d83926d29e7909fdd8dd4dfadc
xfs: strengthen attr leaf block freemap checking

Check for erroneous overlapping freemap regions and collisions between
freemap regions and the xattr leaf entry array.

Note that we must explicitly zero out the extra freemaps in
xfs_attr3_leaf_compact so that the in-memory buffer has a correctly
initialized freemap array to satisfy the new verification code, even if
subsequent code changes the contents before unlocking the buffer.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_attr_leaf.c