diff options
author | Wenchao Hao <haowenchao@huawei.com> | 2022-03-09 20:57:59 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-03-15 00:20:16 -0400 |
commit | 8709c323091be019f76a49cf783052a5636aca85 (patch) | |
tree | c6b33d2807e849584d32de862a6ca432380444a5 /COPYING | |
parent | 7dae459f5e56a89ab01413ae055595c982713349 (diff) | |
download | linux-8709c323091be019f76a49cf783052a5636aca85.tar.bz2 |
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 'COPYING')
0 files changed, 0 insertions, 0 deletions