All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] nvme: small fixes from a drivers/nvme audit
@ 2026-12-01 11:53 Guixin Liu
  2026-12-01 11:53 ` [PATCH 1/4] nvme: guard nvme_strlen() against all-space strings Guixin Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Guixin Liu @ 2026-12-01 11:53 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	Nilay Shroff, Daniel Wagner, Hannes Reinecke
  Cc: linux-nvme

A static audit of drivers/nvme turned up a set of small, independent
bugs. This series collects four of them; each patch has its own
reproducer and regression run, described below the --- line.

  nvme: guard nvme_strlen() against all-space strings
    An all-space Identify field drives the length negative and reads
    before the buffer.

  nvme: trace the Set Features Save bit from the right position
    The trace parser reads reserved bit 27 instead of the SV bit 31.

  nvmet-fc: clear the DMA address of the fod that failed mapping
    The failing fod keeps DMA_MAPPING_ERROR and is later passed to
    dma_unmap_single().

  nvme-fcloop: initialize port structures before publishing them
    A concurrent port delete can flush an uninitialized work_struct
    and test an uninitialized list head.

Testing: QEMU/KVM guest, 7.3.0 kernel with KASAN, UBSAN and
CONFIG_DMA_API_DEBUG, nvmet-tcp and nvme-fcloop loopback. Each fix was
reproduced on the unpatched code, verified with the same recipe after
patching, and regression-tested with the test-only injections removed
(connect/IO/disconnect and normal add/delete paths, no warnings). The
test-only injections and the DMA_API_DEBUG kernel build live in the
test environment only, not in these patches.

Guixin Liu (4):
  nvme: guard nvme_strlen() against all-space strings
  nvme: trace the Set Features Save bit from the right position
  nvmet-fc: clear the DMA address of the fod that failed mapping
  nvme-fcloop: initialize port structures before publishing them

 drivers/nvme/host/nvme.h     |  2 +-
 drivers/nvme/host/trace.c    |  2 +-
 drivers/nvme/target/fc.c     |  1 +
 drivers/nvme/target/fcloop.c | 28 ++++++++++++++++++----------
 4 files changed, 21 insertions(+), 12 deletions(-)

-- 
2.43.7



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-12-02  6:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 11:53 [PATCH 0/4] nvme: small fixes from a drivers/nvme audit Guixin Liu
2026-12-01 11:53 ` [PATCH 1/4] nvme: guard nvme_strlen() against all-space strings Guixin Liu
2026-12-02  6:32   ` Christoph Hellwig
2026-12-01 11:53 ` [PATCH 2/4] nvme: trace the Set Features Save bit from the right position Guixin Liu
2026-12-02  6:32   ` Christoph Hellwig
2026-12-01 11:53 ` [PATCH 3/4] nvmet-fc: clear the DMA address of the fod that failed mapping Guixin Liu
2026-12-02  6:32   ` Christoph Hellwig
2026-12-01 11:53 ` [PATCH 4/4] nvme-fcloop: initialize port structures before publishing them Guixin Liu
2026-12-02  6:33   ` Christoph Hellwig

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.