ext4: ignore e_value_offs for xattrs with value-in-ea-inode
authorTheodore Ts'o <tytso@mit.edu>
Wed, 10 Apr 2019 04:37:36 +0000 (00:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 May 2019 05:37:42 +0000 (07:37 +0200)
commitf0f805f8b9e72be1d77bc1cc6f85eab0c3fd637a
tree9bf082837ccb69e9175d6117924b1e02dff88fc0
parent71478ef67d7c39ba735c07ce3e39eae21ad8681a
ext4: ignore e_value_offs for xattrs with value-in-ea-inode

commit e5d01196c0428a206f307e9ee5f6842964098ff0 upstream.

In other places in fs/ext4/xattr.c, if e_value_inum is non-zero, the
code ignores the value in e_value_offs.  The e_value_offs *should* be
zero, but we shouldn't depend upon it, since it might not be true in a
corrupted/fuzzed file system.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202897
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202877
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