diff options
| author | Guixin Liu <kanie@linux.alibaba.com> | 2026-08-04 11:36:05 +0800 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-08-11 08:53:28 -0700 |
| commit | f594863967d87b7fcbff6e724d51135fd701a13d (patch) | |
| tree | c7db2f61e2ffec1afe06bf10a68bfb4d9e9e2898 /tools/perf/scripts/python | |
| parent | c9e9bb757971485b4e8414b1744507af186d72c9 (diff) | |
nvmet: fix NULL pointer dereference in nvmet_execute_identify_ns_zns()
When a host issues an Identify command with CNS 05h (I/O Command Set
specific Identify Namespace) and CSI 02h (ZNS) targeting a file-backed
namespace, nvmet_execute_identify_ns_zns() calls bdev_is_zoned() on
req->ns->bdev. A file-backed namespace has no block device, so
req->ns->bdev is NULL and bdev_is_zoned() dereferences it, oopsing.
The I/O command set is selected by the host-supplied CSI field and the
command is routed here whenever CONFIG_BLK_DEV_ZONED is enabled,
independent of the namespace backing type, so any file-backed namespace
is exposed.
Reject the command with Invalid Field when the namespace is not backed
by a block device.
Fixes: aaf2e048af27 ("nvmet: add ZBD over ZNS backend support")
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
