From nobody Sat Sep 13 22:20:24 2025 X-Original-To: dev-commits-src-main@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 4cPQj473cVz67c9b; Sat, 13 Sep 2025 22:20:24 +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 4cPQj46KBmz3g1k; Sat, 13 Sep 2025 22:20:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757802024; 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=WSJZt+yGDcq8y/yASBsw2cOoYJxsCaBNA25A8RnIF+Y=; b=Sn6wrd3sj1ND6z16AEoJQhVVryc8T1e8p42/vja6sWUOnYgvfE14OorhoZgil7WB1rMJ0b /3Hw/UnHXez/mf8jhCaBikLJT87yn9CuVocCp4kr21DKlIqqtZOdDYCg6VAP9MrfvUJWQr QJyIv1omRYM+ibFWJLHQf0BBPCcZGYtsiVj7DVLCs4Dxtt+iR2fdcBnlInJUk5nnD/vwHF wHxjhh0FG1a1+7CLJzGEKap1+b5uWhqSqwjzKjyx0hqIpDR/bMjQGnxi70ABUNgZG6FHOI LlC6P/QFVXnyxvBNYL+8CLVkFJMIEv2eCfp9RDAhQqWBM1fge0zrZ4U7ZFXp4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757802024; 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=WSJZt+yGDcq8y/yASBsw2cOoYJxsCaBNA25A8RnIF+Y=; b=H4ohOs/PijGnCrromPXXohFbdtgL1tmrhahjLZ4NU22Hvzh5iy5SXDHvkOpKsmoKSE/POP ohtcIBDn6TFtf3wUw67IYGzQ4V7In+xknLrA/utTku2T1ro7JtKU926YjPUKs68DoPsc0H 3CC2I2Ib/l54AmpmRelv5jgL+L/CyQd1kkfAvmMFesL91jbpz2PiaQb9N6ei2ZvrcTe7ye RNwXJfM30Hqk5Xx/Xw3tQ8zU4HpGlwdjcYqSC5QSPrxdbDxlGGSVwBNQmOcBGIASDMKU/T pdvWYREub7u1lErfGEjKUekHjOYqgIYZan2y2uSS9+xmdX9q45mFESfaCxbaCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757802024; a=rsa-sha256; cv=none; b=dF2Z+M99eS2i3Hwu+kXM/vdbMxXboH22gsCE6WuxII5Lk4XvYIsfQ5xscX/3jFj6sSCv4V eKQ4MLtOUou+HiIBM2Sm7sFSXZjpMBKC/y8cMaX1BWVZUzsgYp1liLUmrQ8L+iAhFQLxWT v1yBbQam/gG2aGoerRrqke/Fqtwb0X+KsVBsuQ8qjXvYB9LcF6BE1ClwP66eRIRR4xBe1T f/MYbxb2WbkOeNaV91YZHXBoCDjkxtmfM+Y/0jqkry/wqnaMaY54Qc6w92M6Zq3ISymC9Y 7F2NFsS9ibLE69Py+BqZDsHAfhYwfZiBwtqXjzrpp1ZJfx9oNoUqHOXOre36eA== 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 4cPQj45dl4zxwG; Sat, 13 Sep 2025 22:20:24 +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 58DMKO2w096087; Sat, 13 Sep 2025 22:20:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58DMKOxM096084; Sat, 13 Sep 2025 22:20:24 GMT (envelope-from git) Date: Sat, 13 Sep 2025 22:20:24 GMT Message-Id: <202509132220.58DMKOxM096084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 91ea7e2ce2b5 - main - libc: fix the _FORTIFY_SOURCE build of getgrouplist(3) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91ea7e2ce2b5b2ff4702c3092cfe944862d58172 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=91ea7e2ce2b5b2ff4702c3092cfe944862d58172 commit 91ea7e2ce2b5b2ff4702c3092cfe944862d58172 Author: Kyle Evans AuthorDate: 2025-09-13 22:19:46 +0000 Commit: Kyle Evans CommitDate: 2025-09-13 22:19:46 +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 --- 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 *);