RE: [PATCH v1 3/3] CIFS: implement v3.11 preauth integrity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pavel,

Pavel Shilovskiy <pshilov@xxxxxxxxxxxxx> writes:
> Do we skip only last sess setup response or every response with SIGNED flag? In the latter case the comment should reflect it.

We want to skip the last sess setup response, and it happens to also be
signed which is how I detect it.

I guess the proper way would be to add a session/tcon
update_preauth_hash flag and set it to 0 once the final sess setup
request is sent. Do you think we should change this?

>> +#ifdef CONFIG_CIFS_SMB311
>> +       if (ses->status == CifsNew)
>> +               smb311_update_preauth_hash(ses, rqst->rq_iov+1,
>> +                                          rqst->rq_nvec-1);
>> +#endif
>
> Is there a race here? Can it be a situation where ses->server->secmech.sdescsha512 is being updated by multiple threads calling cifs_send_recv()? E.g. we are trying to establish two smb connections over the same TCP connection in the same time. It seems that ses->server->secmech.sdescsha512 may be corrupted which will result in signing errors.

I'm not sure what happens if we issue 2 mount calls //server/A and
//server/B using the same credentials in parallel. Depending on which
step the first mount call is no tcp or sess can be reused. Isn't cifs.ko
waiting for session to be established (ie. after preauth) before trying
to reuse them?

-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux