From owner-freebsd-ports-bugs@freebsd.org Sat Aug 6 10:50:38 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 394A4BAF8B2 for ; Sat, 6 Aug 2016 10:50:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F9271A98 for ; Sat, 6 Aug 2016 10:50:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u76Aob9p047154 for ; Sat, 6 Aug 2016 10:50:37 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 211622] security/doas: doas doesn't enforce correct uid and gid with -u switch Date: Sat, 06 Aug 2016 10:50:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: telnetuserid@sdf.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2016 10:50:38 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211622 Bug ID: 211622 Summary: security/doas: doas doesn't enforce correct uid and gid with -u switch Product: Ports & Packages Version: Latest Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: telnetuserid@sdf.org CC: jsmith@resonatingmedia.com Flags: maintainer-feedback?(jsmith@resonatingmedia.com) CC: jsmith@resonatingmedia.com Version: doas-5.9p4 System: FreeBSD freebsd-vm 11.0-BETA3 FreeBSD 11.0-BETA3 #0 r303469: Fri Jul 29 02:27:28 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GEN= ERIC amd64 Using latest version of packages. FreeBSD doas port leaking root privilege when running as users other than r= oot and doesn't enforce uid and gid for the specified user. In short words: -u switch doesn't work at all! This may be related to bug #178284 $ doas -u nobody id uid=3D0(root) gid=3D0(wheel) egid=3D1001(telnetuserid) groups=3D1001(telnetuserid),0(wheel) /usr/local/etc/doas.conf permit keepenv { SSH_AUTH_SOCK ENV } :wheel permit keepenv nopass root For comparison, on openbsd 5.9 release. OpenBSD openbsd-vm 5.9 GENERIC.MP#1888 amd64 $ doas -u nobody id uid=3D32767(nobody) gid=3D32767(nobody) groups=3D32767(nobody) /etc/doas.conf permit keepenv { ENV PKG_PATH SSH_AUTH_SOCK } :wheel permit nopass keepenv root --=20 You are receiving this mail because: You are the assignee for the bug.=