]> asedeno.scripts.mit.edu Git - linux.git/commit
xfs: attr leaf verifier needs to check for obviously bad count
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 17 Jan 2018 02:54:12 +0000 (18:54 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 18 Jan 2018 05:00:46 +0000 (21:00 -0800)
commit79a69bf8dc240ebeb105226a8a8540df136bf987
tree2a18adb887525e1d5c89aa99f7174db417620324
parentce92d29ddf9908d397895c46b7c78e9db8df414d
xfs: attr leaf verifier needs to check for obviously bad count

In the attribute leaf verifier, we can check for obviously bad values of
firstused and count so that later attempts at lasthash don't run off the
end of the memory buffer.  Found by ones fuzzing hdr.count in xfs/400 with
KASAN.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/libxfs/xfs_attr_leaf.c