Skip to content

Commit

Permalink
cifs: Always update signing key of first channel
Browse files Browse the repository at this point in the history
Update signing key of first channel whenever generating the master
sigining/encryption/decryption keys rather than only in cifs_mount().

This also fixes reconnect when re-establishing smb sessions to other
servers.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Paulo Alcantara (SUSE) authored and Steve French committed Nov 25, 2019
1 parent 5bb30a4 commit ff6b6f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/cifs/smb2transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ generate_smb3signingkey(struct cifs_ses *ses,
SMB3_SIGN_KEY_SIZE);
if (rc)
return rc;

memcpy(ses->chans[0].signkey, ses->smb3signingkey,
SMB3_SIGN_KEY_SIZE);

rc = generate_key(ses, ptriplet->encryption.label,
ptriplet->encryption.context,
ses->smb3encryptionkey,
Expand Down

0 comments on commit ff6b6f3

Please sign in to comment.