Skip to content

Commit

Permalink
CIFS: Fix possible freed pointer dereference in CIFS_SessSetup
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <smfrench@gmail.com>
  • Loading branch information
Pavel Shilovsky authored and Steve French committed Sep 27, 2012
1 parent 4ca3a99 commit f065fd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/cifs/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,8 @@ CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses,
pSMB = (SESSION_SETUP_ANDX *)iov[0].iov_base;
smb_buf = (struct smb_hdr *)iov[0].iov_base;

if ((type == RawNTLMSSP) && (smb_buf->Status.CifsError ==
if ((type == RawNTLMSSP) && (resp_buf_type != CIFS_NO_BUFFER) &&
(smb_buf->Status.CifsError ==
cpu_to_le32(NT_STATUS_MORE_PROCESSING_REQUIRED))) {
if (phase != NtLmNegotiate) {
cERROR(1, "Unexpected more processing error");
Expand Down

0 comments on commit f065fd0

Please sign in to comment.