Subject: c-ares crashes

c-ares crashes

From: Andreas Rieke <andreas.rieke_at_isl.de>
Date: Tue, 02 Dec 2008 21:32:40 +0100

Hi,

when using c-ares in the current version 1.5.3 under RedHat linux, my
application sometimes crashes when receiving very long replies. After
initializing c-ares, I call ares_gethostbyaddr, and that function works
well. I see the request going out with my wireshark, and most times, the
response is processed well. However, in case of responses with lots of
names for the address (the UDP response is truncated, and TCP retries
are disabled), the process usually crashes after receiving the answer
from the nameserver (a typical example which definitively crashes is
available at https://www.arp-guard.com/info/download/wireshark.jpg).

I tried to debug the problem as good as I can, and found out that from 5
crashes, 4 occured in the function ares_free_hostent (called from
end_aquery) within the loop after 2-3 successful calls. However, in one
case, the crash happened in ares_parse_ptr_reply (called from
addr_callback).

Can anybody help me with that issue? Is the struct hostent filled with
wrong data, so that the crash happens, or is it filled with correct data
which is overwritten later? Any ideas what I could do to get closer to
the problem?

Thanks in advance and best regards,

Andreas Rieke

-- 
Dr. Andreas Rieke
Geschäftsführer
ISL Internet Sicherheitslösungen GmbH
Bergstrasse 128, 58095 Hagen
Amtsgericht Hagen HRB 3816
Received on 2008-12-02