linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: linux-nvme@lists.infradead.org, Christoph Hellwig <hch@lst.de>,
	Keith Busch <kbusch@kernel.org>
Cc: Chris Leech <cleech@redhat.com>
Subject: [PATCH v2 0/3] nvme-[tcp|rdma] fix for possible use-after-free
Date: Tue,  1 Feb 2022 14:54:18 +0200	[thread overview]
Message-ID: <20220201125421.177942-1-sagi@grimberg.me> (raw)

A few use-after-free reports were seen in the wild with nvme-tcp when testing
ctrl reset and error recovery under load. Analysis shows that the exact same
use-after-free can happen with nvme-rdma as well. This patch series addresses
these issues for both.

Changes from v1:
- Move ctrl->state check from driver(s) .submit_async_event to core
  nvme_async_event_work (so need a single patch, not one per driver).
- omit queue state from the check - it is redundant, the ctrl state
  check is sufficient

Sagi Grimberg (3):
  nvme: fix a possible use-after-free in controller reset during load
  nvme-tcp: fix possible use-after-free in transport error_recovery work
  nvme-rdma: fix possible use-after-free in transport error_recovery
    work

 drivers/nvme/host/core.c | 2 ++
 drivers/nvme/host/rdma.c | 1 +
 drivers/nvme/host/tcp.c  | 1 +
 3 files changed, 4 insertions(+)

-- 
2.30.2



             reply	other threads:[~2022-02-01 12:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 12:54 Sagi Grimberg [this message]
2022-02-01 12:54 ` [PATCH v2 1/3] nvme: fix a possible use-after-free in controller reset during load Sagi Grimberg
2022-02-03 14:43   ` Max Gurtovoy
2022-02-03 15:03     ` Sagi Grimberg
2022-02-03 15:47       ` Max Gurtovoy
2022-02-04 12:20   ` Hannes Reinecke
2022-02-01 12:54 ` [PATCH v2 2/3] nvme-tcp: fix possible use-after-free in transport error_recovery work Sagi Grimberg
2022-02-04 12:20   ` Hannes Reinecke
2022-02-01 12:54 ` [PATCH v2 3/3] nvme-rdma: " Sagi Grimberg
2022-02-04 12:21   ` Hannes Reinecke

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=20220201125421.177942-1-sagi@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=cleech@redhat.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).