linux-stable/drivers/scsi/libfc
Jianglei Nie 271add1199 scsi: libfc: Fix use after free in fc_exch_abts_resp()
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>
2022-03-08 22:32:31 -05:00
..
Makefile
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: Replace one-element arrays with flexible-array members 2022-02-27 21:17:37 -05:00
fc_exch.c scsi: libfc: Fix use after free in fc_exch_abts_resp() 2022-03-08 22:32:31 -05:00
fc_fcp.c scsi: libfc: Stop using the SCSI pointer 2022-02-22 21:11:05 -05:00
fc_frame.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fc_libfc.c scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
fc_libfc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fc_lport.c scsi: libfc: FDMI enhancements 2021-06-10 00:03:56 -04:00
fc_npiv.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fc_rport.c scsi: libfc: Fix array index out of bound exception 2021-06-28 22:31:16 -04:00