public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/11] xfsprogs fuzzing fixes
@ 2015-08-26  0:32 Darrick J. Wong
  2015-08-26  0:32 ` [PATCH 01/11] xfs_repair: set args.geo in dir2_kill_block Darrick J. Wong
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Darrick J. Wong @ 2015-08-26  0:32 UTC (permalink / raw)
  To: david, darrick.wong; +Cc: xfs

Hi all,

This is a rollup of various fuzzing fixes for xfsprogs 4.2.0-rc3.

The first patch fixes a crash in xfs_repair where args.geo wasn't
getting initialized when killing a directory block.  Previously
sent by sandeen, but seemed to have fallen off everyone's radars?

Patch 2, a port of a kernel patch, ensures that the dir/attr verifier
marks the buffer corrupt if the magic number isn't recognized.  This
helps us to fail faster in the event of magic number corruption.

Patch 3 fixes libxfs' WANT_CORRUPTED macros to return negative error
codes like the rest of libxfs does.

Patch 4 amends libxfs_getbuf*() to clear the buffer state if the
buffer isn't dirty.  This prevents repair from throwing CRC errors if
a block is prefetched, freed without being examined (the exam clears
the UNCHECKED flag), reallocated to some other data structure, and
then read for a subsequent operation.

Patch 5 fixes a bug in xfs_repair wherein if xfs_repair fixes a broken
xattr block and later decides to unmap the block, the "repaired" flag
inadvertently prohibits the unmapping of that block.

Patch 6 forces repair's xattr block checker to take a look at the
header for incorrect owner data.  If the header info looks bad, we'll
discard the xattr block.

Patch 7 forces prefetch to mark corrupt bmbt blocks UNCHECKED so that
the regular bmbt examination will fix the bad CRC if it doesn't take
any other action against the block.  Without this, a corruption in the
unused area will trigger a kernel error yet never get fixed by repair.

Patch 8 implements a 'reflink' and 'dedupe' command in xfs_io.  This
will be used in future xfstests to test reflink and dedupe features of
btrfs and xfs filesystems.

Patch 9 fixes xfs_db/blocktrash to not fail write verification when
corrupting a block and allows trashing of log and symlink blocks.

Patch 10 enhances the blocktrash command with a '-z' option that
trashes the block at the top of the cursor stack and doesn't require
blockget to have been run.

Patch 11 implements blockget for v5 filesystems.  This is a second try
at a previous patch which didn't quite catch all the new magic numbers
and had some problems iterating directory index data.

I've tested these xfsprogs changes against the for-next branch as of
8/24.  The rmap/reflink patches will be dealt with separately.

Scary rewound github repo with everything attached:
https://github.com/djwong/xfsprogs

Fuzz tests and more are at:
https://github.com/djwong/xfstests

Comments and questions are, as always, welcome.

--D

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2015-09-28 17:04 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26  0:32 [PATCH v3 00/11] xfsprogs fuzzing fixes Darrick J. Wong
2015-08-26  0:32 ` [PATCH 01/11] xfs_repair: set args.geo in dir2_kill_block Darrick J. Wong
2015-08-26  0:32 ` [PATCH 02/11] libxfs: verifier should set buffer error when da block has a bad magic number Darrick J. Wong
2015-08-26  0:32 ` [PATCH 03/11] libxfs: fix XFS_WANT_CORRUPTED_* macros to return negative error codes Darrick J. Wong
2015-08-26  0:32 ` [PATCH 04/11] libxfs: clear buffer state flags in libxfs_getbuf and variants Darrick J. Wong
2015-08-26  1:02   ` Dave Chinner
2015-08-26  4:05     ` Darrick J. Wong
2015-08-26  5:23     ` [PATCH v2 " Darrick J. Wong
2015-08-26  0:32 ` [PATCH 05/11] xfs_repair: ignore "repaired" flag after we decide to clear xattr block Darrick J. Wong
2015-08-26  0:32 ` [PATCH 06/11] xfs_repair: check v5 filesystem attr block header sanity Darrick J. Wong
2015-08-26  0:45   ` Dave Chinner
2015-08-26  0:59     ` Darrick J. Wong
2015-08-26  1:15       ` Dave Chinner
2015-08-26  4:50         ` Darrick J. Wong
2015-08-26  6:20           ` Dave Chinner
2015-08-26  0:33 ` [PATCH 07/11] xfs_repair: force not-so-bad bmbt blocks back through the verifier Darrick J. Wong
2015-08-26  0:54   ` Dave Chinner
2015-08-26  3:59     ` Darrick J. Wong
2015-08-26  5:24     ` [PATCH v2 " Darrick J. Wong
2015-08-26  0:33 ` [PATCH 08/11] xfs_io: support reflinking and deduping file ranges Darrick J. Wong
2015-09-22  2:17   ` Dave Chinner
2015-09-28 17:03     ` Darrick J. Wong
2015-08-26  0:33 ` [PATCH 09/11] xfs_db: enable blocktrash for checksummed filesystems Darrick J. Wong
2015-08-26  0:33 ` [PATCH 10/11] xfs_db: trash the block at the top of the cursor stack Darrick J. Wong
2015-08-26  0:33 ` [PATCH 11/11] xfs_db: enable blockget for v5 filesystems Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox