b37d1b60f1
In the iSCSI specification, the SCSI device name is defined to be the iSCSI name of the node. However, when g_spdk_iscsi.nodebase is used, the SCSI device name is made of the device specific string (the part of IQN after the colon). The size of the temporary buffer fullname[MAX_TMPBUF] in spdk_iscsi_tgt_node_construct() is 1024 and the size of spdk_scsi_dev.name is 255. The former is larger than the later. However the max length of IQN, EUI, NAA are 223, 20, and 36, respectively. All are less than 255. Hence even if we use fullname as the SCSI device name, no overflow will occur. Even if fullname is more than 255, strncpy() does not write more than 255 in spdk_scsi_dev_construct(). It's possible to check the length of iSCSI name strictly, but I will do the least in this patch. Change-Id: Icc6655fcd846797720867c10e316d2951c664030 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/390360 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> |
||
---|---|---|
.. | ||
app | ||
blobfs/rocksdb | ||
config | ||
cpp_headers | ||
iscsi_tgt | ||
lib | ||
lvol | ||
nvmf | ||
pmem | ||
unit | ||
vhost | ||
Makefile | ||
spdk_cunit.h |