Commit f560cda9 authored by Ronnie Sahlberg's avatar Ronnie Sahlberg Committed by Steve French

cifs: dump the session id and keys also for SMB2 sessions

We already dump these keys for SMB3, lets also dump it for SMB2
sessions so that we can use the session key in wireshark to check and validate
that the signatures are correct.
Signed-off-by: default avatarRonnie Sahlberg <>
Signed-off-by: default avatarSteve French <>
Reviewed-by: default avatarAurelien Aptel <>
parent 8f3d9f35
......@@ -1552,6 +1552,21 @@ SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data)
rc = SMB2_sess_establish_session(sess_data);
if (ses->server->dialect < SMB30_PROT_ID) {
cifs_dbg(VFS, "%s: dumping generated SMB2 session keys\n", __func__);
* The session id is opaque in terms of endianness, so we can't
* print it as a long long. we dump it as we got it on the wire
cifs_dbg(VFS, "Session Id %*ph\n", (int)sizeof(ses->Suid),
cifs_dbg(VFS, "Session Key %*ph\n",
SMB2_NTLMV2_SESSKEY_SIZE, ses->auth_key.response);
cifs_dbg(VFS, "Signing Key %*ph\n",
SMB3_SIGN_KEY_SIZE, ses->auth_key.response);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment