Bug 1429442

Summary: glibc: libresolv does not enforce timeouts on TCP connections
Product: Red Hat Enterprise Linux 8 Reporter: Florian Weimer <fweimer>
Component: glibcAssignee: glibc team <glibc-bugzilla>
Status: CLOSED UPSTREAM QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: ashankar, codonell, dj, fweimer, mnewsome, pfrankli
Target Milestone: rcKeywords: Triaged
Target Release: 8.2   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-24 14:46:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Florian Weimer 2017-03-06 11:59:02 UTC
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.

Comment 5 Carlos O'Donell 2020-02-24 14:46:50 UTC
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.