Bug 19857 - resolv: Switch to TCP unconditionally on TC=1 response over UDP
Summary: resolv: Switch to TCP unconditionally on TC=1 response over UDP
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: network (show other bugs)
Version: 2.24
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 19856 19696
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-23 12:17 UTC by Florian Weimer
Modified: 2016-03-23 12:17 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2016-03-23 12:17:53 UTC
A DNS server might send a TC=1 RA=0 (truncation, no recursion) reply over UDP, while it still offers recursion over TCP.  We currently ignore this server because we check for RA=0 before TC=1 in send_dg:

		if (anhp->rcode == NOERROR && anhp->ancount == 0
		    && anhp->aa == 0 && anhp->ra == 0 && anhp->arcount == 0) {
…
		}
		if (!(statp->options & RES_IGNTC) && anhp->tc) {

There is a thread about this on the dns-operations mailing list:

  https://lists.dns-oarc.net/pipermail/dns-operations/2016-March/014548.html

Fixing this needs timeouts for TCP connections and a server usability check on the TCP path (see the blocking bugs).