]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: include terminating u32 in size of xattr entries when expanding inodes
authorTheodore Ts'o <tytso@mit.edu>
Wed, 19 Dec 2018 17:28:13 +0000 (12:28 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 19 Dec 2018 17:28:13 +0000 (12:28 -0500)
commitcfa6b99df8586c924a07775835a51b2834729dcb
tree7671de64bfcd4e04b839878dd8793e026e75efe9
parent03fe73e6f32c7282f7e0c3dcfcd835f3ec30b5ae
ext4: include terminating u32 in size of xattr entries when expanding inodes

In ext4_expand_extra_isize_ea(), we calculate the total size of the
xattr header, plus the xattr entries so we know how much of the
beginning part of the xattrs to move when expanding the inode extra
size.  We need to include the terminating u32 at the end of the xattr
entries, or else if there is uninitialized, non-zero bytes after the
xattr entries and before the xattr values, the list of xattr entries
won't be properly terminated.

Reported-by: Steve Graham <stgraham2000@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/xattr.c