From nobody Thu Dec 21 13:45:04 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 4SwsB922xBz54pvM for ; Thu, 21 Dec 2023 13:45:05 +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 4SwsB85XcJz4SYh for ; Thu, 21 Dec 2023 13:45:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703166304; a=rsa-sha256; cv=none; b=ggGYDl+Z9nUyO8Rdd8LzLTydDIYGShcbOI7ZmTJXGUPPsaJjQmm20dpe+JgYWAe9uu74xr 4/lxk7kea0YVDTunq1V37wF8ohs+zflc1kcMis7iTyUtwLD2IYwQ47G981BLhnNkkkQBbE 4/jaWMJ8YGtLnpUkGaAMvVf4LVppiBXUIJFFJ4bdDHntA6zPiXHm3o+q9nIoMwRaZv1k3M 08VzZy+5PqIEMBxqCJIqOpjAD0k2PWjET0HCIX3MMeAmpm8DszrAOgwf8PZUP8/7FHxHXb cqzbppak9VTnB2cN/QU/h3Y4qZjdKt3sbWtWTpblKQNxflTAVyLZPN04AsOt0w== 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=1703166304; 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=SXBHJHe8DrsCEJZOYl8qg8I18mdayRVjy9Wk8WsEIF0=; b=Xg4ULqZUQ19Gu3/XTXFX0n8DQHEMwFhXz5lbDeXJS6r+1kQpZdQ++QJb20kKffVz1JvPbz WhysPRTC4JtCzB6pieKjqwD/Zchgr86j8YyphMAXHvR5XWQ0b/qEKJsDWKTsXsm84v5UL/ Gj9KkK0UvL6UWS32tkgk9DhFeYZT3aIq7uReoYoMx9fv4Sf8Qw8SZIivDafqHrL4muYR5B h6zwuIm/l6qmKrV4+lhqnk7dvUz7ByaclAzS/sdpqPJW+UcHkht17Qsx1tyvAYYlGOWF67 72xO7wTf4hLJYMudMBPYs4U9N3GN+Sc5Z8SBJf2Ljl9zwPuC9lbu6Q2/3lgbpg== 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 4SwsB84dtczZmW for ; Thu, 21 Dec 2023 13:45:04 +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 3BLDj48s060340 for ; Thu, 21 Dec 2023 13:45:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3BLDj47N060339 for bugs@FreeBSD.org; Thu, 21 Dec 2023 13:45:04 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: Thu, 21 Dec 2023 13:45:04 +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 #3 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D9fcf54d3750e379868e51e4aa7fbf6968= 77ab2ed commit 9fcf54d3750e379868e51e4aa7fbf696877ab2ed Author: Olivier Certner AuthorDate: 2023-05-30 16:35:08 +0000 Commit: Olivier Certner CommitDate: 2023-12-21 13:39:03 +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 Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40351 (cherry picked from commit 892654fe9b5a9115815c30a423b8db47185aebbd) Approved by: markj (mentor) 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.=