1
0
Fork 0
alistair23-linux/drivers/target
Dan Carpenter 41324c4830 scsi: target: tcmu: Fix a use after free in tcmu_check_expired_queue_cmd()
[ Upstream commit 9d7464b188 ]

The pr_debug() dereferences "cmd" after we already freed it by calling
tcmu_free_cmd(cmd).  The debug printk needs to be done earlier.

Link: https://lore.kernel.org/r/20200523101129.GB98132@mwanda
Fixes: 61fb248221 ("scsi: target: tcmu: Userspace must not complete queued commands")
Reviewed-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:34 +02:00
..
iscsi scsi: target: fix hang when multiple threads try to destroy the same iscsi session 2020-04-21 09:05:04 +02:00
loopback scsi: target: loopback: Fix READ with data and sensebytes 2020-06-24 17:50:25 +02:00
sbp treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
tcm_fc mm: introduce page_size() 2019-09-24 15:54:08 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile
target_core_alua.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_alua.h
target_core_configfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
target_core_device.c scsi: target: core: Do not overwrite CDB byte 1 2019-10-17 21:40:25 -04:00
target_core_fabric_configfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
target_core_fabric_lib.c scsi: target: fix PR IN / READ FULL STATUS for FC 2020-05-02 08:48:56 +02:00
target_core_file.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_file.h
target_core_hba.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_iblock.c scsi: target/iblock: fix WRITE SAME zeroing 2020-05-06 08:15:14 +02:00
target_core_iblock.h scsi: target/core: Use the SECTOR_SHIFT constant 2018-10-16 01:13:35 -04:00
target_core_internal.h scsi: target/core: Make ABORT and LUN RESET handling synchronous 2018-12-07 21:22:55 -05:00
target_core_pr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_pr.h scsi: target/core: Rework the SPC-2 reservation handling code 2019-04-12 20:20:05 -04:00
target_core_pscsi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_pscsi.h
target_core_rd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_rd.h
target_core_sbc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_spc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_stat.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_tmr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_tpg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_transport.c scsi: target: Put lun_ref at end of tmr processing 2020-05-27 17:46:40 +02:00
target_core_ua.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_ua.h
target_core_user.c scsi: target: tcmu: Fix a use after free in tcmu_check_expired_queue_cmd() 2020-06-24 17:50:34 +02:00
target_core_xcopy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
target_core_xcopy.h