lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170705040857.zjhtkwf74hqqan55@thunk.org>
Date:   Wed, 5 Jul 2017 00:08:57 -0400
From:   Theodore Ts'o <tytso@....edu>
To:     Tahsin Erdogan <tahsin@...gle.com>
Cc:     Andreas Dilger <adilger@...ger.ca>,
        "Darrick J . Wong" <darrick.wong@...cle.com>,
        linux-ext4@...r.kernel.org
Subject: Re: [PATCH] e2fsprogs: add ext2fs_is_fast_symlink() function

On Thu, Jun 29, 2017 at 06:31:59PM -0700, Tahsin Erdogan wrote:
> Current way of determining whether a symlink is in fast symlink
> format is to call ext2fs_inode_data_blocks2(). If number of data
> blocks is zero and EXT4_INLINE_DATA_FL flag is not set, then symlink
> data must be in inode->i_block.
> 
> This heuristic is becoming increasingly hard to maintain because
> inode->i_blocks count can also be incremented for blocks used by
> extended attributes. Before ea_inode feature, extra block could come
> from xattr block, now more blocks can be added because of xattr
> inodes.
> 
> To address the issue, add a ext2fs_is_fast_symlink() function that
> gives a direct answer based on inode->i_size field. This is
> equivalent to kernel's ext4_inode_is_fast_symlink() function.
> 
> This patch also fixes a few issues related to fast symlink handling:
> 
>   - Both rdump_symlink() and follow_link() interpreted symlinks with
>     0 data blocks to always mean fast symlinks. This is incorrect
>     because symlinks that are stored as inline data also have
>     0 data blocks. Thus, they try to read everything from
>     inode->i_block and miss the symlink suffix in inode extra area.
> 
>   - e2fsck_pass1_check_symlink() had code to handle inode with
>     EXT4_INLINE_DATA_FL flag twice. The first if block always returns
>     from the function so the second one is unreachable code.
> 
> Signed-off-by: Tahsin Erdogan <tahsin@...gle.com>

Thanks, applied to the "next" branch.

						- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ