android_kernel_xiaomi_sm8450/drivers/scsi/libfc
Jianglei Nie 1d7effe5ff scsi: libfc: Fix use after free in fc_exch_abts_resp()
[ Upstream commit 271add11994ba1a334859069367e04d2be2ebdd4 ]

fc_exch_release(ep) will decrease the ep's reference count. When the
reference count reaches zero, it is freed. But ep is still used in the
following code, which will lead to a use after free.

Return after the fc_exch_release() call to avoid use after free.

Link: https://lore.kernel.org/r/20220303015115.459778-1-niejianglei2021@163.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-13 21:00:59 +02:00
..
fc_disc.c scsi: libfc: Fix passing zero to 'PTR_ERR' warning 2020-09-15 17:51:39 -04:00
fc_elsct.c
fc_exch.c scsi: libfc: Fix use after free in fc_exch_abts_resp() 2022-04-13 21:00:59 +02:00
fc_fcp.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
fc_frame.c
fc_libfc.c
fc_libfc.h
fc_lport.c scsi: libfc: Fix a format specifier 2021-05-11 14:47:31 +02:00
fc_npiv.c
fc_rport.c scsi: libfc: Fix array index out of bound exception 2021-07-25 14:36:16 +02:00
Makefile