Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Aug 2016 10:50:37 +0000
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
Message-ID:  <bug-211622-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211622-13>