All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs-progs: fix a heap-overflow bug in raid56 reconstruction
Date: Fri, 22 May 2026 19:36:51 +0930	[thread overview]
Message-ID: <cover.1779442619.git.wqu@suse.com> (raw)

During my local tests on a kernel patchset of falling back to
RAID1/RAID1C3 for single-data-RAID56, it turns out that "btrfs check
--check-data-csum" can report a lot of false csum mismatch.

It turns out that there is heap-overflow bug where we can get garbage
into the IO buffer for RAID56 reconstruction read.

Fix it and add a regression test case.

Qu Wenruo (2):
  btrfs-progs: fix raid56 reconstruction read
  btrfs-progs: fsck-tests: add a new test case for the raid56 read fix

 Makefile                                 |  2 +-
 kernel-shared/extent_io.c                | 14 +++++++++++-
 tests/fsck-tests/074-raid56-read/test.sh | 27 ++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100755 tests/fsck-tests/074-raid56-read/test.sh

--
2.54.0


             reply	other threads:[~2026-05-22 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22 10:06 Qu Wenruo [this message]
2026-05-22 10:06 ` [PATCH 1/2] btrfs-progs: fix raid56 reconstruction read Qu Wenruo
2026-05-22 10:06 ` [PATCH 2/2] btrfs-progs: fsck-tests: add a new test case for the raid56 read fix 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=cover.1779442619.git.wqu@suse.com \
    --to=wqu@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.