xfs: verify free block header fields
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 2 Feb 2017 23:14:00 +0000 (15:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 07:30:31 +0000 (09:30 +0200)
commit3d2bd2fd5cbaf3d4e0f0642030cd7d21facb07e7
tree128662444ca85ee06107bb5dcb2aa6507d72c48e
parent4056a74aafba368f763d5dd7ab92a5d74e098c1e
xfs: verify free block header fields

commit de14c5f541e78c59006bee56f6c5c2ef1ca07272 upstream.

Perform basic sanity checking of the directory free block header
fields so that we avoid hanging the system on invalid data.

(Granted that just means that now we shutdown on directory write,
but that seems better than hanging...)

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/libxfs/xfs_dir2_node.c