summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-10-21 12:12:10 +1300
committerKarolin Seeger <kseeger@samba.org>2019-12-03 13:10:21 +0100
commit678888b41bd07898399b5a66739796b04dbdf33a (patch)
tree34a5d8da325905b71409af876ba1ebaf18d972a8
parent9324b7a9e4ce358832ca882671c25c2afe677121 (diff)
downloadsamba-678888b41bd07898399b5a66739796b04dbdf33a.tar.gz
CVE-2019-14861: s4-rpc_server: Remove special case for @ in dns_build_tree()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14138 Signed-off-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/rpc_server/dnsserver/dnsdata.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/rpc_server/dnsserver/dnsdata.c b/source4/rpc_server/dnsserver/dnsdata.c
index 2dc098a64a0..0739ea3f476 100644
--- a/source4/rpc_server/dnsserver/dnsdata.c
+++ b/source4/rpc_server/dnsserver/dnsdata.c
@@ -801,10 +801,11 @@ struct dns_tree *dns_build_tree(TALLOC_CTX *mem_ctx, const char *name, struct ld
goto failed;
}
- if (strcmp(ptr, "@") == 0) {
- base->data = res->msgs[i];
- continue;
- } else if (strcasecmp(ptr, name) == 0) {
+ /*
+ * This might be the sub-domain in the zone being
+ * requested, or @ for the root of the zone
+ */
+ if (strcasecmp(ptr, name) == 0) {
base->data = res->msgs[i];
continue;
}