• Jan Kara's avatar
    ext4: fix xattr shifting when expanding inodes part 2 · 418c12d0
    Jan Kara authored
    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: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    418c12d0
xattr.c 48.3 KB