Description of problem (from upstream):
The TCP sockets opened by libresolv do not specify timeouts (for connection, sending and receiving). As a result, connection timeouts take much longer than configured, and applications performing a TCP lookup can hang indefinitely if the TCP connection is severed at the wrong time (without FIN or RST segments being received).
This affects the NSS functions for the hosts database, too (getaddrinfo etc.).
At least one commercial DNS fuzzer can send TC=1 replies, but then fail to respond on the TCP port (it accepts the connection, but does not respond). As a result, this bug can introduce spurious hangs into the fuzzing process, making the interpretation of the results more difficult.
We are tracking this bug upstream:
"Bug 19643 - libresolv: Lack of TCP timeout"
I am going to close this as CLOSED/UPSTREAM and we will continue the design and discussion upstream.
When this is ready it can be backported as required into the appropriate branches.