CVE-2019-14861: s4-rpc_server: Remove special case for @ in dns_build_tree()
authorAndrew Bartlett <abartlet@samba.org>
Sun, 20 Oct 2019 23:12:10 +0000 (12:12 +1300)
committerKarolin Seeger <kseeger@samba.org>
Tue, 10 Dec 2019 09:18:46 +0000 (09:18 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14138

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source4/rpc_server/dnsserver/dnsdata.c

index 2dc098a64a0cb724efd15714395ad9ce740987e8..0739ea3f476c23b09f1f9afd8682fb6f7757344e 100644 (file)
@@ -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;
                }