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: <20190613015056.GA2956@mit.edu>
Date:   Wed, 12 Jun 2019 21:50:56 -0400
From:   "Theodore Ts'o" <tytso@....edu>
To:     Andreas Dilger <adilger@...ger.ca>
Cc:     Rasmus Villemoes <linux@...musvillemoes.dk>,
        linux-ext4 <linux-ext4@...r.kernel.org>,
        Li Dongyang <dongyangli@....com>
Subject: Re: fsck doesn't seem to understand inline directories

On Wed, Jun 12, 2019 at 02:40:18PM -0600, Andreas Dilger wrote:
> On Jun 12, 2019, at 8:07 AM, Rasmus Villemoes <linux@...musvillemoes.dk> wrote:
> > 
> > Doing a forced check on an ext4 file system with inline_data results in
> > lots of warnings - and I think answering yes to "fixing" those would
> > actually corrupt the fs.
> 
> Rasmus,
> This definitely seems like a bug in e2fsck.  It isn't totally surprising, since
> the inline_data feature is not widely used.  We are currently investigating using
> it for regular files, but it doesn't seem worthwhile for directories to me.

It looks like the problem is the combination of large_dir and
inline_data, and it does look like the problem is in e2fsck (as
opposed to the kernel).

Large_dir is a new feature (even newer than inline_data, and it looks
like the support for large_dir didn't handle the combination with
inline_data correctly).

							- Ted

# mke2fs -t ext4 -O inline_data -Fq /tmp/ext4.img 1G
/tmp/ext4.img contains a ext4 file system
	last mounted on Wed Jun 12 21:47:25 2019
# mount /tmp/ext4.img /mnt ; mkdir /mnt/aa ; umount /mnt
# e2fsck -fn /tmp/ext4.img
e2fsck 1.45.2 (27-May-2019)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/tmp/ext4.img: 12/65536 files (0.0% non-contiguous), 12954/262144 blocks

### So everything is fine with just inline_data, but when you
### enable the large_dir features, and rerun e2fsck....

# debugfs -w -R "features large_dir" /tmp/ext4.img 
debugfs 1.45.2 (27-May-2019)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg large_dir inline_data sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
# e2fsck -fn /tmp/ext4.img
e2fsck 1.45.2 (27-May-2019)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
'..' in /aa (12) is <The NULL inode> (0), should be / (2).
Fix? no

Pass 4: Checking reference counts
Inode 2 ref count is 4, should be 3.  Fix? no

Inode 12 ref count is 2, should be 1.  Fix? no

Pass 5: Checking group summary information

/tmp/ext4.img: ********** WARNING: Filesystem still has errors **********

/tmp/ext4.img: 12/65536 files (0.0% non-contiguous), 12954/262144 blocks


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ