linux-stable/drivers/target
Xiaoguang Wang d7c5d79e50 scsi: target: tcmu: Fix possible page UAF
[ Upstream commit a6968f7a36 ]

tcmu_try_get_data_page() looks up pages under cmdr_lock, but it does not
take refcount properly and just returns page pointer. When
tcmu_try_get_data_page() returns, the returned page may have been freed by
tcmu_blocks_release().

We need to get_page() under cmdr_lock to avoid concurrent
tcmu_blocks_release().

Link: https://lore.kernel.org/r/20220311132206.24515-1-xiaoguang.wang@linux.alibaba.com
Reviewed-by: Bodo Stroesser <bostroesser@gmail.com>
Signed-off-by: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-20 09:08:32 +02:00
..
iscsi scsi: target: iscsi: Make sure the np under each tpg is unique 2022-02-16 12:44:50 +01:00
loopback
sbp
tcm_fc
Kconfig
Makefile
target_core_alua.c scsi: target: Fix alua_tg_pt_gps_count tracking 2021-11-26 11:40:38 +01:00
target_core_alua.h
target_core_configfs.c
target_core_device.c scsi: target: Fix ordered tag handling 2021-11-26 11:40:38 +01:00
target_core_fabric_configfs.c
target_core_fabric_lib.c
target_core_file.c
target_core_file.h
target_core_hba.c
target_core_iblock.c
target_core_iblock.h
target_core_internal.h scsi: target: Fix ordered tag handling 2021-11-26 11:40:38 +01:00
target_core_pr.c
target_core_pr.h
target_core_pscsi.c scsi: target: pscsi: Fix warning in pscsi_complete_cmd() 2021-05-22 10:57:18 +02:00
target_core_pscsi.h
target_core_rd.c
target_core_rd.h
target_core_sbc.c scsi: target: Fix protect handling in WRITE SAME(32) 2021-07-28 11:12:18 +02:00
target_core_spc.c
target_core_stat.c
target_core_tmr.c
target_core_tpg.c
target_core_transport.c scsi: target: Fix ordered tag handling 2021-11-26 11:40:38 +01:00
target_core_ua.c
target_core_ua.h
target_core_user.c scsi: target: tcmu: Fix possible page UAF 2022-04-20 09:08:32 +02:00
target_core_xcopy.c scsi: target: Fix XCOPY NAA identifier lookup 2021-01-12 20:09:14 +01:00
target_core_xcopy.h scsi: target: Fix XCOPY NAA identifier lookup 2021-01-12 20:09:14 +01:00