Bug 1429442 - glibc: libresolv does not enforce timeouts on TCP connections
Summary: glibc: libresolv does not enforce timeouts on TCP connections
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: glibc
Version: 8.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.2
Assignee: glibc team
QA Contact: qe-baseos-tools-bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2017-03-06 11:59 UTC by Florian Weimer
Modified: 2021-09-17 12:06 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-02-24 14:46:50 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Sourceware 19643 0 P2 ASSIGNED libresolv: Lack of TCP timeout 2020-07-13 13:13:18 UTC
Sourceware 19696 0 P2 RESOLVED libresolv does not enforce timeouts on TCP connections 2020-07-13 13:13:18 UTC

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.

Note You need to log in before you can comment on or make changes to this bug.