]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: check EA value offset when loading
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 16 Sep 2014 18:34:59 +0000 (14:34 -0400)
committerJiri Slaby <jslaby@suse.cz>
Thu, 13 Nov 2014 18:02:33 +0000 (19:02 +0100)
commit2d550cd1fcb6816e8f41c46f19802d57daa9762f
tree7395f603a91e2c391a1a4b490bd128cbf03dde5c
parent3a7fa65d2e144ff488dc2145fea70ef42ae1bdfb
ext4: check EA value offset when loading

commit a0626e75954078cfacddb00a4545dde821170bc5 upstream.

When loading extended attributes, check each entry's value offset to
make sure it doesn't collide with the entries.

Without this check it is easy to crash the kernel by mounting a
malicious FS containing a file with an EA wherein e_value_offs = 0 and
e_value_size > 0 and then deleting the EA, which corrupts the name
list.

(See the f_ea_value_crash test's FS image in e2fsprogs for an example.)

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/ext4/xattr.c