]> git.baikalelectronics.ru Git - kernel.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)
commit8ad7e7fb11af941b6aa16c2ff7d3f92af4f7c60b
tree2a18adb887525e1d5c89aa99f7174db417620324
parent14ca4502d567efb5359764daac0e97cb60238e3f
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