linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Xu, Wen" <wen.xu@gatech.edu>
Cc: "linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>
Subject: Re: Bug report: kernel hangs when mounting a crafted xfs image
Date: Wed, 13 Jun 2018 08:40:28 +1000	[thread overview]
Message-ID: <20180612224028.GD10363@dastard> (raw)
In-Reply-To: <5B6AC96A-7049-48D7-82A1-4AB42322D38B@gatech.edu>

On Mon, Jun 11, 2018 at 07:36:48PM +0000, Xu, Wen wrote:
> When mounting a crafted xfs v4 image, the kernel hangs and never returns for mount operation. Suspect potential deadlock in log recovery exists. Not sure it is considered as a bug or not.
> 
> - Reproduce (on 4.17 upstream kernel)
> # mkdir mnt
> # mount -t xfs 0.img mnt
> 
> The image file (0.img.zip) is available here: https://bugzilla.kernel.org/attachment.cgi?id=276475

So it's a filesystem with a log that has bit corruptions in it's log
record headers, and log CRCs are turned off. All kernels since late
2012 have CRC'd log records for both v4 and v5 filesystems.  Hence
any remotely recent kernel faced wih bit errors in the journal are
going to behave differently - corruption warnings will be issued
first, and while v4 filesystems will continue to try to mount, a v5
filesystem will refuse to mount. And kernels old enough not to CRC
log records are unlikely to ever get bug fixes for maliciously
corrupted log records.

As such, I'm going to consider this a low priority right now.
Protecting log recovery against anything more than random bit errors
is a fairly major undertaking, and not something I plan on doing
in the near term...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  parent reply	other threads:[~2018-06-12 22:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11 19:36 Bug report: kernel hangs when mounting a crafted xfs image Xu, Wen
2018-06-11 20:08 ` Xu, Wen
2018-06-12 22:40 ` Dave Chinner [this message]
2018-06-12 23:30   ` Xu, Wen
2018-06-13  0:40     ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180612224028.GD10363@dastard \
    --to=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=wen.xu@gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).