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: <20170523154152.glfcx7aryt5x4otj@thunk.org>
Date:   Tue, 23 May 2017 11:41:52 -0400
From:   Theodore Ts'o <tytso@....edu>
To:     Marc Thomas <marc@...gonfly.plus.com>
Cc:     linux-ext4@...r.kernel.org
Subject: Re: e2fsck bug? - Sparse files corrupt after "e2fsck -E bmap2extent".

On Tue, May 23, 2017 at 12:20:59AM +0100, Marc Thomas wrote:
> Hi All,
> 
> Would you agree this is a bug? As I understand it, reading from an
> "unpopulated" region of a sparse file should return all zeros - so the
> md5sum should be the same before and after migration.

I agree that sparse files should be properly handled after bmap2extent
conversion.  This code hasn't received that much use or testing, but
I've tried to replicate the problem and I haven't succeeded.  This
script works for me:

----- cut here -----
#!/bin/bash

rm -f /tmp/foo.img
mke2fs -t ext3 -Fq /tmp/foo.img 65536
mount -o loop /tmp/foo.img /mnt
dd if=/etc/motd of=/mnt/test bs=4k >& /dev/null
dd if=/etc/motd of=/mnt/test conv=notrunc seek=32 bs=4k >& /dev/null
dd if=/etc/motd of=/mnt/test2 bs=4k >& /dev/null
dd if=/etc/motd of=/mnt/test2 conv=notrunc seek=1024 bs=4k >& /dev/null
lsattr /mnt/test*
md5sum /mnt/test* > /mnt/MD5SUMS
umount /mnt
e2fsck -fy -E bmap2extent /tmp/foo.img
mount -o loop /tmp/foo.img /mnt
md5sum -c /mnt/MD5SUMS
lsattr /mnt/test*
umount /mnt
----- cut here -----

Maybe you can come up with a simple repro case that fails for you?

Thanks,

						- Ted
						

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ