ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea()
authorTheodore Ts'o <tytso@mit.edu>
Tue, 22 Mar 2016 20:13:15 +0000 (16:13 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 May 2017 04:19:48 +0000 (21:19 -0700)
commit28320756e78b3e8f1520bc1c34b23a3df452569e
treef620458c8124a0cf5e6b2bb5e49fd1e82d135e7a
parent99e96ce5e3153b3543152d33b5773f34003a8892
ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea()

commit 9e92f48c34eb2b9af9d12f892e2fe1fce5e8ce35 upstream.

We aren't checking to see if the in-inode extended attribute is
corrupted before we try to expand the inode's extra isize fields.

This can lead to potential crashes caused by the BUG_ON() check in
ext4_xattr_shift_entries().

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/xattr.c