Skip to content

nvme-[tcp|rdma] fix for possible use-after-free

Sagi Grimberg linux-nvme 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesIn review
  2. v14 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- 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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nvme: fix a possible use-after-free in controller reset during loaddrivers/nvme/host/core.c+2 -04 replies
2/3nvme-tcp: fix possible use-after-free in transport error_recovery workdrivers/nvme/host/tcp.c+1 -01 reply
3/3nvme-rdma: fix possible use-after-free in transport error_recovery workdrivers/nvme/host/rdma.c+1 -01 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchChris LeechMax GurtovoyHannes Reinecke
1/3R-b R-b
2/3T-b R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/3] nvme-[tcp|rdma] fix for possible use-after-free

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(+)
Signature · 1 line
2.30.2