]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: strengthen btree pointer checks before use
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 28 Jun 2018 20:11:58 +0000 (15:11 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 28 Jun 2018 20:11:58 +0000 (15:11 -0500)
commit7ab54cd6549e3dcbba3af85f7b41c79e98806c10
tree8b5ca74e82b10c09cda8648be0638cf7869eebbe
parentefa7dddb8261a36b50cafc3b42c7106f917b515b
xfs: strengthen btree pointer checks before use

Source kernel commit: e63a1008ee08334ea6a9c9edb59b1d2763f5b231

Instead of ASSERTing on null btree pointers in xfs_btree_ptr_to_daddr,
use the new block number verifiers to ensure that the btree pointer
doesn't point to any sensitive areas (AG headers, past-EOFS) and return
-EFSCORRUPTED if this is the case.  Remove the ASSERT because on-disk
corruptions shouldn't trigger ASSERTs.

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_btree.c