Re: [02/10] libext2fs: make sure the system.data xattr gets created

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 02, 2018 at 04:59:15PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> Both the kernel and e2fsck expect that if an inode has inline data, then
> it contains a "system.data" xattr -- even if i_size <= 60 so the data
> fits entirely in i_block.
> 
> But if a symlink of exactly 60 bytes (not counting a NUL terminator) was
> created using ext2fs_symlink() and the inline data feature was enabled,
> then the symlink inode ended up with inline data but without a
> system.data xattr.  This is possible because "fast" symlinks store a NUL
> terminator but inline data symlinks do not.  So 60 bytes is too long for
> a real fast symlink, but still short enough to fit the entire target in
> i_block as a "slow" symlink using inline data.
> 
> Some places use ext2fs_inline_data_init() to ensure the system.data
> xattr is created, but the symlink path does not.
> 
> Fix this by making ext2fs_inline_data_set() set system.data to an empty
> string when i_size <= 60.
> 
> Fixes: 54e880b870f7 ("libext2fs: handle inline data in read/write function")
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>

Applied, thanks.

						- Ted



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux