From nobody Wed Mar 02 21:53:55 2022 X-Original-To: net@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 75E7B1A07BC4 for ; Wed, 2 Mar 2022 21:53:55 +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 4K87DM1DLWz3JZZ for ; Wed, 2 Mar 2022 21:53:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 0AA99383F for ; Wed, 2 Mar 2022 21:53:55 +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 222LrsaI016401 for ; Wed, 2 Mar 2022 21:53:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 222Lrs9r016400 for net@FreeBSD.org; Wed, 2 Mar 2022 21:53:54 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: net@FreeBSD.org Subject: [Bug 262172] UNIX Domain bind() - distinguish between random garbage and alive listening socket Date: Wed, 02 Mar 2022 21:53:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: firk@cantconnect.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646258035; 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: in-reply-to:in-reply-to:references:references; bh=x08I/1FQ38DBfwHFwnu5lMTwtqgYaioIshJNFWTGhmk=; b=WnIDz8ZoBUtlcv8KTdJviz/MBHDhh+TWO1P6F7PSZTZ0l2hC7ephDvt6fJpK+n2Png29nL fGsZapeZoxNtNmVHbX25rOBSM5KmBF5RZumFzl5WTXsT27KVXGPQbGdP+UUTG351aqfzl7 F4pQ+VTiiXqnGs7IoOqwh8UlXdNlZDppsgzPO2gpOr4xdMKLhRkrOS5vSWEkwU5S2m8pRl EIXb/NLWEdURVIzOtjBFxBKHZz6ACiTr361wmUpz+9oSBUAmUeBvqUo34yNf3dZKceiFvd xRTXcXT3Z0Dyo2LonIfuWYPUYxR+ltfjzk4SWgA8TpbGXZbmQqJTPe0sqwKbHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646258035; a=rsa-sha256; cv=none; b=xmYlbgStf2w8j8jZL3TbYuqE69qvt5TLPo8C2n9imniCTtRqdwreTb6RpqPLmcDhLmChyy lvp1fnmDiEclNv1GLsJB+YJQQRE56QDVOH4/j56q634QAyT1KvmxpOFdiK8ul6AxIIacXz 2M/XBMmckFNBTZ4yX7OJpAn/S3wCJLKgsPywxmv3he3fNGUCtcDodwgb7Nboi2PmwOZYc5 4uGIdglm9bRztK5eCMgeCH/h51ovMtRbTn/+WNvD9AM3Fc3uKp0ynCwnSBSdkgt1FH3wiC LGwiJTuJCANcuu2Th+3stneaGRhtF8jQo6uPs5hbcHK2MavCnvI/a+kdgLPP0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262172 --- Comment #5 from firk@cantconnect.ru --- Even disabled by default, it may be used by aware applications in the follo= wing way: EADDRINUSE -> assume really busy address, print an error and fail, EEXIST -> remove stale socket and try again, EFTYPE -> print an error about wrong path and fail When the feature is disabled, application will just fail on all three cases= (a lot of application behaves in this way already), but when the feature is enabled, it will handle stale sockets properly. As for unaware applications: 1) most of them just fails on any bind error, 2) some of them tries to cleanup stale socket before bind, or after any bind error, 3) some of them tries to cleanup stale socket on EADDRINUSE and displays a error for all other codes. Third type of applications may be broken due to this change, and they are t= he only reason for disabling it by default. --=20 You are receiving this mail because: You are the assignee for the bug.=