]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: directory scrubber must walk through data block to offset
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 27 Feb 2018 04:43:18 +0000 (22:43 -0600)
committerEric Sandeen <sandeen@redhat.com>
Tue, 27 Feb 2018 04:43:18 +0000 (22:43 -0600)
commitb67317ef3c22d69e0c29a5c624a84dc37e9c6ffd
treed309ef7e48fa9d79cb3b4413e6515fe1f484c37d
parent221b1ddc29415a673750665696f95990c53d8d2e
xfs: directory scrubber must walk through data block to offset

Source kernel commit: ce92d29ddf9908d397895c46b7c78e9db8df414d

In xfs_scrub_dir_rec, we must walk through the directory block entries
to arrive at the offset given by the hash structure.  If we blindly
trust the hash address, we can end up midway into a directory entry and
stray outside the block.  Found by lastbit fuzzing lents[3].address in
xfs/390 with KASAN enabled.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_dir2.h
libxfs/xfs_dir2_data.c
libxfs/xfs_dir2_sf.c