kernel_optimize_test/drivers/target
Xiaoguang Wang aec36b98a1 scsi: target: tcmu: Fix possible page UAF
[ Upstream commit a6968f7a367f128d120447360734344d5a3d5336 ]

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:23:21 +02:00
..
iscsi scsi: target: iscsi: Make sure the np under each tpg is unique 2022-02-16 12:54:19 +01:00
loopback
sbp
tcm_fc
Kconfig
Makefile
target_core_alua.c scsi: target: Fix alua_tg_pt_gps_count tracking 2021-11-26 10:39:11 +01:00
target_core_alua.h
target_core_configfs.c scsi: target: Fix the pgr/alua_support_store functions 2021-09-30 10:11:03 +02:00
target_core_device.c scsi: target: Fix ordered tag handling 2021-11-26 10:39:11 +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 10:39:11 +01:00
target_core_pr.c
target_core_pr.h
target_core_pscsi.c
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 14:35:39 +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 10:39:11 +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:23:21 +02:00
target_core_xcopy.c
target_core_xcopy.h