]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: check the ftype of dot and dotdot directory entries
authorDarrick J. Wong <djwong@kernel.org>
Wed, 18 May 2022 02:48:13 +0000 (22:48 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 18 May 2022 02:48:13 +0000 (22:48 -0400)
commit9887f0ad7f46135b41ea2ffc124ff9bec95b9d74
tree3bb80e3daf2b74e9112b6d17fb0c41c277479980
parent97238aead3cbeea43c5e42e8308d06282ae777a7
xfs_repair: check the ftype of dot and dotdot directory entries

The long-format directory block checking code skips the filetype check
for the '.' and '..' entries, even though they're part of the ondisk
format.  This leads to repair failing to catch subtle corruption at the
start of a directory.

Found by fuzzing bu[0].filetype = zeroes in xfs/386.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/phase6.c