From nobody Tue Jun 9 19:16:52 2026 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 4gZdv83dPvz6gTqx for ; Tue, 09 Jun 2026 19:16:52 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gZdv80tVJz3K5c for ; Tue, 09 Jun 2026 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781032612; 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=wp+DeS0QYM1R86VII6QdKPIsL3RFlnGfKTIR38wDuDo=; b=vUYeG3ePeSIlTHMMaRG56pR0LZCOUqnKdtU3LfqFpTzyfIlcnoyqS3z9FaPsFPpelCGHTq 3qTV6nrVKtgbVjW7e8wna1z6IsMWqVxptsgGWz26gQVpPud7PlReCNyxs8A7JmpSY57/rR NtS70usQIuHRtkMnukOj+JsPA2I6/0eDQiJool2clybG79OIpfMW5sqbA0QaMpQ3j85EfG dbF9tqWfyE71I6f+9KNQpb/J8yZsoqqw8nu72XKxfXrBwC7R0j51f0fENZG+3vq/xDYDxX cRyhx80KpOcVUNXQb0x2YRVan3us0i41KB66/iuC1wZ2+FfT9YMyGITwLZjWrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781032612; a=rsa-sha256; cv=none; b=dJDQJjgHX6YFT3EREFI+OplJ0OFo8mLtrJW8Hno3yW7mDDD27gx08149gOAS9bN0cwmhQK f8t7Q3HIeLCnd9aPd5x9e15dSjStF8kvYfV5C6mTZdalugcXa/a/OkIi5pX2GkHqkOdz/2 3SiDBZG2dyST6y67LRvkZ7fYiUOCkF2RFiAqOPN7bYfO5i4KERD93B5GHJWhwHZF7xu2at zwJY4NUxgyabW3E68LjgI9vGLIinwV98R2tgT/idNt3CSHsUapewaB7/TvWxHOXUMDeuPo L3DAl4hHF35OKdKXvjUIHiAUx44k5W0sCMu57rxFHDr/XJj2LfiCyOunkHl7nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781032612; 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=wp+DeS0QYM1R86VII6QdKPIsL3RFlnGfKTIR38wDuDo=; b=YFhyix5qX/WlVqLDmdfANRYsx1FDaXgWQTeSv5wmexN0AApYLP6y8i5Izj69xgeq+mQBQI Bd/+cAYQIgAlLuMldfIEjP2GAGTopoXXU5fI6PSqV3ZljMcTW82aLHLhrNAygAjJJJFW1w rPPCPxE42AbwCXkdF+M23EpU5LrROni8YCVp0+Mw1twkrVEVJKYCjKaHiJEqVtRRsdLumR N5rM1kSoagbH8kkqFjB7WqpNK9A7iGBYSSwFck1hwbewLDcOV/9PKzWq+M3ozu0dT4WfD2 tBYyNd4i4JdRV05CFE+N273GA5kr6OrGupsGudmbxozOjjbOPEvBbuEolVRRsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gZdv80Cg3znr5 for ; Tue, 09 Jun 2026 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f41b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Jun 2026 19:16:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d39be1b1b50d - main - linux: Correct the issetugid check in copyout_auxargs 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d39be1b1b50df91ad7ab62b25a4a30343e94cba5 Auto-Submitted: auto-generated Date: Tue, 09 Jun 2026 19:16:52 +0000 Message-Id: <6a2866a4.3f41b.c77be12@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d39be1b1b50df91ad7ab62b25a4a30343e94cba5 commit d39be1b1b50df91ad7ab62b25a4a30343e94cba5 Author: Mark Johnston AuthorDate: 2026-05-29 21:41:35 +0000 Commit: Mark Johnston CommitDate: 2026-06-09 19:13:21 +0000 linux: Correct the issetugid check in copyout_auxargs The runtime linker in glibc relies on the AT_SECURE auxv entry to know whether the executable is set-ugid, if so then various dangerous functionality such as LD_PRELOAD is disabled. The check added in commit 669414e4fb74 failed to take into account the fact that during execve, P_SUGID may not yet be set for a set-ugid process. Correct the test. Approved by: so Security: FreeBSD-SA-26:30.linux Security: CVE-2026-49413 Reported by: Minseong Kim Fixes: 669414e4fb74 ("Implement AT_SECURE properly.") Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57350 --- sys/compat/linux/linux_elf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index c9eb6aea8373..6c9f785c97e7 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -492,11 +492,9 @@ __linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base) struct thread *td = curthread; Elf_Auxargs *args; Elf_Auxinfo *aarray, *pos; - struct proc *p; int error, issetugid; - p = imgp->proc; - issetugid = p->p_flag & P_SUGID ? 1 : 0; + issetugid = imgp->credential_setid ? 1 : 0; args = imgp->auxargs; aarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP, M_WAITOK | M_ZERO);