[PATCH 1/4] nvmet: fix NULL pointer dereference in nvmet_execute_identify_nslist()
Guixin Liu
kanie at linux.alibaba.com
Thu Jul 30 18:57:27 PDT 2026
在 2026/7/30 19:34, Christoph Hellwig 写道:
> 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?
Sure, I will send a patch for that.
Best Regards,
Guixin Liu
More information about the Linux-nvme
mailing list