提交 2de58f11 编写于 作者: J Jan Kara 提交者: Theodore Ts'o

ext4: Check that external xattr value block is zero

Currently we don't support xattrs with values stored out of line. Check
for that in ext4_xattr_check_names() to make sure we never work with
such xattrs since not all the code counts with that resulting is possible
weird corruption issues.
Signed-off-by: NJan Kara <jack@suse.cz>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 e3014d14
...@@ -199,6 +199,8 @@ ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end, ...@@ -199,6 +199,8 @@ ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end,
} }
while (!IS_LAST_ENTRY(entry)) { while (!IS_LAST_ENTRY(entry)) {
if (entry->e_value_block != 0)
return -EFSCORRUPTED;
if (entry->e_value_size != 0 && if (entry->e_value_size != 0 &&
(value_start + le16_to_cpu(entry->e_value_offs) < (value_start + le16_to_cpu(entry->e_value_offs) <
(void *)e + sizeof(__u32) || (void *)e + sizeof(__u32) ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册