+5
−0
Loading
The fuse command value is a two byte value, but we were only checking to see if the fuse value was equal to SPDK_NVME_CMD_FUSE_FIRST or SPDK_NVME_CMD_FUSE_SECOND in spdk_nvmf_ctrlr_process_io_fused_cmd. If a haywire initiator sent a command with a fused value equal to SPDK_NVME_CMD_FUSE_MASK, that would result in us skipping all checks and dereferencing a null pointer in spdk_nvmf_bdev_ctrlr_compare_and_write_cmd. To fix this, add an extra condition to validate the cuse field. Change-Id: I1ec4169ff5637562effd694f7046c6e3389627f1 Signed-off-by:Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483123 Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by:
Alexey Marchuk <alexeymar@mellanox.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>