Re: iscsi target: Set conn->sess to NULL when iscsi_login_set_conn_values fails

2018-08-15 Thread Vincent Pelletier
On Wed, 15 Aug 2018 10:19:14 +, Vincent Pelletier wrote: > Fixes a use-after-free reported by KASAN when later > iscsi_target_login_sess_out gets called and it tries to access > conn->sess->se_sess: I could still hit this issue by causing a timeout, and located the guilty kfree: > ret

iscsi target: Let initiator decide whether it wants to authenticate target

2018-08-15 Thread Vincent Pelletier
Do not fail authentication after target is happy with initiator's credentials, when target is configured to authenticate itself to an initiator but current initiator did not provide required values. Also, downgrade "Could not find CHAP_I." to a debug level message, as it will happen normally in

iscsi target: Set conn->sess to NULL when iscsi_login_set_conn_values fails

2018-08-15 Thread Vincent Pelletier
Fixes a use-after-free reported by KASAN when later iscsi_target_login_sess_out gets called and it tries to access conn->sess->se_sess: Disabling lock debugging due to kernel taint iSCSI Login timeout on Network Portal [::]:3260 iSCSI Login negotiation failed.

Re: iscsi target: Set conn->sess to NULL when iscsi_login_set_conn_values fails

2018-08-15 Thread Vincent Pelletier
On Wed, 15 Aug 2018 10:44:34 -0500, Mike Christie wrote: > This is the issue I said was fixed in: > > https://www.spinics.net/lists/target-devel/msg17018.html I did apply this patch, yes. It misses the "if(...){kfree(sess); return ret;}" right after the iscsi_login_set_conn_values call, which

Re: iscsi target: Set conn->sess to NULL when iscsi_login_set_conn_values fails

2018-08-15 Thread Mike Christie
On 08/15/2018 05:19 AM, Vincent Pelletier wrote: > Fixes a use-after-free reported by KASAN when later > iscsi_target_login_sess_out gets called and it tries to access > conn->sess->se_sess: > > Disabling lock debugging due to kernel taint > iSCSI Login timeout on Network Portal [::]:3260 > iSCSI

Re: iscsi target: Set conn->sess to NULL when iscsi_login_set_conn_values fails

2018-08-15 Thread Mike Christie
On 08/15/2018 10:44 AM, Mike Christie wrote: > On 08/15/2018 05:19 AM, Vincent Pelletier wrote: >> Fixes a use-after-free reported by KASAN when later >> iscsi_target_login_sess_out gets called and it tries to access >> conn->sess->se_sess: >> >> Disabling lock debugging due to kernel taint >>

Re: iscsi target: Set conn->sess to NULL when iscsi_login_set_conn_values fails

2018-08-15 Thread Mike Christie
On 08/15/2018 05:19 AM, Vincent Pelletier wrote: > Fixes a use-after-free reported by KASAN when later > iscsi_target_login_sess_out gets called and it tries to access > conn->sess->se_sess: > > Disabling lock debugging due to kernel taint > iSCSI Login timeout on Network Portal [::]:3260 > iSCSI

Re: [PATCH 0/3] scsi: fcoe: memleak fixes

2018-08-15 Thread ard
Hi, On Fri, Aug 10, 2018 at 10:34:49AM +0200, Johannes Thumshirn wrote: > Hannes can you have a look at it? As a side note, I am busy with other things the next 3 weeks, but I will be able to add some printk's and run it in weeks again. If you want me to put probes somewhere to have a better

Re: iscsi target: Set conn->sess to NULL when iscsi_login_set_conn_values fails

2018-08-15 Thread Mike Christie
On 08/15/2018 10:59 AM, Mike Christie wrote: > On 08/15/2018 05:19 AM, Vincent Pelletier wrote: >> Fixes a use-after-free reported by KASAN when later >> iscsi_target_login_sess_out gets called and it tries to access >> conn->sess->se_sess: >> >> Disabling lock debugging due to kernel taint >>

[PATCHv2] iscsi target: Set conn->sess to NULL when iscsi_login_set_conn_values fails

2018-08-15 Thread Vincent Pelletier
Fixes a use-after-free reported by KASAN when later iscsi_target_login_sess_out gets called and it tries to access conn->sess->se_sess: Disabling lock debugging due to kernel taint iSCSI Login timeout on Network Portal [::]:3260 iSCSI Login negotiation failed.

Re: [PATCHv2] iscsi target: Set conn->sess to NULL when iscsi_login_set_conn_values fails

2018-08-15 Thread Mike Christie
On 08/15/2018 05:56 PM, Vincent Pelletier wrote: > Fixes a use-after-free reported by KASAN when later > iscsi_target_login_sess_out gets called and it tries to access > conn->sess->se_sess: > > Disabling lock debugging due to kernel taint > iSCSI Login timeout on Network Portal [::]:3260 > iSCSI