From nobody Thu Dec 21 13:45:05 2023 X-Original-To: bugs@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 4SwsBB0qJJz54pvY for ; Thu, 21 Dec 2023 13:45:06 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SwsB94n85z4Smb for ; Thu, 21 Dec 2023 13:45:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703166305; a=rsa-sha256; cv=none; b=ply5+QakT3c9dtAr/y5neZKkDyqCUKvBvOAbqiBSKd7uThuQwOBXw8QYWjcOCrP4nzHAF7 7DXDEb6PhNVXrD1TDbN/ObDNosoEBEE/1nepVJrjeJcQNA68wO3NegclBBgXTtrbLY6GSw am7RltIVwXjsTS/txVdilWXJjNI0ZlY+JTg1eRBkXdlKX5K37bSvSWi+CL/fAeAhjiEk9d rdT+hA3Egcxw5a3pW2pCZUUhGacuwG7+gnW1a67VTE9QAnZKtJPpgPGm9ocsNHvZLFkPzS it/dn0ciPHp75Makk7fjkTi+0Acr0sgUip1ww58to4DxhtFHdvahdiUYO7c6Uw== 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=1703166305; 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: in-reply-to:in-reply-to:references:references; bh=oQ55Vw03/FJ7pNgATdQV5cJtWtLWw6DxK+aIY9eVcpk=; b=FHMzVCpnvrdl/PifIX0CoeyxQyZ7Gu3T/N9JNLO7ebIa91fRXtO0s6OU7msGGxRdgHSjNg t9IdQ5d4XrDT1qyzc+UfP4BbT1mlS+d8HtupiGgtfcaoCBP77r2+lK7ZO4KKZlzflTX/Xv qnORyfIKJMjT6nalpUywC1osweeNTu54ocAQBO5aKF8vctfGvgy+oFs4+MqBt3qNXQcAAk G48+D0+Y9abjiNMnE9rSHaBETyyvtyx9fkz/FsAfjqypc0e7e5LUeyXIsd6gCDrEuWSJYS TLhZ/nLW5ON6O/9/yP3l4meur1KO94JMgtfLuHVxzF4UN4hwsKR3iLiHcvphtg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4SwsB93rCRzZmX for ; Thu, 21 Dec 2023 13:45:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3BLDj5Ln060351 for ; Thu, 21 Dec 2023 13:45:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3BLDj5Cx060350 for bugs@FreeBSD.org; Thu, 21 Dec 2023 13:45:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272093] The 'see_other_gids' security policy considers the effective group IDs and not the real ones Date: Thu, 21 Dec 2023 13:45:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272093 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Df0951233c6d33da3c9a6bc347d9ae7aa9= 11d7ca9 commit f0951233c6d33da3c9a6bc347d9ae7aa911d7ca9 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:45 +0000 Commit: Olivier Certner CommitDate: 2023-12-21 13:38:07 +0000 cr_canseeothergids(): Use real instead of effective group membership Using the effective group and not the real one when testing membership has the consequence that unprivileged processes cannot see setuid commands they launch until these have relinquished their privileges. This is also in contradiction with how the similar cr_canseeotheruids() works, i.e., by taking into account real user IDs. Fix this by substituting groupmember() with realgroupmember(). While here, simplify the code. PR: 272093 Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40642 (cherry picked from commit 91658080f1a598ddda03943a783c9a941199f7d2) Approved by: markj (mentor) sys/kern/kern_prot.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=