From nobody Tue Oct 24 00:58:06 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 4SDtvy0pbdz4xDZF for ; Tue, 24 Oct 2023 00:58: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 4SDtvx60ynz4RXt for ; Tue, 24 Oct 2023 00:58:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698109085; a=rsa-sha256; cv=none; b=MYfI/e+mxq/wE7XhPbmAVmcYrK8M3MdDtzpvmS/6eP3QXj7XTiXiYoxwzCldJnoocuVWiC LQ6wxhvojv3Z5n5y2EDAEeKy5ogl5tW8zVslxg4x4VdF0/dn1WRUzRNl6TgC9elR1b34EA GD754Nc9pGNsEWHJA/lxCxUPKEdj2WtRz2CSLgenv+yXXUNp9daH8QR9ium2vI6peutwB4 Zs9nG3SlvzOjgXfyBuI5i2Ja0v3VTDkE1j7ec12+ffjbRPr/xsEJOviwMyF2DqRxxdFjBW S0yfJKCRwyKng1Hw+bOe2VyRCSpUxAR3Ee5A3SiobzUz45YgH29M/TPlT6MciQ== 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=1698109085; 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=TkmJ3oo0ofP0s8vxn3U05LtYvzh4RIN9FSTL0g5hGd4=; b=MM28DmoHn9IgehFmpqQOwhNFdy0A54tUEUiR2oiSFp/5Sb9U5RuSaSLAJN+ZoJ6GbADNN/ 1EiXVz7VC1tdqGj+E7jSquioHk0oV19CMGaAS3b7FZTTMuZhWRFiSot82OOKhhxsJ2Oe3c ZhwHo0VtScomFN1rZq0NkQTg1wT6c5RF5vaBYNMlufMmIka2FipChJmKQgTlFWh/KGmP2c 9M1lE9Gx60L+k69N1GHvEvbyZJpdoX3erfV1JneZw1D/VQ//uTQUu3qvaFZfQab8osVoGB 5WrKFsloI+EFMD1pQBEN8NZID98KmbEqP+jghe6RGUaKUlWVwkvLvH5qZMm9cQ== 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 4SDtvx554Rz126f for ; Tue, 24 Oct 2023 00:58: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 39O0w5fX043665 for ; Tue, 24 Oct 2023 00:58:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 39O0w53v043664 for bugs@FreeBSD.org; Tue, 24 Oct 2023 00:58: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 271750] setusercontext(): Apply user '.login_conf' on process' effective uid being set Date: Tue, 24 Oct 2023 00:58:06 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New 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=3D271750 --- Comment #2 from commit-hook@FreeBSD.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dede6fd06726c02e9d2a5c47ac8cf80d8a= aec5a70 commit ede6fd06726c02e9d2a5c47ac8cf80d8aaec5a70 Author: Olivier Certner AuthorDate: 2023-05-30 16:35:08 +0000 Commit: Ed Maste CommitDate: 2023-10-24 00:57:11 +0000 setusercontext(): Apply personal settings only on matching effective UID Commit 35305a8dc114 (r211393) added a check on whether 'uid' was equal to getuid() before calling setlogincontext(). Doing so still allows a setuid program to apply resource limits and priorities specified in a user-controlled configuration file ('~/.login_conf') where a non-setuid program could not. Plug the hole by checking instead that the process' effective UID is the target one (which is likely what was meant in the initial commit). PR: 271750 Reviewed by: kib, des MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40351 (cherry picked from commit 892654fe9b5a9115815c30a423b8db47185aebbd) lib/libutil/login_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --=20 You are receiving this mail because: You are the assignee for the bug.=