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>] [day] [month] [year] [list]
Date: Wed, 17 Jan 2024 14:34:35 +0100
From: Matthias Reichl <hias@...us.com>
To: Theodore Ts'o <tytso@....edu>
Cc: linux-ext4@...r.kernel.org, hias@...us.com
Subject: [e2fsprogs] resize2fs 1.47.0 creates unclean orphan file

When resizing a 32 MiB ext4 filesystem that was created with the
orphan_file option to something larger than 32GiB the resulting
filesystem has an unclean orphan file block.

I initially ran into this issue with e2fsprogs 1.47.0 on aarch64
but could also reproduce it with current e2fsprogs master
(githash 260dfea450e387cbd2c8de79a7c2eeacc26f74e9) and e2fsprogs
1.47.0 from Debian Bookworm (the latter needs -O orphan_file as
Debian disabled that option by default) on x86_64.

resize2fs works fine if the target filesystem size is smaller than
32GiB (tested with 30GiB) or if the ext4 filesystem was created without
the orphan_file option.

Steps to reproduce:

$ ./configure --with-root-prefix=/usr/local
$ make
$ truncate -s 32MiB fs
$ ./misc/mke2fs -t ext4 -m 0 fs
$ truncate -s 33GiB fs
$ ./e2fsck/e2fsck -f -n fs
e2fsck 1.47.0 (5-Feb-2023)
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
fs: 12/8192 files (0.0% non-contiguous), 6970/32768 blocks
$ ./resize/resize2fs fs
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on fs to 34603008 (1k) blocks.
The filesystem on fs is now 34603008 (1k) blocks long.

$ ./e2fsck/e2fsck -f -n fs
e2fsck 1.47.0 (5-Feb-2023)
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
Orphan file (inode 12) block 2 is not clean.
Clear? no

Failed to initialize orphan file.
Recreate? no


fs: ********** WARNING: Filesystem still has errors **********

fs: 12/8650752 files (16.7% non-contiguous), 2180049/34603008 blocks


so long,

Hias

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ