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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 19 Jun 2019 15:00:29 -0400
From:   "Theodore Ts'o" <>
To:     Artem Blagodarenko <>
Subject: Re: [PATCH] e2fsck: process empty directory if large_dir and
 inline_data set

On Fri, Jun 14, 2019 at 05:42:37PM +0300, Artem Blagodarenko wrote:
> Doing a forced check on an ext4 file system with inline_data and
> large_dir results in lots of fsck messages. To reproduce:
> ...
> Rootcause of this issue is large_dir optimization that is not
> appropriate for inline_data.
> Let's not optimize it if inline_data is set.
> Reported-by: Rasmus Villemoes <>
> Signed-off-by: Artem Blagodarenko <>

Thanks, applied, although I corrected the commit description.  The
initial description now reads:

    e2fsck: correctly handle inline directories when large_dir is enabled.
    Historically, e2fsck has required that directories not contain holes.
    (In fact, as of this writing, ext4 still requires this to be the
    case.)  Commit ae9efd05a98 ("e2fsck: 3 level hash tree directory
    optimization") removed this requirement if the large_dir feature is
    enabled; however, the way it was done caused it to incorrectly handle
    inline directories.

    To reproduce the problem fixed by this commit:

BTW, Removing the directory hole check in commit ae9efd05a98 for file
systems with the large_dir feature enabled was a wee bit optimistic,
since the kernel will still mark the file system as corrupted.

Fixing the kernel so that it doesn't complain about directories with
holes is going to be a bit more complicated than just removing the
check in __ext4_read_dirblock():

	if (!bh) {
		ext4_error_inode(inode, func, line, block,
				 "Directory hole found");

(That's because we have to fix all of the callers of
ext4_read_dirblock() to handle the case where it returns NULL if there
is no directory block at that specified location.)

I should have caught that when reviewing the e2fsprogs commit; my bad.
At this point, we should just fix the kernel so it can handle
directories with holes (both for large_dir and non-large_dir

      		      	      		- Ted

Powered by blists - more mailing lists