CVE-2019-14861: s4-rpc/dnsserver: Avoid crash in ldb_qsort() via dcesrv_DnssrvEnumRec...
authorAndrew Bartlett <abartlet@samba.org>
Tue, 29 Oct 2019 01:15:36 +0000 (14:15 +1300)
committerKarolin Seeger <kseeger@samba.org>
Tue, 10 Dec 2019 09:18:46 +0000 (09:18 +0000)
commitdefb23732515e3c638d0081f5e4043fbb35d303c
tree1459935e41b210f3250d8aaa673e06f379c221b7
parent4333e41c2243781ae788db8ee7fa6897b0a7e334
CVE-2019-14861: s4-rpc/dnsserver: Avoid crash in ldb_qsort() via dcesrv_DnssrvEnumRecords)

dns_name_compare() had logic to put @ and the top record in the tree being
enumerated first, but if a domain had both then this would break the
older qsort() implementation in ldb_qsort() and cause a read of memory
before the base pointer.

By removing this special case (not required as the base pointer
is already seperatly located, no matter were it is in the
returned records) the crash is avoided.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14138

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