linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Fuzzer test fix
@ 2016-08-30  7:22 Qu Wenruo
  2016-08-30  7:22 ` [PATCH 1/5] btrfs-progs: fsck: Check drop level before walking through fs tree Qu Wenruo
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Qu Wenruo @ 2016-08-30  7:22 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Lukas Lueg

Cc: Lukas Lueg <lukas.lueg@gmail.com>

Thanks for the fuzz test from Lukas, quite a lot of bugs are exposed.

The full fixes can be fetched from my github:
https://github.com/adam900710/btrfs-progs/tree/fuzz_fix_160830

The branch has go through fuzz and mkfs tests.

For full low-memory mode checker, I'll push it to David first, so for
low-memory mode fuzzer test, it will need some time.

Test cases uses the same image submitted by Lukas.
Although all these root causes are pinned, it still need quite a lot of
work to make corrupt-block able to create minimal image.

So I choose to directly use his images as test cases.

And special notes for the BUG_ON fix:
The fix just fixes a small corner, while tons of BUG_ON()/abort() are
still here and there.
We need quite a lot of boring work to handle them later.

While the good news is, new low memory mode(at least for extent and
chunk tree check part) is quite safe against such things.
I can't wait to see how the full low-memory mode works under fuzzer
tests.


Lukas Lueg (2):
  btrfs-progs: fuzz-test: Add test case for invalid drop level
  btrfs-progs: fuzz-test: Add test case for unaligned extent item

Qu Wenruo (3):
  btrfs-progs: fsck: Check drop level before walking through fs tree
  btrfs-progs: fsck: Check bytenr alignment for extent item
  btrfs-progs: fsck: Avoid abort and BUG_ON in add_tree_backref

 cmds-check.c                                       |  95 ++++++++++++++++-----
 tests/fuzz-tests/images/invalid-drop-level.raw.txt |  30 +++++++
 tests/fuzz-tests/images/invalid-drop-level.raw.xz  | Bin 0 -> 3788 bytes
 .../images/unaligned-extent-item.raw.txt           |   8 ++
 .../fuzz-tests/images/unaligned-extent-item.raw.xz | Bin 0 -> 3684 bytes
 5 files changed, 111 insertions(+), 22 deletions(-)
 create mode 100644 tests/fuzz-tests/images/invalid-drop-level.raw.txt
 create mode 100644 tests/fuzz-tests/images/invalid-drop-level.raw.xz
 create mode 100644 tests/fuzz-tests/images/unaligned-extent-item.raw.txt
 create mode 100644 tests/fuzz-tests/images/unaligned-extent-item.raw.xz

-- 
2.9.3




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

end of thread, other threads:[~2016-08-30 17:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-30  7:22 [PATCH 0/5] Fuzzer test fix Qu Wenruo
2016-08-30  7:22 ` [PATCH 1/5] btrfs-progs: fsck: Check drop level before walking through fs tree Qu Wenruo
2016-08-30  7:22 ` [PATCH 2/5] btrfs-progs: fuzz-test: Add test case for invalid drop level Qu Wenruo
2016-08-30  7:22 ` [PATCH 3/5] btrfs-progs: fsck: Check bytenr alignment for extent item Qu Wenruo
2016-08-30  7:22 ` [PATCH 4/5] btrfs-progs: fsck: Avoid abort and BUG_ON in add_tree_backref Qu Wenruo
2016-08-30  7:22 ` [PATCH 5/5] btrfs-progs: fuzz-test: Add test case for unaligned extent item Qu Wenruo
2016-08-30 14:40 ` [PATCH 0/5] Fuzzer test fix David Sterba
2016-08-30 17:42   ` Lukas Lueg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).