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-next>] [day] [month] [year] [list]
Date:   Wed, 12 Jun 2019 16:07:11 +0200
From:   Rasmus Villemoes <linux@...musvillemoes.dk>
To:     linux-ext4@...r.kernel.org
Subject: fsck doesn't seem to understand inline directories

Hi

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. To reproduce:

truncate -s 100000000 ext4.img
misc/mke2fs -t ext4 -b 4096 -I 512 -O
'^dir_nlink,extra_isize,filetype,^huge_file,inline_data,large_file,large_dir,^meta_bg,^project,^quota,^resize_inode,sparse_super,64bit,metadata_csum_seed,metadata_csum'
-U random -v ext4.img
mkdir m
sudo mount ext4.img m
sudo chown $USER:$USER m
mkdir m/aa
echo 123 > m/aa/123
touch m/aa/empty
seq 10000 > m/aa/largefile
mkdir m/aa/bb
mkdir m/cc
sudo umount m
e2fsck/e2fsck -f -n ext4.img

The last command gives this output:

-----
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

Unconnected directory inode 16 (/aa/bb)
Connect to /lost+found? no

'..' in /cc (17) is <The NULL inode> (0), should be / (2).
Fix? no

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

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

Unattached inode 13
Connect to /lost+found? no

Unattached zero-length inode 14.  Clear? no

Unattached inode 14
Connect to /lost+found? no

Unattached inode 15
Connect to /lost+found? no

Unattached inode 16
Connect to /lost+found? no

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

Pass 5: Checking group summary information

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

ext4.img: 17/24416 files (5.9% non-contiguous), 4096/24414 blocks
-----

Am I doing something wrong? The kernel mounting the fs above is 4.15, in
case that matters.

Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ