All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] metadump: bounds check btree block regions being zeroed
Date: Mon, 14 Dec 2015 14:26:19 -0600	[thread overview]
Message-ID: <566F25EB.5040605@sandeen.net> (raw)
In-Reply-To: <1450054866-32720-2-git-send-email-david@fromorbit.com>

On 12/13/15 7:01 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Arkadiusz Miskiewicz reported that metadump was crashing on one of
> his corrupted filesystems, and the trace indicated that it was
> zeroing unused regions in inode btree blocks when it failed. The
> btree block had a corrupt nrecs field, which was resulting in an out
> of bounds memset() occurring.

Doh.

Time to run fuzzers+valgrind w/ metadump I guess...
/me looks at djwong ...
 
> Ensure that the region being generated for zeroing is within bounds
> before executing the zeroing. While there, abstract the repeated
> boiler plate code so that it is simpler to maintain and extend the
> zeroing code to new types of btrees in future.

yeah, thanks, not sure why I didn't do that originally.  Much better.

Might be nice to split the bugfix & the cleanup into 2 patches, though...

Thanks,
-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2015-12-14 20:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14  1:01 [PATCH 0/2] xfsprogs: metadump/restore fixes Dave Chinner
2015-12-14  1:01 ` [PATCH 1/2] metadump: bounds check btree block regions being zeroed Dave Chinner
2015-12-14 20:26   ` Eric Sandeen [this message]
2015-12-15 11:15   ` Arkadiusz Miśkiewicz
2015-12-14  1:01 ` [PATCH 2/2] xfs_mdrestore: correctly account bytes read 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=566F25EB.5040605@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.