The c-ares function ares_parse_naptr_reply(), which is used for parsing NAPTR responses, could be triggered to read memory outside of the given input buffer if the passed in DNS response packet was crafted in a particular way.
ares_parse_naptr_reply()
bugzilla.redhat.com/show_bug.cgi?id=1463132
c-ares.haxx.se/adv_20170620.html