scsi: libiscsi: Fix use-after-free race during iscsi_session_teardown
authorKhazhismel Kumykov <khazhy@google.com>
Thu, 13 Jul 2017 16:11:21 +0000 (09:11 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 3 Oct 2017 02:23:21 +0000 (22:23 -0400)
commit9e10b5121ad991ea6e84ca40b15a04cdc551bfe9
tree46ec66e479d194da6637be04d20d8ea9d243a8c5
parent77082ca503bed061f7fbda7cfd7c93beda967a41
scsi: libiscsi: Fix use-after-free race during iscsi_session_teardown

Session attributes exposed through sysfs were freed before the device
was destroyed, resulting in a potential use-after-free. Free these
attributes after removing the device.

Signed-off-by: Khazhismel Kumykov <khazhy@google.com>
Acked-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libiscsi.c