s3-schannel: Fix Bug #6697. Interdomain trusts with Windows 2008 R2 DCs.
authorGünther Deschner <gd@samba.org>
Tue, 8 Sep 2009 09:57:52 +0000 (11:57 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 8 Sep 2009 10:40:07 +0000 (12:40 +0200)
The Schannel verifier (aka NL_AUTH_SIGNATURE) structure (32 byte) sent from a
W2k8r2 DC is passed in a buffer with the size of a NL_AUTH_SHA2_SIGNATURE (56
byte). We should just ignore the remaining 12 zeroed bytes and proceed.

Guenther

source3/include/rpc_dce.h
source3/rpc_client/cli_pipe.c

index 580b14f1d810ad9a50e21b658d7b119b1474a15e..d3c5c42c756b44ab3582be9e02c9276378a3cbee 100644 (file)
@@ -150,7 +150,7 @@ enum schannel_direction {
 };
 
 /* Maximum size of the signing data in a fragment. */
-#define RPC_MAX_SIGN_SIZE 0x20 /* 32 */
+#define RPC_MAX_SIGN_SIZE 0x38 /* 56 */
 
 /* Maximum PDU fragment size. */
 /* #define MAX_PDU_FRAG_LEN 0x1630             this is what wnt sets */
index 57f49fb83aa43763154540df46d459abe7ad0d6f..9aba938ffe09ab0b276ee0f77033c4ddf6c4b529 100644 (file)
@@ -683,7 +683,7 @@ static NTSTATUS cli_pipe_verify_schannel(struct rpc_pipe_client *cli, RPC_HDR *p
                return NT_STATUS_OK;
        }
 
-       if (auth_len != RPC_AUTH_SCHANNEL_SIGN_OR_SEAL_CHK_LEN) {
+       if (auth_len < RPC_AUTH_SCHANNEL_SIGN_OR_SEAL_CHK_LEN) {
                DEBUG(0,("cli_pipe_verify_schannel: auth_len %u.\n", (unsigned int)auth_len ));
                return NT_STATUS_INVALID_PARAMETER;
        }