]> git.baikalelectronics.ru Git - kernel.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)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 11 Aug 2016 15:58:32 +0000 (11:58 -0400)
commit56cda74cbdad5063b0d899fa70d115cffb9be8a3
treec84aef7969bd10258a47e545e926a548d5a16f01
parent2f30a98ba8cd455723d3f1740df7413c0c6644a8
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>
fs/ext4/xattr.c