Commit d856803
committed
scsi: libfc: Fix use after free in fc_exch_abts_resp()
jira VULN-49951
cve CVE-2022-49114
commit-author Jianglei Nie <niejianglei2021@163.com>
commit 271add1
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>
(cherry picked from commit 271add1)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent a5cc603 commit d856803
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1701 | 1701 | | |
1702 | 1702 | | |
1703 | 1703 | | |
| 1704 | + | |
1704 | 1705 | | |
1705 | 1706 | | |
1706 | 1707 | | |
| |||
0 commit comments