All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Boris Burkov <boris@bur.io>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com, fdmanana@kernel.org
Subject: Re: [PATCH v4 0/2] btrfs: fix logical_to_ino panic in btrfs_map_bio
Date: Fri, 2 Jun 2023 22:07:59 +0200	[thread overview]
Message-ID: <20230602200759.GA15048@twin.jikos.cz> (raw)
In-Reply-To: <cover.1685645613.git.boris@bur.io>

On Thu, Jun 01, 2023 at 11:55:12AM -0700, Boris Burkov wrote:
> The gory details are in the second patch, but it is possible to panic
> the kernel by running the ioctl BTRFS_IOC_LOGICAL_INO (and V2 of that
> ioctl).
> 
> The TL;DR of the problem is that we do not properly handle logging a
> move from a push_node_left btree balancing operation in the tree mod
> log, so it is possible for backref walking using the tree mod log to
> construct an invalid extent_buffer and ultimately try to map invalid
> bios for block 0 which ultimately hits a null pointer error and panics.
> 
> The patch set introduces additional bookkeeping in tree mod log to warn
> on this issue and also fixes the issue itself.
> 
> ---
> Changelog:
> v4:
> - actually include the changes to Patch 1 cited in v3, my mistake.

Added to misc-next, thanks.

      parent reply	other threads:[~2023-06-02 20:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 18:55 [PATCH v4 0/2] btrfs: fix logical_to_ino panic in btrfs_map_bio Boris Burkov
2023-06-01 18:55 ` [PATCH v4 1/2] btrfs: warn on invalid slot in tree mod log rewind Boris Burkov
2023-06-02 10:09   ` Filipe Manana
2023-06-01 18:55 ` [PATCH v4 2/2] btrfs: insert tree mod log move in push_node_left Boris Burkov
2023-06-02 10:10   ` Filipe Manana
2023-06-02 20:07 ` David Sterba [this message]

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=20230602200759.GA15048@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=boris@bur.io \
    --cc=fdmanana@kernel.org \
    --cc=kernel-team@fb.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.