xfs
[Top] [All Lists]

Re: [PATCH 1/2] metadump: bounds check btree block regions being zeroed

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH 1/2] metadump: bounds check btree block regions being zeroed
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Mon, 14 Dec 2015 14:26:19 -0600
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1450054866-32720-2-git-send-email-david@xxxxxxxxxxxxx>
References: <1450054866-32720-1-git-send-email-david@xxxxxxxxxxxxx> <1450054866-32720-2-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
On 12/13/15 7:01 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> 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

<Prev in Thread] Current Thread [Next in Thread>