linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Yoon Jungyeon <jungyeon@gatech.edu>
Subject: [PATCH 0/3] btrfs: tree-checker: Enhancement and fixes for new fuzzed image report
Date: Fri,  8 Mar 2019 15:29:26 +0800	[thread overview]
Message-ID: <20190308072929.30863-1-wqu@suse.com> (raw)

This patchset can be fetched from:
https://github.com/adam900710/linux/tree/tree_checker_enhancement

The base branch write_time_tree_checker, the base commit is:
commit cb3ba69132a83d5e87f243dece5db09a022b0be7 (github/write_time_tree_checker, write_time_tree_checker)
Author: Qu Wenruo <wqu@suse.com>
Date:   Thu Jan 17 15:15:14 2019 +0800

    btrfs: Do mandatory tree block check before submitting bio


Yoon Jungyeon reported several fuzzed image screwing up btrfs.

3 of the reported images are mount panic and can be addressed by tree
checker enhancement and fix.

This patchset addresses those 3 mount panic by:
- Verify chunk items
  This merges the existing btrfs_check_chunk_valid() and apply it to all
  chunk items, both in super block syschunk array and all tree blocks.

- Verify dev item
  This could avoid NULL pointer workaround for seed dummy.

- Don't trigger comprehensive root owner check if tree root is not
  initialized yet

The remaining runtime problem needs extra inspection, and some isn't so
easy to fix by tree-checker alone.

Reported-by: Yoon Jungyeon <jungyeon@gatech.edu>

Qu Wenruo (3):
  btrfs: tree-checker: Verify chunk items
  btrfs: tree-checker: Verify dev item
  btrfs: tree-checker: Fix NULL pointer access for corrupted chunk root

 fs/btrfs/tree-checker.c | 242 +++++++++++++++++++++++++++++++++++++++-
 fs/btrfs/tree-checker.h |   3 +
 fs/btrfs/volumes.c      | 103 +----------------
 fs/btrfs/volumes.h      |   9 ++
 4 files changed, 254 insertions(+), 103 deletions(-)

-- 
2.21.0


             reply	other threads:[~2019-03-08  7:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08  7:29 Qu Wenruo [this message]
2019-03-08  7:29 ` [PATCH 1/3] btrfs: tree-checker: Verify chunk items Qu Wenruo
2019-03-09  5:51   ` Nikolay Borisov
2019-03-11 15:25   ` Nikolay Borisov
2019-03-11 23:41     ` Qu Wenruo
2019-03-19  7:58     ` Qu Wenruo
2019-03-28 16:58       ` David Sterba
2019-03-28 23:38         ` Qu Wenruo
2019-03-08  7:29 ` [PATCH 2/3] btrfs: tree-checker: Verify dev item Qu Wenruo
2019-03-08  7:29 ` [PATCH 3/3] btrfs: tree-checker: Fix NULL pointer access for corrupted chunk root Qu Wenruo

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=20190308072929.30863-1-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=jungyeon@gatech.edu \
    --cc=linux-btrfs@vger.kernel.org \
    /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 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).