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: <1521139304@msgid.manchmal.in-ulm.de>
Date:   Thu, 15 Mar 2018 19:55:42 +0100
From:   Christoph Biedl <linux-kernel.bfrz@...chmal.in-ulm.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Anand Jain <anand.jain@...cle.com>,
        Liu Bo <bo.li.liu@...cle.com>, David Sterba <dsterba@...e.com>
Subject: Re: [PATCH 4.14 024/110] btrfs: use proper endianness accessors for
 super_copy

Greg Kroah-Hartman wrote...

> 4.14-stable review patch.  If anyone has any objections, please let me know.

> commit 3c181c12c431fe33b669410d663beb9cceefcd1b upstream.
(...)

> If the filesystem is always used on a same endian host, this will not
> be a problem.

>From my observations I cannot quite subscribe to that.

On big-endian systems, this change intruduces severe corruption,
resulting in complete loss of the data on the used block device.

Steps to reproduce (tested on ppc/powerpc and parisc/hppa):

# mkfs.btrfs $DEV
# mount $DEV /mnt/tmp/
# umount /mnt/tmp/

This simple umount corrupts the file system:

# mount $DEV /mnt/tmp/
mount: /mnt/tmp: wrong fs type, bad option, bad superblock on $DEV, missing codepage or helper program, or other error.

# dmesg:
BTRFS critical (device <dev>): unable to find logical 4294967296 length 4096
BTRFS critical (device <dev>): unable to find logical 4294967296 length 4096
BTRFS critical (device <dev>): unable to find logical 18102363734671360 length 16384
BTRFS error (device <dev>): failed to read chunk root
BTRFS error (device <dev>): open_ctree failed

Also fsck is of no help:

# btrfsck $DEV
Couldn't map the block 18102363734671360
No mapping for 18102363734671360-18102363734687744
Couldn't map the block 18102363734671360
bytenr mismatch, want=18102363734671360, have=0
ERROR: cannot read chunk root
ERROR: cannot open file system


Trying mount or fsck on a little-endian system does not help either. So
I consider the data on that device lost - luckily I use btrfs only for
files where a backup exists all the time.


Reverting that change restored the previous error-free behaviour. I
didn't check HEAD, i.e. v4.16-rc5, since the upstream commt was the last
that affected these files. Still I could give this a try if anybody
wishes so.

Cheers,

    Christoph

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ