]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: fix xattr shifting when expanding inodes part 2
authorJan Kara <jack@suse.cz>
Thu, 11 Aug 2016 15:58:32 +0000 (11:58 -0400)
committerBrian Maly <brian.maly@oracle.com>
Tue, 21 Aug 2018 19:05:49 +0000 (15:05 -0400)
commitf06e2cc2fa65df12b2823fd3aa9050a82794a74b
treebaa8c99d1d4f7a977e41f8b42e33241b87cb7bf1
parent2c4e2414ae9300a39a9e075467b1100127f830ca
ext4: fix xattr shifting when expanding inodes part 2

When multiple xattrs need to be moved out of inode, we did not properly
recompute total size of xattr headers in the inode and the new header
position. Thus when moving the second and further xattr we asked
ext4_xattr_shift_entries() to move too much and from the wrong place,
resulting in possible xattr value corruption or general memory
corruption.

CC: stable@vger.kernel.org # 4.4.x
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 418c12d08dc64a45107c467ec1ba29b5e69b0715)

Orabug: 25718971

Signed-off-by: Shuning Zhang <sunny.s.zhang@oracle.com>
Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
fs/ext4/xattr.c