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: <CAOQ4uxgpFBFEk9h9eowQmeaC60xTFno0RsvA7MhkN9a=AeHhCg@mail.gmail.com>
Date:   Tue, 28 Mar 2017 06:43:07 -0400
From:   Amir Goldstein <amir73il@...il.com>
To:     Ralph Sennhauser <ralph.sennhauser@...il.com>
Cc:     Miklos Szeredi <miklos@...redi.hu>, linux-unionfs@...r.kernel.org,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-mtd@...ts.infradead.org, regressions@...mhuis.info,
        Richard Weinberger <richard@....at>,
        Artem Bityutskiy <dedekind1@...il.com>,
        Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [REGRESSION 4.11] Commit d8514d8edb5b ("ovl: copy up regular file
 using O_TMPFILE") breaks ubifs

On Tue, Mar 28, 2017 at 5:27 AM, Amir Goldstein <amir73il@...il.com> wrote:
> On Tue, Mar 28, 2017 at 4:01 AM, Ralph Sennhauser
> <ralph.sennhauser@...il.com> wrote:
>> Hi Amir
>>
>> Commit d8514d8edb5b ("ovl: copy up regular file using O_TMPFILE")
>> breaks squashfs with an ubifs overlay (both ubi volumes of the same
>> container).
>>
>
> Hi Ralph,
>
> I am confused by the description above. Which are the 'both ubi volumes'?
>
> Can you provide exact command of overlayfs mount, preferably
> also a script to generate the lower/upper images and mount them
> to remove any mkfs option doubts from test setup.
>
>> Renaming a file results in an error "UBIFS error (ubi0:1 pid 1394):
>> ubifs_add_orphan: orphaned twice". This corrupts the the filesystem and
>> the next attempt to mount the overlay will fail.
>>

Looking at the ubifs code, it does not appear that ubifs_link() ever calls
ubifs_delete_orphan() for the case of linking a temp file (nlink == 0),
so this looks like a ubifs bug.

Is ubifs being tested with xfstests? This should have been caught by test
generic/004 (link tempfile then delete it).

A quick fix for ubifs+overlayfs would be to disable ubifs O_TMPFILE
support (because it is broken) and then overlayfs won't try to copy up
using tmpfile.

Amir.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ