From 6df12f5e99314509226ce73fc60e8beb702029a5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 12 Feb 2020 15:39:54 +0100 Subject: [PATCH 1/2] auth: Fix CID 1458420 Null pointer dereferences (REVERSE_INULL) BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247 Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher (cherry picked from commit 503fc8f2ba662ecbec0788bd1710440464dc5cfd) --- source3/auth/auth_sam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index c6357c696ea..738c2a2a788 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -80,12 +80,13 @@ static NTSTATUS auth_samstrict_auth(const struct auth_context *auth_context, const struct auth_usersupplied_info *user_info, struct auth_serversupplied_info **server_info) { - const char *effective_domain = user_info->mapped.domain_name; + const char *effective_domain = NULL; bool is_local_name, is_my_domain; if (!user_info || !auth_context) { return NT_STATUS_LOGON_FAILURE; } + effective_domain = user_info->mapped.domain_name; if (user_info->mapped.account_name == NULL || user_info->mapped.account_name[0] == '\0') -- 2.17.1 From 9f72866e56d89d58accda370953e3d9edb2a5ca5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 12 Feb 2020 15:40:32 +0100 Subject: [PATCH 2/2] auth: Fix CID 1458418 Null pointer dereferences (REVERSE_INULL) BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247 Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher (cherry picked from commit ef0350221e194a3dd3350eab02b38baeb32d8fd3) --- source3/auth/auth_sam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index 738c2a2a788..3c12f959faf 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -188,12 +188,13 @@ static NTSTATUS auth_sam_netlogon3_auth(const struct auth_context *auth_context, const struct auth_usersupplied_info *user_info, struct auth_serversupplied_info **server_info) { - const char *effective_domain = user_info->mapped.domain_name; + const char *effective_domain = NULL; bool is_my_domain; if (!user_info || !auth_context) { return NT_STATUS_LOGON_FAILURE; } + effective_domain = user_info->mapped.domain_name; if (user_info->mapped.account_name == NULL || user_info->mapped.account_name[0] == '\0') -- 2.17.1