]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: attr leaf verifier needs to check for obviously bad count
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)
commitf596a90d3d7a03f42cedcbc9b505fefe5da5df08
treef2f3f37a544638a4f50f13be99085546a90d2b69
parentb67317ef3c22d69e0c29a5c624a84dc37e9c6ffd
xfs: attr leaf verifier needs to check for obviously bad count

Source kernel commit: 79a69bf8dc240ebeb105226a8a8540df136bf987

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_attr_leaf.c