ext4: add extra checks to ext4_xattr_block_get()
authorTheodore Ts'o <tytso@mit.edu>
Sat, 31 Mar 2018 00:04:11 +0000 (20:04 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 31 Mar 2018 00:04:11 +0000 (20:04 -0400)
commit54dd0e0a1b255f115f8647fc6fb93273251b01b9
tree36f9de7bca64d5ec2459c6d3d9255fea76ea40fa
parent9496005d6ca4cf8f5ee8f828165a8956872dc59d
ext4: add extra checks to ext4_xattr_block_get()

Add explicit checks in ext4_xattr_block_get() just in case the
e_value_offs and e_value_size fields in the the xattr block are
corrupted in memory after the buffer_verified bit is set on the xattr
block.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/xattr.c
fs/ext4/xattr.h