linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: Part 2 of enhanced defence against fuzzed images
@ 2019-07-16  9:00 Qu Wenruo
  2019-07-16  9:00 ` [PATCH 1/3] btrfs: delayed-inode: Kill the BUG_ON() in btrfs_delete_delayed_dir_index() Qu Wenruo
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Qu Wenruo @ 2019-07-16  9:00 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Jungyeon Yoon

This wave has the following features:
- Hunt down BUG_ON() in btrfs_delete_delayed_dir_index()
  EEXIST can cause BUG_ON(). And all callers of this function has
  already handled error by aborting transacation.

- Only allocate extents from the same block group type
  This is a very tricky bug, needs MIXED_GROUP super flag with regular
  block groups (separate META and DATA) and corrupted extent tree.

- ROOT_ITEM check for tree checker
  This kills the unaligned bytenr, invalid level and incorrect reloc
  tree.

Reported-by: Jungyeon Yoon <jungyeon.yoon@gmail.com>

Qu Wenruo (3):
  btrfs: delayed-inode: Kill the BUG_ON() in
    btrfs_delete_delayed_dir_index()
  btrfs: extent-tree: Make sure we only allocate extents from block
    groups with the same type
  btrfs: tree-checker: Add ROOT_ITEM check

 fs/btrfs/delayed-inode.c | 14 +++++-
 fs/btrfs/extent-tree.c   |  9 ++++
 fs/btrfs/tree-checker.c  | 92 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 113 insertions(+), 2 deletions(-)

-- 
2.22.0


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

end of thread, other threads:[~2019-07-31 15:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-16  9:00 [PATCH 0/3] btrfs: Part 2 of enhanced defence against fuzzed images Qu Wenruo
2019-07-16  9:00 ` [PATCH 1/3] btrfs: delayed-inode: Kill the BUG_ON() in btrfs_delete_delayed_dir_index() Qu Wenruo
2019-07-31 15:44   ` David Sterba
2019-07-16  9:00 ` [PATCH 2/3] btrfs: extent-tree: Make sure we only allocate extents from block groups with the same type Qu Wenruo
2019-07-16  9:00 ` [PATCH 3/3] btrfs: tree-checker: Add ROOT_ITEM check Qu Wenruo
2019-07-26 15:29   ` David Sterba
2019-07-26 23:26     ` Qu Wenruo
2019-07-31 15:34       ` David Sterba
2019-07-31 15:58 ` [PATCH 0/3] btrfs: Part 2 of enhanced defence against fuzzed images David Sterba

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).