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

Arkadiusz Miśkiewicz arekm at maven.pl
Tue Dec 15 05:15:27 CST 2015


On Monday 14 of December 2015, Dave Chinner wrote:
> From: Dave Chinner <dchinner at 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.
> 
> 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.
> 
> Reported-by: Arkadiusz Miskiewicz <arekm at maven.pl>

... and Tested-by: Arkadiusz Miskiewicz <arekm at maven.pl>

By that I mean that it did dump my broken fs without segfaulting (using -g 
option only).

-- 
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )



More information about the xfs mailing list