aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorWenchao Hao <haowenchao@huawei.com>2022-03-09 20:57:59 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2022-03-15 00:20:16 -0400
commit8709c323091be019f76a49cf783052a5636aca85 (patch)
treec6b33d2807e849584d32de862a6ca432380444a5 /include/scsi
parentscsi: libiscsi: Add iscsi_cls_conn to sysfs after initialization (diff)
downloadlinux-dev-8709c323091be019f76a49cf783052a5636aca85.tar.xz
linux-dev-8709c323091be019f76a49cf783052a5636aca85.zip
scsi: libiscsi: Teardown iscsi_cls_conn gracefully
Commit 1b8d0300a3e9 ("scsi: libiscsi: Fix UAF in iscsi_conn_get_param()/iscsi_conn_teardown()") fixed an UAF in iscsi_conn_get_param() and introduced 2 tmp_xxx varibles. We can gracefully fix this UAF with the help of device_del(). Calling iscsi_remove_conn() at the beginning of iscsi_conn_teardown would make userspace unable to see iscsi_cls_conn. This way we we can free memory safely. Remove iscsi_destroy_conn() since it is no longer used. Link: https://lore.kernel.org/r/20220310015759.3296841-4-haowenchao@huawei.com Reviewed-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Wenchao Hao <haowenchao@huawei.com> Signed-off-by: Wu Bo <wubo40@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_transport_iscsi.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 97e947962b52..38e4a67f5922 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -448,7 +448,6 @@ extern int iscsi_add_conn(struct iscsi_cls_conn *conn);
extern void iscsi_remove_conn(struct iscsi_cls_conn *conn);
extern void iscsi_put_conn(struct iscsi_cls_conn *conn);
extern void iscsi_get_conn(struct iscsi_cls_conn *conn);
-extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn);
extern void iscsi_unblock_session(struct iscsi_cls_session *session);
extern void iscsi_block_session(struct iscsi_cls_session *session);
extern struct iscsi_endpoint *iscsi_create_endpoint(int dd_size);