]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: always verify the magic number in xattr blocks
authorTheodore Ts'o <tytso@mit.edu>
Wed, 13 Jun 2018 04:51:28 +0000 (00:51 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 13 Jun 2018 04:51:28 +0000 (00:51 -0400)
commit29a298a0a0d7857c51e61c64546b4e47e3e1fa33
tree9bbb2fb100f1e49d7f04d365842c0b2670ac03d0
parentdd16bb9ba0b0367aee762eb715d8f0cbf7693cd4
ext4: always verify the magic number in xattr blocks

If there an inode points to a block which is also some other type of
metadata block (such as a block allocation bitmap), the
buffer_verified flag can be set when it was validated as that other
metadata block type; however, it would make a really terrible external
attribute block.  The reason why we use the verified flag is to avoid
constantly reverifying the block.  However, it doesn't take much
overhead to make sure the magic number of the xattr block is correct,
and this will avoid potential crashes.

This addresses CVE-2018-10879.

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

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Cc: stable@kernel.org
fs/ext4/xattr.c