public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: gality369@gmail.com
Subject: [PATCH 0/2] btrfs: add free space tree checks except for FREE_SPACE_BITMAP
Date: Tue, 10 Mar 2026 08:49:24 +1030	[thread overview]
Message-ID: <cover.1773094579.git.wqu@suse.com> (raw)

There is a fuzzed image report (*) that a bad item size for
FREE_SPACE_BITMAP item can lead to various problems.

And I'm surprised that we do not have any checks for such critical tree,
so let's add the proper checks for FREE_SPACE_INFO and
FREE_SPACE_EXTENT items

The check for FREE_SPACE_BITMAP item is reserved for the reporter, whose
initial fix is not properly put into tree-checker, and also as an
example for the reporter to follow.

Qu Wenruo (2):
  btrfs: tree-checker: introduce checks for FREE_SPACE_INFO
  btrfs: tree-checker: introduce checks for FREE_SPACE_EXTENT

 fs/btrfs/tree-checker.c         | 70 +++++++++++++++++++++++++++++++++
 include/uapi/linux/btrfs_tree.h |  3 +-
 2 files changed, 72 insertions(+), 1 deletion(-)

-- 
2.53.0


             reply	other threads:[~2026-03-09 22:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 22:19 Qu Wenruo [this message]
2026-03-09 22:19 ` [PATCH 1/2] btrfs: tree-checker: introduce checks for FREE_SPACE_INFO Qu Wenruo
2026-03-10 10:36   ` Johannes Thumshirn
2026-03-13 19:47   ` David Sterba
2026-03-09 22:19 ` [PATCH 2/2] btrfs: tree-checker: introduce checks for FREE_SPACE_EXTENT Qu Wenruo
2026-03-10 10:41   ` Johannes Thumshirn
2026-03-10 10:42 ` [PATCH 0/2] btrfs: add free space tree checks except for FREE_SPACE_BITMAP Johannes Thumshirn

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=cover.1773094579.git.wqu@suse.com \
    --to=wqu@suse.com \
    --cc=gality369@gmail.com \
    --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