[PATCH 1/4] nvmet: fix NULL pointer dereference in nvmet_execute_identify_nslist()
Christoph Hellwig
hch at lst.de
Thu Jul 30 04:34:17 PDT 2026
Looks good:
Reviewed-by: Christoph Hellwig <hch at lst.de>
On Thu, Jul 30, 2026 at 12:31:02PM +0800, Guixin Liu wrote:
> When a host issues an Identify command with CNS 07h (Active Namespace ID
> List for a specific I/O Command Set), nvmet_execute_identify_nslist() is
> called with match_css set. The command-set filter dereferences req->ns,
> but this handler never calls nvmet_req_find_ns(), so req->ns is always
> NULL (nvmet_req_init() resets it to NULL). As soon as an enabled
> namespace with an NSID greater than the requested value exists,
> req->ns->csi dereferences a NULL pointer and oopses.
Can you submit a testcase for that to blktests?
More information about the Linux-nvme
mailing list