From nobody Sat May 24 18:14:42 2025 X-Original-To: dev-commits-src-all@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 4b4VYH2qzqz5wlF1; Sat, 24 May 2025 18:14:43 +0000 (UTC) (envelope-from git@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4b4VYG3kZfz3c7V; Sat, 24 May 2025 18:14:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748110482; 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=68XvkUlk5MedEROXhyK7YsDDBADK2eFN++LRhbtIrKE=; b=rBI3zlUh3hUw/5rU75rUe0cWVp3fiDED0Xj1o/pde3MuzsdRRU7R0ZQH4S2z1uPjKuGaXn UkrwftKPh0wT2NP6WjShs5Tv2xMgbXq6sMkjRwPVq32LXxgMp3ubIWzKkvg9942VdYJ99Z OnNtP9xhLmOYBDfalO9YAIAlaEzIdaYeJe4X1EMixsAzSOr4HZySvVSqZXEfjkRPrldFGY x+kfs/WKycyqq73xAtVsUA7pvtVH75QP3z4PFhdoJGYFnSgtxZcGHgoBQrufD4kQYQrlok De5uxBos8o/gGHu0HT0GOt8dZNmtP4Vtg75XfT2Y/OgZfAOkW2CtEnI5pk18mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748110482; 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=68XvkUlk5MedEROXhyK7YsDDBADK2eFN++LRhbtIrKE=; b=l6ybkIXvuTQtEFZVZZsXa8VPIaLvMWz9tgVP1Ci8p1ikyu7SbuckVz95AtADQSYghwuWtr 07QxT+zevtei4DwkYHX0YKlZCec/B5JDqQC+bJDC8sQktlGH6dSWzMmqL47JD0JVaTVDaj KXHH/8grRGKKDRvuN3dQbkkiWlhAwY7fbqMtnwSEac9KE3qa93CnR0WixUAueoZwKWMvjV 5NkF7grHeAQi2xZNWnZM8B54mpWSiU1TqgruWs34PFKET2Nqha5th9x86vtDzfUdsGttf1 LkXeOrJ0tLogFbb925xAsozlg85CD8onO5hy3KEpY9Bn016h+BRQvIUDQUXBsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748110482; a=rsa-sha256; cv=none; b=d2jv1c25Aek/oRCF+v9jPdDX7+1DXoCAxqnnm4uA8Iwoy3BnX9mHNrCldC8we+ftrEC6BW 2frJ+x0xjWlL4nOZPqPRIzJZKm0zesy1FfnOvV/6pKjsPLtBkNWyoDNewWnNdtY1sLw6Ut +Wpxc3H+1P/CDrba0ITnVhQjQ5cy5UEGmZEEkceyFFSDNotul1yoZyXCHoz4XTBvi/0Cs3 ncB2R0JUf5g0rjFX5q29kuIjyuQ3p21nNlSEnCkvub1nQKFl4InK8fcwgeW5rZC7RINS5i h/CF2fUGDpSXiWUSxTr9zE17tLccYfxsAX0xSe6E1ZS7ezvSQd6t6uTC+rtPuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4b4VYG38qjzmpZ; Sat, 24 May 2025 18:14:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54OIEgj1025141; Sat, 24 May 2025 18:14:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54OIEgPR025138; Sat, 24 May 2025 18:14:42 GMT (envelope-from git) Date: Sat, 24 May 2025 18:14:42 GMT Message-Id: <202505241814.54OIEgPR025138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: cd240957d7ba - main - netinet: Disallow connections to INADDR_ANY List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd240957d7ba43d819e9d59c6f6517fe915102c7 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cd240957d7ba43d819e9d59c6f6517fe915102c7 commit cd240957d7ba43d819e9d59c6f6517fe915102c7 Author: Ed Maste AuthorDate: 2024-11-25 14:07:11 +0000 Commit: Ed Maste CommitDate: 2025-05-24 18:13:09 +0000 netinet: Disallow connections to INADDR_ANY Previously connect() or sendto() to INADDR_ANY reached some socket bound to some host interface address. Although this was intentional it was an artifact of a different era, and is not desirable now. In 417b35a97b76 markj added support to disallow connect() to INADDR_ANY. Take the next logical step and disable it by default. PR: 280705 Reviewed by: markj, jhb, zlei Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47740 --- sys/netinet/in_pcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 3774f73a7a8f..bccd4b84561a 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -235,7 +235,7 @@ VNET_SYSINIT(in_pcbhashseed_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, in_pcbhashseed_init, NULL); #ifdef INET -VNET_DEFINE_STATIC(int, connect_inaddr_wild) = 1; +VNET_DEFINE_STATIC(int, connect_inaddr_wild) = 0; #define V_connect_inaddr_wild VNET(connect_inaddr_wild) SYSCTL_INT(_net_inet_ip, OID_AUTO, connect_inaddr_wild, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(connect_inaddr_wild), 0,