Skip to content

Commit ff6b6f3

Browse files
Paulo Alcantara (SUSE)smfrench
authored andcommitted
cifs: Always update signing key of first channel
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) <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 5bb30a4 commit ff6b6f3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/cifs/smb2transport.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,10 @@ generate_smb3signingkey(struct cifs_ses *ses,
407407
SMB3_SIGN_KEY_SIZE);
408408
if (rc)
409409
return rc;
410+
411+
memcpy(ses->chans[0].signkey, ses->smb3signingkey,
412+
SMB3_SIGN_KEY_SIZE);
413+
410414
rc = generate_key(ses, ptriplet->encryption.label,
411415
ptriplet->encryption.context,
412416
ses->smb3encryptionkey,

0 commit comments

Comments
 (0)