From nobody Tue Mar 28 15:30:21 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PmDCL05yCz424F3 for ; Tue, 28 Mar 2023 15:30:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PmDCK2B4sz3Q0x for ; Tue, 28 Mar 2023 15:30:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680017421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZD5gje2bNXc/iH1N8mc1BFkhQz26QAdChuj2hjGmYGU=; b=XprvVAYup2PNk7o2QgLBSqX815jfcz4m93dj9dZGOdq0YtJCgEBpRPWVvwVFz3ENeVIKCB y9zgeMbhmQFEungRML+ayTW+ykBPLLpwQcAtGxRGBdRmKwzWj1wIBhbmG6MJF9gmCgVk2G shYCaH6UUqsoB4JWYatpoiBczcuGDs4ouwK0dHN6M6w5AD41bo+PdgtCwf4Lo2P6sQicn5 P/WEbdB9XdS3JPXaiwwToybok24kOOQ+15FX5BO7Vu8aBkWAEerDEkr0gmpdgpST0klyOm n5pzav9fPeDO2JLtV4+7MXLqkn8uBBaiubA38Bc2+YEWpdj/mfTIM7Q+dk9NWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680017421; a=rsa-sha256; cv=none; b=J7KJL2IqVpofywQd0TbizOH+LwmiIJfm6gXLFTZtikvwygvRLQQea4++3ewZOmg8njigYn l1zy5nsqlWh2PH1cNL3HTBrFc7ZZx/IyjqLbuN6JqQ8BU5yogS0CH6ay4g88kRdhQIIq+m BErc1lk7By0TpGUENR/ZsB06K9Xc9nqs5qLPnGzauMu59kyFpnk1ewkDfDlKo8ZpOuphzP DZE+/pvyyslde3nP09Aqm+VPO7yCcTDdCZO3llWMkSCrHVimPZIGxrsRj445BhhwcTEFOS SGttGvhF07ZXhO8a1VzDgaY7oLdBYM2zkIYGlj5hPgB799oU+oQq5yYl0/eOuw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PmDCK1HM7z189P for ; Tue, 28 Mar 2023 15:30:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 32SFULa3040386 for ; Tue, 28 Mar 2023 15:30:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 32SFULcN040385 for bugs@FreeBSD.org; Tue, 28 Mar 2023 15:30:21 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 270498] libc DNS resolver ignore timeout with tcp Date: Tue, 28 Mar 2023 15:30:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: freebsdbugzilla@agneau.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270498 Bug ID: 270498 Summary: libc DNS resolver ignore timeout with tcp Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: freebsdbugzilla@agneau.org Created attachment 241157 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D241157&action= =3Dedit test program to reproduce the issue The libc resolver functions don't use the timeout with TCP connections. If a TCP connection hangs to the configured name server, the name resolution functions will wait indefinitely and never return to the caller. The timeout option should be used for tcp queries like for udp queries. It looks like linux glibc as the same bug for years https://sourceware.org/bugzilla/show_bug.cgi?id=3D19643 . I reproduce it on 13.1, but it should be the same with all FreeBSD versions= . How-To-Reproduce:=20 The attached C program written by Alain Thivillon = who warn me about this bug can be used to reproduce the issue. It makes a DNS query over tcp to 127.0.0.1:8888 . Launch "nc -l 8888" in a shell and ./test in an other . You will see a connection in the first shell and the test program will be blocked on the DNS query in the second indefinitely or until you answer something or close the nc. --=20 You are receiving this mail because: You are the assignee for the bug.=