ext4: never move the system.data xattr out of the inode body
authorTheodore Ts'o <tytso@mit.edu>
Sat, 16 Jun 2018 19:40:48 +0000 (15:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Oct 2018 00:01:51 +0000 (17:01 -0700)
commit3a282476161c54df1a2ef1ba664c8a3514ef49f4
tree2bb3afb8d9ced0b7b4361094c9acad86526dcca6
parentbc769c0148cd9820c8db785a2a1298a6489125ae
ext4: never move the system.data xattr out of the inode body

commit 8cdb5240ec5928b20490a2bb34cb87e9a5f40226 upstream.

When expanding the extra isize space, we must never move the
system.data xattr out of the inode body.  For performance reasons, it
doesn't make any sense, and the inline data implementation assumes
that system.data xattr is never in the external xattr block.

This addresses CVE-2018-10880

https://bugzilla.kernel.org/show_bug.cgi?id=200005

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
[groeck: Context changes]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/xattr.c