From: Keith Busch <kbusch@kernel.org>
To: Yao Sang <sangyao@kylinos.cn>
Cc: hch@lst.de, axboe@kernel.dk, sagi@grimberg.me,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH v3] nvme: fix command effects log lifetime for multipath heads
Date: Tue, 22 Sep 2026 09:00:15 -0600 [thread overview]
Message-ID: <arKX_yKn2RpbSoee@kbusch-mbp> (raw)
In-Reply-To: <20260922073730.352203-1-sangyao@kylinos.cn>
On Tue, Sep 22, 2026 at 03:37:30PM +0800, Yao Sang wrote:
> KASAN reported a use-after-free when an I/O passthrough command was sent
> through a multipath namespace head after the controller path that first
> created the head had been removed:
>
> BUG: KASAN: slab-use-after-free in nvme_command_effects+0x192/0x200 [nvme_core]
> Read of size 4 at addr ffff888141b14400 by task nvme/19811
> nvme_command_effects+0x192/0x200 [nvme_core]
> nvme_cmd_allowed+0x7e/0x1b0 [nvme_core]
> nvme_user_cmd.constprop.0+0x1b5/0x450 [nvme_core]
> nvme_ns_head_chr_ioctl+0xf4/0x2a0 [nvme_core]
>
> Move the log cache to the subsystem, with one entry per command set. Both
> controllers and namespace heads hold subsystem references, keeping their
> log pointers valid until subsystem release.
Thanks, applied to nvme-7.3.
prev parent reply other threads:[~2026-09-22 15:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 7:37 [PATCH v3] nvme: fix command effects log lifetime for multipath heads Yao Sang
2026-09-22 13:42 ` Christoph Hellwig
2026-09-22 15:00 ` Keith Busch [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=arKX_yKn2RpbSoee@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=sangyao@kylinos.cn \
/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).