Commit f065fd099fc475333fc7a55677a7f64764445d55
Committed by
Steve French
1 parent
4ca3a99ca4
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
CIFS: Fix possible freed pointer dereference in CIFS_SessSetup
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
fs/cifs/sess.c
... | ... | @@ -876,7 +876,8 @@ |
876 | 876 | pSMB = (SESSION_SETUP_ANDX *)iov[0].iov_base; |
877 | 877 | smb_buf = (struct smb_hdr *)iov[0].iov_base; |
878 | 878 | |
879 | - if ((type == RawNTLMSSP) && (smb_buf->Status.CifsError == | |
879 | + if ((type == RawNTLMSSP) && (resp_buf_type != CIFS_NO_BUFFER) && | |
880 | + (smb_buf->Status.CifsError == | |
880 | 881 | cpu_to_le32(NT_STATUS_MORE_PROCESSING_REQUIRED))) { |
881 | 882 | if (phase != NtLmNegotiate) { |
882 | 883 | cERROR(1, "Unexpected more processing error"); |