[Bug 5342] (patch) res_query silently rejects responses against T_ANY DNS questions

bugzilla at busybox.net bugzilla at busybox.net
Sun Jul 8 14:36:58 UTC 2012


https://bugs.busybox.net/show_bug.cgi?id=5342

--- Comment #1 from Chris Luke <chrisy at flirble.org> 2012-07-08 14:36:57 UTC ---
I've confirmed this using uClibc buildroot on i386, too.  See attached
nsquery.c which does a simple T_ANY query, but pre-initializes the packet
buffer to 0xAA55 and compares the contents after the query.

On glibc, the output is this:

$ ./nsquery-glibc www.google.com
resCount: 1
query=www.google.com answer=www.l.google.com type=CNAME ttl=41905
resCount: 7
query=www.l.google.com answer=2001:4860:800a::67 type=AAAA ttl=244
query=www.l.google.com answer=173.194.73.105 type=A ttl=75
query=www.l.google.com answer=173.194.73.106 type=A ttl=75
query=www.l.google.com answer=173.194.73.147 type=A ttl=75
query=www.l.google.com answer=173.194.73.99 type=A ttl=75
query=www.l.google.com answer=173.194.73.103 type=A ttl=75
query=www.l.google.com answer=173.194.73.104 type=A ttl=75


On unpatched uClibc:

$ ./nsquery-uclib www.google.com
DNS query for "www.google.com" failed: res_query claimed to return 188 bytes,
but the buffer was unchanged.

Patched uClibc:

$ ./nsquery-uclibc www.google.com
resCount: 1
query=www.google.com answer=www.l.google.com type=CNAME ttl=41900
resCount: 7
query=www.l.google.com answer=2001:4860:800a::67 type=AAAA ttl=240
query=www.l.google.com answer=173.194.73.105 type=A ttl=70
query=www.l.google.com answer=173.194.73.106 type=A ttl=70
query=www.l.google.com answer=173.194.73.147 type=A ttl=70
query=www.l.google.com answer=173.194.73.99 type=A ttl=70
query=www.l.google.com answer=173.194.73.103 type=A ttl=70
query=www.l.google.com answer=173.194.73.104 type=A ttl=70

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the uClibc-cvs mailing list