The Samba-Bugzilla – Attachment 13229 Details for
Bug 12795
Remote crash after adding NS or MX records using samba-tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for master.
0001-s4-dns-Ensure-variable-initialization-with-NULL.-Ens.patch (text/plain), 2.58 KB, created by
Jeremy Allison
on 2017-05-22 18:39:28 UTC
(
hide
)
Description:
git-am fix for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2017-05-22 18:39:28 UTC
Size:
2.58 KB
patch
obsolete
>From ada389d41472065ce6da412d5a0a861498223d22 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Mon, 22 May 2017 11:36:50 -0700 >Subject: [PATCH] s4: dns: Ensure variable initialization with NULL. Ensure no > use after free. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Based on a patch from Francis Brosnan Blázquez <francis@aspl.es> > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12795 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source4/rpc_server/dnsserver/dcerpc_dnsserver.c | 24 +++++++++++++----------- > 1 file changed, 13 insertions(+), 11 deletions(-) > >diff --git a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c >index 286da18346b..50c0b99d782 100644 >--- a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c >+++ b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c >@@ -1723,14 +1723,16 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate, > TALLOC_CTX *tmp_ctx; > char *name; > const char * const attrs[] = { "name", "dnsRecord", NULL }; >- struct ldb_result *res; >- struct DNS_RPC_RECORDS_ARRAY *recs; >+ struct ldb_result *res = NULL; >+ struct DNS_RPC_RECORDS_ARRAY *recs = NULL; > char **add_names = NULL; >- char *rname; >+ char *rname = NULL; > int add_count = 0; > int i, ret, len; > WERROR status; >- struct dns_tree *tree, *base, *node; >+ struct dns_tree *tree = NULL; >+ struct dns_tree *base = NULL; >+ struct dns_tree *node = NULL; > > tmp_ctx = talloc_new(mem_ctx); > W_ERROR_HAVE_NO_MEMORY(tmp_ctx); >@@ -1807,9 +1809,9 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate, > } > } > >- talloc_free(res); >- talloc_free(tree); >- talloc_free(name); >+ TALLOC_FREE(res); >+ TALLOC_FREE(tree); >+ TALLOC_FREE(name); > > /* Add any additional records */ > if (select_flag & DNS_RPC_VIEW_ADDITIONAL_DATA) { >@@ -1823,14 +1825,14 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate, > LDB_SCOPE_ONELEVEL, attrs, > "(&(objectClass=dnsNode)(name=%s)(!(dNSTombstoned=TRUE)))", > name); >- talloc_free(name); >+ TALLOC_FREE(name); > if (ret != LDB_SUCCESS) { > continue; > } > if (res->count == 1) { > break; > } else { >- talloc_free(res); >+ TALLOC_FREE(res); > continue; > } > } >@@ -1845,8 +1847,8 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate, > select_flag, rname, > res->msgs[0], 0, recs, > NULL, NULL); >- talloc_free(rname); >- talloc_free(res); >+ TALLOC_FREE(rname); >+ TALLOC_FREE(res); > } > } > >-- >2.13.0.303.g4ebf302169-goog >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 12795
:
13228
|
13229
|
13290
|
13291
|
16179
|
16180