public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: sandeen@sandeen.net, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/7] xfs_repair: fix error in process_sf_dir2_fixi8
Date: Tue, 8 Sep 2020 15:46:48 +0100	[thread overview]
Message-ID: <20200908144648.GG6039@infradead.org> (raw)
In-Reply-To: <159950112994.567790.6177947698105660609.stgit@magnolia>

On Mon, Sep 07, 2020 at 10:52:10AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> The goal of process_sf_dir2_fixi8 is to convert an i8 shortform
> directory into a (shorter) i4 shortform directory.  It achieves this by
> duplicating the old sf directory contents (as oldsfp), zeroing i8count
> in the caller's directory buffer (i.e. newsfp/sfp), and reinitializing
> the new directory with the old directory's entries.
> 
> Unfortunately, it copies the parent pointer from sfp (the buffer we've
> already started changing), not oldsfp.  This leads to directory
> corruption since at that point we zeroed i8count, which means that we
> save only the upper four bytes from the parent pointer entry.
> 
> This was found by fuzzing u3.sfdir3.hdr.i8count = ones in xfs/384.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2020-09-08 20:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07 17:51 [PATCH 0/7] xfs_repair: more fuzzer fixes Darrick J. Wong
2020-09-07 17:52 ` [PATCH 1/7] xfs_repair: don't crash on partially sparse inode clusters Darrick J. Wong
2020-09-08 14:43   ` Christoph Hellwig
2020-09-07 17:52 ` [PATCH 2/7] xfs_repair: fix error in process_sf_dir2_fixi8 Darrick J. Wong
2020-09-08 14:46   ` Christoph Hellwig [this message]
2020-09-07 17:52 ` [PATCH 3/7] xfs_repair: junk corrupt xattr root blocks Darrick J. Wong
2020-09-08 14:47   ` Christoph Hellwig
2020-09-07 17:52 ` [PATCH 4/7] xfs_repair: complain about unwritten extents when they're not appropriate Darrick J. Wong
2020-09-08 14:51   ` Christoph Hellwig
2020-09-07 17:52 ` [PATCH 5/7] xfs_repair: fix handling of data blocks colliding with existing metadata Darrick J. Wong
2020-09-08 14:52   ` Christoph Hellwig
2020-09-07 17:52 ` [PATCH 6/7] xfs_repair: throw away totally bad clusters Darrick J. Wong
2020-09-08 15:15   ` Christoph Hellwig
2020-09-29 15:34     ` Darrick J. Wong
2020-09-29 15:35   ` [PATCH v2 " Darrick J. Wong
2020-09-30  6:17     ` Christoph Hellwig
2020-09-07 17:52 ` [PATCH 7/7] xfs_repair: use libxfs_verify_rtbno to verify rt extents Darrick J. Wong
2020-09-08 14:54   ` Christoph Hellwig

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=20200908144648.GG6039@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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