Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] nvme: a few error-path and validation fixes
@ 2026-07-30  4:31 Guixin Liu
  2026-07-30  4:31 ` [PATCH 1/4] nvmet: fix NULL pointer dereference in nvmet_execute_identify_nslist() Guixin Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Guixin Liu @ 2026-07-30  4:31 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	Hannes Reinecke, Nilay Shroff, Chaitanya Kulkarni
  Cc: linux-nvme

This series collects four independent fixes found while auditing error
and command-processing paths in the NVMe host and target drivers. Each
is standalone; they only share the same subsystem.

  1. nvmet: an Identify CNS 07h (active NS list for a command set)
     dereferences req->ns, which is always NULL on that path -> NULL
     pointer oops. Also fixes the filter to test the iterated ns->csi.

  2. nvmet: nvmet_ns_enable() ignores the percpu_ref_init() return value
     and reports success to userspace when it fails, leaving the ns dead.

  3. nvme-pci: the per-NUMA-node descriptor DMA pools, created lazily on
     admin tag set allocation, are only freed in nvme_remove(); a probe
     failure after that point leaks them.

  4. nvme: nvme_query_fdp_info() trusts the device-supplied nruhsd count
     and can read past the fixed-size RUH status buffer (heap OOB read).

Found by code audit. #1 and #2 are functional/crash fixes; #3 is a
resource leak; #4 is device-triggered hardening. Compile-tested.

Guixin Liu (4):
  nvmet: fix NULL pointer dereference in nvmet_execute_identify_nslist()
  nvmet: propagate percpu_ref_init() failure in nvmet_ns_enable()
  nvme-pci: release descriptor pools on probe failure
  nvme: clamp FDP placement handle count to the buffer size

 drivers/nvme/host/core.c        | 1 +
 drivers/nvme/host/pci.c         | 1 +
 drivers/nvme/target/admin-cmd.c | 2 +-
 drivers/nvme/target/core.c      | 3 ++-
 4 files changed, 5 insertions(+), 2 deletions(-)


base-commit: 11028ab62899e4191e074ee364c712b77823a9c4
-- 
2.43.7



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

end of thread, other threads:[~2026-07-30 12:41 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30  4:31 [PATCH 0/4] nvme: a few error-path and validation fixes Guixin Liu
2026-07-30  4:31 ` [PATCH 1/4] nvmet: fix NULL pointer dereference in nvmet_execute_identify_nslist() Guixin Liu
2026-07-30  8:22   ` Hannes Reinecke
2026-07-30 11:34   ` Christoph Hellwig
2026-07-30 12:06   ` Nilay Shroff
2026-07-30  4:31 ` [PATCH 2/4] nvmet: propagate percpu_ref_init() failure in nvmet_ns_enable() Guixin Liu
2026-07-30  8:23   ` Hannes Reinecke
2026-07-30 11:38   ` Christoph Hellwig
2026-07-30 12:06   ` Nilay Shroff
2026-07-30  4:31 ` [PATCH 3/4] nvme-pci: release descriptor pools on probe failure Guixin Liu
2026-07-30  8:23   ` Hannes Reinecke
2026-07-30 11:34   ` Christoph Hellwig
2026-07-30 11:49   ` Kanchan Joshi
2026-07-30 12:07   ` Nilay Shroff
2026-07-30  4:31 ` [PATCH 4/4] nvme: clamp FDP placement handle count to the buffer size Guixin Liu
2026-07-30  8:24   ` Hannes Reinecke
2026-07-30  9:40   ` Kanchan Joshi
2026-07-30 11:37     ` Christoph Hellwig
2026-07-30 12:41       ` Keith Busch
2026-07-30 11:36   ` Christoph Hellwig
2026-07-30 12:08   ` Nilay Shroff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox