From 1d573daf6c9811d963c8c0b832ffa134a175fddc Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 16 Feb 2015 10:56:03 +0100 Subject: [PATCH] auth: Make sure that creds_out is initialized with NULL. This is an additional patch for CVE-2015-0240. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11077#c32 Pair-Programmed-With: Michael Adam Pair-Programmed-With: Andreas Schneider Signed-off-by: Michael Adam Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke --- libcli/auth/schannel_state_tdb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcli/auth/schannel_state_tdb.c b/libcli/auth/schannel_state_tdb.c index 6abb69b2e12..d8d5f84cb3b 100644 --- a/libcli/auth/schannel_state_tdb.c +++ b/libcli/auth/schannel_state_tdb.c @@ -286,6 +286,10 @@ NTSTATUS schannel_check_creds_state(TALLOC_CTX *mem_ctx, NTSTATUS status; int ret; + if (creds_out != NULL) { + *creds_out = NULL; + } + tmpctx = talloc_named(mem_ctx, 0, "schannel_check_creds_state"); if (!tmpctx) { return NT_STATUS_NO_MEMORY; -- 2.34.1