linux-stable/drivers/scsi/libfc
Jianglei Nie 412dd8299b scsi: libfc: Fix use after free in fc_exch_abts_resp()
[ Upstream commit 271add1199 ]

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 19:27:20 +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 scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
fc_encode.h scsi: libfc: Add FDMI-2 attributes 2021-06-10 00:03:56 -04:00
fc_exch.c scsi: libfc: Fix use after free in fc_exch_abts_resp() 2022-04-13 19:27:20 +02:00
fc_fcp.c scsi: libfc: Call scsi_done() directly 2021-10-16 21:28:48 -04:00
fc_frame.c
fc_libfc.c scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
fc_libfc.h
fc_lport.c scsi: libfc: FDMI enhancements 2021-06-10 00:03:56 -04:00
fc_npiv.c
fc_rport.c scsi: libfc: Fix array index out of bound exception 2021-06-28 22:31:16 -04:00
Makefile