Whamcloud - gitweb
libext2fs: add sanity checks for ea_in_inode
authorTheodore Ts'o <tytso@mit.edu>
Sat, 7 Apr 2018 04:28:49 +0000 (00:28 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 9 Apr 2018 15:34:13 +0000 (11:34 -0400)
commit635300c774f4c760baf7c9f8891023df66cd12a2
treeb324e52e965d9396d6a69bdc00bb6b26885a3665
parent23b748563cb6d8c000fd7411bd5a4df96d535ecd
libext2fs: add sanity checks for ea_in_inode

An inode containing the value for an extended attribute (aka an
ea_in_inode) must not have the INLINE_DATA flag and must have the
EA_INODE flag set.  Enforcing this prevents e2fsck and debugfs crashes
caused by a maliciously crafted file system containing an inode which
has both the EA_INODE and INLINE_DATA flags set, and where that inode
has an extended attribute whose e_value_inum points to itself.

Reported-by: Wen Xu <wen.xu@gatech.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 9db53e3fec3413572a2240bd374e76353fab9cbe)
e2fsck/pass1.c
lib/ext2fs/ext2_err.et.in
lib/ext2fs/ext_attr.c