From nobody Thu Sep 28 15:11:18 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 4RxH4R1Wg2z4ttyW for ; Thu, 28 Sep 2023 15:11:19 +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 4RxH4R010Cz3b9B for ; Thu, 28 Sep 2023 15:11:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913879; a=rsa-sha256; cv=none; b=ou+2XQv6z1zkNQ6qXYAgDku5JcS4Lmzf/HdtWkKqyBZahvGBC4OgNNwfj/m3uF23OAUW87 +c51fJFbgjpjTB5HqinGU7S9Z5dReD1+EYCIsXLZwXyPe7YlgBZtIc0cAAkzqgo0PuPJY8 KT81bFb1cviKGtPsDNCU2ZKuOqvqGJeBCYMWxtA6FIzPfF5Bn7e7Jvd8m0K1TYyttYKYfW BqfVlX6vupBtnKs6xOn7KbuIAzAya0FBSHydP/Wkr0sEpWGTO896aFrYi2w151LabGEnev s2DJi6qP/4Vflg8HJxIqtbMd9JwMZo2h2n8tzkJfk0hImT8qDIVTLwyBx/6Osg== 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=1695913879; 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=u4i+L/hzW6UyoGADAEPftOgEXKIcoR5+I1zAv1FdnRg=; b=irPzq+tcInRrE6TbXv9WlKuP4r4Jk47zG2sl8LbqDbE+oCSrlUEnydA0zqvdNj1/8puQBd FIKUAM/0ycWz+poJ4D85DkffVsSnP1BVayJcigc4BTCKxda4DRLiWKR4db6ml0qH2O0qL/ Kg+iTfJphqX6Mq5FVIHQHReEpA+hhF4A00RVHQEgu6Zx7c1NyXu5pq77/ktZtvwY5ZKAYT zmT3luhq88i3SqhAMbc1CQjda7nvgGgDIxNaBzzVLM/A2XQLxCs9zCOYgnpQ8QhvTwyuSP PuEBriXVszNDJiNQMgg7gy8nRH7/i24QcNngjNqTrTloN5kw6IiQkpEFMsiwqg== 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 4RxH4Q67ymzBqq for ; Thu, 28 Sep 2023 15:11:18 +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 38SFBIsv010390 for ; Thu, 28 Sep 2023 15:11:18 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38SFBIWi010389 for bugs@FreeBSD.org; Thu, 28 Sep 2023 15:11:18 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, 28 Sep 2023 15:11:18 +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: Open X-Bugzilla-Resolution: 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 #1 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D91658080f1a598ddda03943a783c9a941= 199f7d2 commit 91658080f1a598ddda03943a783c9a941199f7d2 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:45 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +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 MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40642 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.=