Files
linux-stable-mirror/drivers/scsi
Mike Christie 0aaabdb900 scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress
[ Upstream commit f484a794e4 ]

If during iscsi_sw_tcp_session_create() iscsi_tcp_r2tpool_alloc() fails,
userspace could be accessing the host's ipaddress attr. If we then free the
session via iscsi_session_teardown() while userspace is still accessing the
session we will hit a use after free bug.

Set the tcp_sw_host->session after we have completed session creation and
can no longer fail.

Link: https://lore.kernel.org/r/20230117193937.21244-3-michael.christie@oracle.com
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Acked-by: Ding Hui <dinghui@sangfor.com.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-09 11:26:39 +01:00
..
2022-04-08 14:23:33 +02:00
2022-12-31 13:14:25 +01:00
2022-02-16 12:56:14 +01:00
2022-01-27 11:05:03 +01:00
2021-08-23 12:54:30 -06:00