smbd: Fix clients connecting unencrypted with PROTOCOL_SMB2_24 or higher.
authorJeremy Allison <jra@samba.org>
Tue, 16 Jun 2015 22:50:30 +0000 (15:50 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 17 Jun 2015 20:10:24 +0000 (22:10 +0200)
Nonce code was terminating connections where xconn->smb2.server.cipher == 0.

If no negotiated cipher (smb2.server.cipher is zero) set nonce_high_max to zero.
smb2_get_new_nonce() returns NT_STATUS_ENCRYPTION_FAILED if it is ever called with
session->nonce_high_max == 0.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11300

Signed-off-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_sesssetup.c

index 3e80da81993be7fe78461fa2f0f3057cdf951b5d..da7adb3031e2c47873f374e5e328351ceeeeda0f 100644 (file)
@@ -372,8 +372,8 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session,
                        nonce_size = AES_GCM_128_IV_SIZE;
                        break;
                default:
-                       ZERO_STRUCT(session_key);
-                       return NT_STATUS_INVALID_PARAMETER;
+                       nonce_size = 0;
+                       break;
                }
                x->nonce_high_max = SMB2_NONCE_HIGH_MAX(nonce_size);
                x->nonce_high = 0;