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>
Sun, 22 Feb 2015 14:02:26 +0000 (15:02 +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 3b1cdcff287c626f371d80f507cab9fb38572b13..cf7cadac038b46172a7356f590f2da3a776f349a 100644 (file)
@@ -1070,6 +1070,10 @@ static NTSTATUS netr_creds_server_step_check(struct pipes_struct *p,
        NTSTATUS status;
        bool schannel_global_required = (lp_server_schannel() == true) ? true:false;
 
+       if (creds_out != NULL) {
+               *creds_out = NULL;
+       }
+
        if (schannel_global_required) {
                status = schannel_check_required(&p->auth,
                                                 computer_name,
@@ -1205,7 +1209,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__));