diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-10-21 12:12:10 +1300 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-11-29 11:55:44 +0100 |
commit | 51fa9a6a805e4221120847ee9dcab6796021175a (patch) | |
tree | cb6ad0b90194120603fe23bc8fc17ab26be7dfef | |
parent | 9501741466ba2c0740ffc703c5d242d6b41510e8 (diff) | |
download | samba-51fa9a6a805e4221120847ee9dcab6796021175a.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.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/rpc_server/dnsserver/dnsdata.c b/source4/rpc_server/dnsserver/dnsdata.c index 59e29f029a6..f991f4042e3 100644 --- a/source4/rpc_server/dnsserver/dnsdata.c +++ b/source4/rpc_server/dnsserver/dnsdata.c @@ -795,10 +795,11 @@ struct dns_tree *dns_build_tree(TALLOC_CTX *mem_ctx, const char *name, struct ld for (i=0; i<res->count; i++) { ptr = ldb_msg_find_attr_as_string(res->msgs[i], "name", NULL); - 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; } |