From nobody Thu Sep 18 10:13:44 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 4cSBLK26tCz687Nk; Thu, 18 Sep 2025 10:13:45 +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 4cSBLJ5Yh6z472y; Thu, 18 Sep 2025 10:13:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758190424; 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=RIo6PSgDap0eWp1Ef1xfsioOA7EpqX8VHmXxojTJUg8=; b=ZDTlZYTp9GnILq50JCDd91fjNpecjRvc9EWuNRFOrVvHr/Sf0fG4sCIrshldGLZlP8QedG D/aMYAXZs5byO22aHrSN05SgDaYR78cG8rEmMWk/ftFRUC7WwiMptK4y/sDbh7C3XolFgG kj8o5BKehDWlXs8n6iYjU7a6CfPjel9LRs9EQUCWggBi4L/ytEZdwsr4yPThQTIxFTclOE GY5IprDXab73i2Nome4fLc5w/0yzOKhtwGIODzE88PI17HE/CdplrtYqYhad+xPvb7wTPx qdKI2LmWK1zQrFiFdIYgHKU3VM551JmwA3KDHUL7QufqytDI2K4H9US1OqLveg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758190424; 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=RIo6PSgDap0eWp1Ef1xfsioOA7EpqX8VHmXxojTJUg8=; b=I9W6l/cwXhFe0nMKzMkKa0FfLca4DW5qC+h+YutImEqv84y/LfAruWwnroAHvdTezJo/Pn s7bawpwvQlW6K+DAYgGeJrWh58sowNSIvuvTDCgPZm3nWN1jF5IxFJhKz3ehRyKIgJWl8z aGYPb6Rk/jwjK+tV9Qr5unKduDdIOCLlaEAzcR4o/hzlZLu8wlA+Qmu5eerKMe98wqC50p MQ5UlAbYPkDVyvI+Jzoiy0MxPKCsUovN30pOVNyKyyh9NGhESAHyP/SMoIO9aJV/5AQZGK TfRp2R4BvlU9Tk5kPaqRhb73zU5rLPb972ox6gHhtYiajn9B5RTtxx+RDXS2jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758190424; a=rsa-sha256; cv=none; b=xw1vYNMh0OmcvaF2xNJBI7a+rRBRy5rvWNokUU7NI5ZED8NRP1SsGo5JilvleGrwaLidTT QT5PnsvU/Ruy8j1V5zlEFQ4tQOqRROduN55e8/+KjhfblXild2MJ3yMAQ0s7VavwGWw6fB u+mkI8IcOQYMuybzWmjy+APbCsxzKBV1zoVDCe5peRFXStD58vUoHjNrtl1sQ4bSBkB7vO Y5OsgC6aoNAIrxPrNQUuOwpm5od9QM6b2q5TQewZZD+Rk4qbtuXI4/tWDXQzfYolf2qhkX jhRppNyI/riIfxIAdsXbNttsfUQ3je/oWs5YoYCQju6fRO64BUh1m8tel4CQ+Q== 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 4cSBLJ51rQz16dC; Thu, 18 Sep 2025 10:13:44 +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 58IADiv4072747; Thu, 18 Sep 2025 10:13:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58IADiAB072744; Thu, 18 Sep 2025 10:13:44 GMT (envelope-from git) Date: Thu, 18 Sep 2025 10:13:44 GMT Message-Id: <202509181013.58IADiAB072744@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: d1142d54fa21 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: d1142d54fa2153fdba3947f0cf03e8a2ce4f0e75 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d1142d54fa2153fdba3947f0cf03e8a2ce4f0e75 commit d1142d54fa2153fdba3947f0cf03e8a2ce4f0e75 Author: Kyle Evans AuthorDate: 2025-09-13 22:19:46 +0000 Commit: Olivier Certner CommitDate: 2025-09-18 10:13:11 +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) This is (partly) MFCed just for the sake of re-introducing the include to have a prototype. There is no _FORTIFY_SOURCE support for getgrouplist(3) in 14. --- lib/libc/gen/getgrouplist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index 90626cef3c83..fb4945beb2b2 100644 --- a/lib/libc/gen/getgrouplist.c +++ b/lib/libc/gen/getgrouplist.c @@ -33,6 +33,8 @@ __SCCSID("@(#)getgrouplist.c 8.2 (Berkeley) 12/8/94"); #include +#include + extern int __getgroupmembership(const char *, gid_t, gid_t *, int, int *); int