From nobody Thu Sep 18 08:52:08 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 4cS8X90YNxz6826b; Thu, 18 Sep 2025 08:52:09 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cS8X85hHCz3jNy; Thu, 18 Sep 2025 08:52:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758185528; 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=OWwOsT6dl7/EVYXycw5+QgC0evPQypRKnN3yFJpdVAw=; b=sOSJ3gCOEZDjrebNoEM2/2Kk0TItBohQ6ht0dxqpgf1c9ePLv+c5unLlXecCHzGnA7U1Yr eOtfgcuV0/7WPi2vl9szwH4/amAol6pnXRXOp08tKq78WsjlYzYFcdZit0y3Fn71grek2g 7sFlv7Kxml1B8JzMQn5GobGLDRJ81l+4mlLxGn043RHs5aesBbqOpndMj9cpcSXsm7fu8y Jzdk9f7SUps2+anbp5n/KgKzJnTaCwhM4dRJOBnHvjHfqdDbgZsNcvLEbJi88AQsYvb1bY ZpTTpsuiKUpd/c927wn1KSAN3PvHlHMu2NBiMuBnZBvcMjsJSDwPKjiPLTzmpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758185528; 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=OWwOsT6dl7/EVYXycw5+QgC0evPQypRKnN3yFJpdVAw=; b=MdMdW976dIl5b0TBldH7YXbUThUYn9TBGix5lTYmxmW0oMrg/vJYe7G2E+9rRT015HceS7 JeZJF0hbm1hweIxu8j5xfdpS4aHmcUlmOPOSKOqJjreXxnTEpvp2wxEsiYPwn/qXzr8A4y 8sfH+/1c1bsfIgGConw9UPc9/nIb+VAlbcJ5rO1LSoGv80ans3Ls2lvB1bxd/QvcUsYJR7 CowVk4WoccUVgqJR574aQUbq91cSIQvIGaC16pVwU7xRWeTgrIumnAweLoK4AVNAjJxV8H NlpXF+oUogfMEMuvTVVdLdt5OhqX3raONh9wr45LSu4oaiebW0u0q+A5rtIldw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758185528; a=rsa-sha256; cv=none; b=RLFBdrdLI3syJnlsncxqICgCTZQqKIQBr/MhULLO4FZvL59Ha1v+WBPjwxhvMyY73uAd4g z4mMnFXqww2VGMg+WLVscNN7lLqCY3L7OSFDpa/gnliv+62udNQbqAZsXshiSEl7ysyiS1 GKQiI5a4ZW6SFuMRNM/nG6Ys/UxTcBC3CTtGMq6vBgoWiPkiLAmz3LsAhldMKIXPuuZ/fF BUdIEIc5CBMZ24BClYAYPB5vUneaDe2s/dKG0DqvMfR3QjKu8TU4omkPSoVMw1koICO3vN Ou0Nc9M6Mmwl9x9xqgk88Ew1jNb1DbonEZJuv7H/lfBdFpIo6ZXqDx+7iremVA== 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 4cS8X855Vgz147y; Thu, 18 Sep 2025 08:52:08 +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 58I8q8bJ018993; Thu, 18 Sep 2025 08:52:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58I8q80t018990; Thu, 18 Sep 2025 08:52:08 GMT (envelope-from git) Date: Thu, 18 Sep 2025 08:52:08 GMT Message-Id: <202509180852.58I8q80t018990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 2e71d105249d - stable/15 - libc: fix the _FORTIFY_SOURCE build of getgrouplist(3) 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2e71d105249deeb1daed328fff993e79bb26be1c Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=2e71d105249deeb1daed328fff993e79bb26be1c commit 2e71d105249deeb1daed328fff993e79bb26be1c Author: Kyle Evans AuthorDate: 2025-09-13 22:19:46 +0000 Commit: Olivier Certner CommitDate: 2025-09-18 08:50:31 +0000 libc: fix the _FORTIFY_SOURCE build of getgrouplist(3) We need to get our prototype normally, but WARNS in libc is way too low to surface that. Additionally, _FORTIFY_SOURCE needs to include by way of to actually export an implementation of getgrouplist(3). The version defined in the .c gets named __ssp_real_getgrouplist() and the actual implementation comes from the redirect stub in , which basically gets optimized away in the built object because our __builtin_object_size() check is trivially false when we cannot resolve any object sizes in this translation unit. This could be argued as a design flaw in _FORTIFY_SOURCE, but we should grab for our prototype anyways so let's kick the can down the road instead of re-thinking it for 15.0. Reported by: Shawn Webb (HardenedBSD) Fixes: d3f8ed6066 ("getgrouplist(3): Remove superfluous [...]") MFC after: 3 days (cherry picked from commit 91ea7e2ce2b5b2ff4702c3092cfe944862d58172) --- lib/libc/gen/getgrouplist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index cb23b9b2316d..9c57b7031336 100644 --- a/lib/libc/gen/getgrouplist.c +++ b/lib/libc/gen/getgrouplist.c @@ -31,6 +31,7 @@ #include +#include #include extern int __getgroupmembership(const char *, gid_t, gid_t *, int, int *);