From nobody Tue Nov 17 20:20:22 2026 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 4jTbh91q2Jz71nbB; Tue, 17 Nov 2026 20:20:25 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jTbh91K8Vz3Ncq; Tue, 17 Nov 2026 20:20:25 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794946825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YM1ULdMuTRDK+JRGOm3lOy2d91pmPmtCzp9OkHh2kW8=; b=Qljy6hhsoscOLfI/SnWYlbZNEAACezmgzNhUtwHYsSzbVjGyVfalauaW7RAcBPmPc7o0nn iYmNwj9BqPGA82jDxeHnp0ZfE+g2tZHNciGHCs/2etNdGNLdRLDEfbi8rYu4Hde1PEtZeF ZVq8Xs79mcG0zj0aTN8iTzpuwXl4MxYABwPzrUInDGDhGDsRVuxyO6VINkxM558EzWpeZv wvXIfklnHNV8jfoCUEJGQJZgR7BwPYQU3Mw6JrwHrLawsRl5zJeyG7L0Po4KMKa6IG/R5O 4YTIGGUExI3Im5pA6NmMSUVt9wso7VhSjaX8xc4GTJ11woBKEmq8vGuYu6YrUQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794946825; b=vIR8SzIczupi8XsuBU3h8zJ5oSMcHDkB1WmpvVLZyeeRHrHNVSpYs/0JgNtBAzqc6hFG3a V4Xlkf0g+2RQQ9gSYwfHeuWGdBT59/jBmbvGCvDoWk4Pb25Gcp5JtG2qgqLdqb7HKyUSuA cJqP2ursikR72SYXWwLeKXhFhZ92qe3plbZVUYlWTAkB87iMSNHh+nSipvU5V3yjQnZzXl dcYeAYhuK4LQhiBJA24FXIQraNPsklz9V73pN51PEluhFt4BDw62jUlZ/AJGQjGEYD7KpV UYx/jEp9A4uNxSV6jCdRwCeEHq8LV4CfgQuFB96lnLtKt3M9u4pwhFqNcqMfXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794946825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YM1ULdMuTRDK+JRGOm3lOy2d91pmPmtCzp9OkHh2kW8=; b=JjpWHQhfUe+LhRccL1yQPjiIA98pOHBqovjJaTaszDGkfYCR2bDFlMGpJPefXCIql1WgTq 41H8OxqSc3u/EBREJ9i4POEo8keUVBWPJzvyJ77V0BJ5AgSkbyGwMfxr2E73l0LXXMEk4d poNvc6CYdG/uvN5A7GTYcABlABejcDqILraiPylWU5Mo4rDWL6iVApo13cqB8nnfIeUMre URIZIbQ5TfxbrJngUihQa/AjgGwWyUjpRuZjGmuQK6HR2wVX5BmXX8W6YUahWezF1weyed AXX/1vvoDWoNqXXrfBOezPV15lZCyybvzxCX7GxfzzC4H+6oOQew+54xXbFRbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4jTbh84kxyzXFC; Tue, 17 Nov 2026 20:20:24 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 17 Nov 2026 12:20:22 -0800 From: Gleb Smirnoff To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6144315d1612 - main - unix: Fix a race between shutdown and listen Message-ID: References: <6afc887d.1ced7.733cf5d4@gitrepo.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6afc887d.1ced7.733cf5d4@gitrepo.freebsd.org> On Tue, Nov 17, 2026 at 05:01:49PM +0000, Mark Johnston wrote: M> The branch main has been updated by markj: M> M> URL: https://cgit.FreeBSD.org/src/commit/?id=6144315d1612bc0c3a7ffd22e75aa1fe06dee1ca M> M> commit 6144315d1612bc0c3a7ffd22e75aa1fe06dee1ca M> Author: Mark Johnston M> AuthorDate: 2026-11-09 22:27:45 +0000 M> Commit: Mark Johnston M> CommitDate: 2026-11-17 16:57:01 +0000 M> M> unix: Fix a race between shutdown and listen M> M> In uipc_shutdown(), the SOLISTENING() check is stale as soon as the M> socket lock is dropped. Acquire the unpcb lock earlier and use that to M> interlock with other work that touches the socket buffers which are M> invalid for a listening socket. Fix unp_dispose() to handle errors when M> acquiring the I/O lock; contrary to the assertions, such races are M> possible. M> M> Approved by: so M> Security: FreeBSD-SA-26:83.unix M> Security: CVE-2026-127751 M> Reported by: OpenAI Security Research Team M> Sponsored by: The FreeBSD Foundation I wonder if this could be avoided if we had pr_lock method and more streamlined operation of listen(2). Maybe revisit https://reviews.freebsd.org/D48709 ? -- Gleb Smirnoff