Re: [PATCH v6] scsi:iscsi: Fix multiple iscsi session unbind event sent to userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wenchao,

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Wenchao-Hao/scsi-iscsi-Fix-multiple-iscsi-session-unbind-event-sent-to-userspace/20221107-202840
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20221108014414.3510940-1-haowenchao%40huawei.com
patch subject: [PATCH v6] scsi:iscsi: Fix multiple iscsi session unbind event sent to userspace
config: m68k-randconfig-m031-20221108
compiler: m68k-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Reported-by: Dan Carpenter <error27@xxxxxxxxx>

smatch warnings:
drivers/scsi/scsi_transport_iscsi.c:1691 iscsi_session_target_state_name() error: buffer overflow 'iscsi_session_target_state_names' 4 <= 4

vim +/iscsi_session_target_state_names +1691 drivers/scsi/scsi_transport_iscsi.c

3aa534a2c8b080 Wenchao Hao 2022-11-07  1686  static const char *iscsi_session_target_state_name(int state)
3aa534a2c8b080 Wenchao Hao 2022-11-07  1687  {
3aa534a2c8b080 Wenchao Hao 2022-11-07  1688  	if (state > ISCSI_SESSION_TARGET_MAX)

Should be >=

3aa534a2c8b080 Wenchao Hao 2022-11-07  1689  		return NULL;
3aa534a2c8b080 Wenchao Hao 2022-11-07  1690  
3aa534a2c8b080 Wenchao Hao 2022-11-07 @1691  	return iscsi_session_target_state_names[state];
3aa534a2c8b080 Wenchao Hao 2022-11-07  1692  }

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux