CVE-2015-0240: s3: netlogon: Ensure we don't call talloc_free on an uninitialized...
authorJeremy Allison <jra@samba.org>
Wed, 28 Jan 2015 22:47:31 +0000 (14:47 -0800)
committerKarolin Seeger <kseeger@samba.org>
Sat, 21 Feb 2015 20:00:36 +0000 (21:00 +0100)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11077

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/rpc_server/netlogon/srv_netlog_nt.c

index c903ae857d010b228c88bdd50989522a1067b5a7..cab635fc6eafbf38225fd5e01fd5954c833420df 100644 (file)
@@ -1101,6 +1101,10 @@ static NTSTATUS netr_creds_server_step_check(struct pipes_struct *p,
        bool schannel_global_required = (lp_server_schannel() == true) ? true:false;
        struct loadparm_context *lp_ctx;
 
+       if (creds_out != NULL) {
+               *creds_out = NULL;
+       }
+
        if (schannel_global_required) {
                status = schannel_check_required(&p->auth,
                                                 computer_name,
@@ -1258,7 +1262,7 @@ NTSTATUS _netr_ServerPasswordSet(struct pipes_struct *p,
 {
        NTSTATUS status = NT_STATUS_OK;
        int i;
-       struct netlogon_creds_CredentialState *creds;
+       struct netlogon_creds_CredentialState *creds = NULL;
 
        DEBUG(5,("_netr_ServerPasswordSet: %d\n", __LINE__));