Skip to content

Commit

Permalink
12977 smb3 server encryption leak in smb2_send_reply
Browse files Browse the repository at this point in the history
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
Approved by: Robert Mustacchi <rm@fingolfin.org>
  • Loading branch information
bergerspencer authored and Dan McDonald committed Aug 5, 2020
1 parent fe417ad commit 2c83406
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions usr/src/uts/common/fs/smbsrv/smb2_dispatch.c
Expand Up @@ -1492,8 +1492,7 @@ smb2_send_reply(smb_request_t *sr)

if ((session->capabilities & SMB2_CAP_ENCRYPTION) == 0 ||
sr->tform_ssn == NULL) {
if (smb_session_send(sr->session, 0, &sr->reply) == 0)
sr->reply.chain = 0;
(void) smb_session_send(sr->session, 0, &sr->reply);
return;
}

Expand All @@ -1518,8 +1517,8 @@ smb2_send_reply(smb_request_t *sr)
goto errout;
}

if (smb_session_send(sr->session, 0, &enc_reply) == 0)
enc_reply.chain = 0;
(void) smb_session_send(sr->session, 0, &enc_reply);
kmem_free(tmpbuf, buflen);
return;

errout:
Expand Down

0 comments on commit 2c83406

Please sign in to comment.