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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:31 +0000 (09:36 +0200)
commite7793f2a2ac85f912690a69f7964907e31731ae7
tree3f826f3469cc1c1b7f92a958139a41dbe9414944
parent9703952178f1412b7a74e170298d58e96c53152f
ext4: add extra checks to ext4_xattr_block_get()

commit 54dd0e0a1b255f115f8647fc6fb93273251b01b9 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/xattr.c
fs/ext4/xattr.h