From: Dominick Grift <dac.override@gmail.com>
To: Chris PeBenito <pebenito@ieee.org>,
David Sugar <dsugar@tresys.com>,
"selinux-refpolicy@vger.kernel.org"
<selinux-refpolicy@vger.kernel.org>
Subject: Re: [PATCH 1/2] Allow greeter to start dbus and transition
Date: Sun, 23 Dec 2018 17:55:10 +0100 [thread overview]
Message-ID: <20181223165510.GI20992@brutus.lan> (raw)
In-Reply-To: <20181223165206.GH20992@brutus.lan>
[-- Attachment #1: Type: text/plain, Size: 5537 bytes --]
On Sun, Dec 23, 2018 at 05:52:06PM +0100, Dominick Grift wrote:
> On Sun, Dec 23, 2018 at 05:45:12PM +0100, Dominick Grift wrote:
> > On Sun, Dec 23, 2018 at 05:33:59PM +0100, Dominick Grift wrote:
> > > On Sat, Dec 22, 2018 at 02:28:15PM -0500, Chris PeBenito wrote:
> > > > On 12/20/18 8:41 PM, David Sugar wrote:
> > > > > The display manager lightdm (and I think gdm) start a dbus binary.
> > > > > This allows that to happen in a special dbus domain.
> > > > >
> > > > > type=AVC msg=audit(1544626796.378:201): avc: denied { execute } for pid=9973 comm="dbus-launch" name="dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1
> > > > > type=AVC msg=audit(1544626796.378:201): avc: denied { read open } for pid=9973 comm="dbus-launch" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1
> > > > > type=AVC msg=audit(1544626796.378:201): avc: denied { execute_no_trans } for pid=9973 comm="dbus-launch" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1
> > > > > type=AVC msg=audit(1544626796.378:201): avc: denied { map } for pid=9973 comm="dbus-daemon" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1
> > > > > type=AVC msg=audit(1544628523.635:3208): avc: denied { execute } for pid=16376 comm="at-spi-bus-laun" name="dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1
> > > > > type=AVC msg=audit(1544628523.635:3208): avc: denied { read open } for pid=16376 comm="at-spi-bus-laun" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1
> > > > > type=AVC msg=audit(1544628523.635:3208): avc: denied { execute_no_trans } for pid=16376 comm="at-spi-bus-laun" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1
> > > > > type=AVC msg=audit(1544628523.635:3208): avc: denied { map } for pid=16376 comm="dbus-daemon" path="/usr/bin/dbus-daemon" dev="dm-1" ino=6695040 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_exec_t:s0 tclass=file permissive=1
> > > > >
> > > > > Signed-off-by: Dave Sugar <dsugar@tresys.com>
> > > > > ---
> > > > > policy/modules/services/xserver.te | 1 +
> > > > > 1 file changed, 1 insertion(+)
> > > > >
> > > > > diff --git a/policy/modules/services/xserver.te b/policy/modules/services/xserver.te
> > > > > index fa7ce88e..12ad3a87 100644
> > > > > --- a/policy/modules/services/xserver.te
> > > > > +++ b/policy/modules/services/xserver.te
> > > > > @@ -568,6 +568,7 @@ optional_policy(`
> > > > > optional_policy(`
> > > > > dbus_system_bus_client(xdm_t)
> > > > > dbus_connect_system_bus(xdm_t)
> > > > > + dbus_role_template(xdm, system_r, xdm_t)
> > > > > optional_policy(`
> > > > > accountsd_dbus_chat(xdm_t)
> > > >
> > > > This doesn't sit well with me. XDM isn't a user, or is system_r a user
> > > > role, so it shouldn't be using this template. On my system,
> > > > at-spi-bus-launcher is running as part of my user session, not as part of
> > > > XDM. It seems like this may be a transition problem.
> > >
> > > It does not sit well with me either but gdm is actually a "user" in way's. and it has a session.
> > >
> > > the gdm DM policy should never have been merged with XDM DM policy as XDM is much cleaner.
> > >
> > > GDM is nasty
> >
> > In dssp2 i actually have a seuser for gdm:
> >
> > # seinfo -xugdm.id
> >
> > Users: 1
> > user gdm.id roles sys.role level s0 range s0;
> >
> > And believe me, I did not do that for fun. In distributions with systemd --user this is just needed because
> > systemd will spawn a --user instance for gdm and this user instance spawns all kinds of processes on gdm's behalf
> >
> > for example dbus instance, the last thing you want is to have a gdm dbus instance running with system_dbusd_t
>
> then again, in dssp2 i just run pretty much everything in "gdm_t"
> so maybe a dbus_exec() is more appropriate (and simpler)
https://github.com/DefenSec/dssp2-standard/blob/master/policy/gnome/g/gdm.cil#L218
>
> >
> > >
> > > >
> > > > --
> > > > Chris PeBenito
> > >
> > > --
> > > Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
> > > https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
> > > Dominick Grift
> >
> >
> >
> > --
> > Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
> > https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
> > Dominick Grift
>
>
>
> --
> Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
> https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
> Dominick Grift
--
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2018-12-23 16:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 1:41 [PATCH 1/2] Allow greeter to start dbus and transition David Sugar
2018-12-21 1:41 ` [PATCH 2/2] pam_faillock creates files in /run/faillock David Sugar
2018-12-21 10:34 ` Dominick Grift
2018-12-22 2:58 ` Sugar, David
2018-12-22 19:20 ` Chris PeBenito
2018-12-23 10:20 ` Dominick Grift
2018-12-23 10:46 ` Dominick Grift
2018-12-23 16:09 ` Dominick Grift
2018-12-23 16:16 ` Dominick Grift
2018-12-22 19:28 ` [PATCH 1/2] Allow greeter to start dbus and transition Chris PeBenito
2018-12-23 16:33 ` Dominick Grift
2018-12-23 16:45 ` Dominick Grift
2018-12-23 16:52 ` Dominick Grift
2018-12-23 16:55 ` Dominick Grift [this message]
2018-12-23 17:02 ` Dominick Grift
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181223165510.GI20992@brutus.lan \
--to=dac.override@gmail.com \
--cc=dsugar@tresys.com \
--cc=pebenito@ieee.org \
--cc=selinux-refpolicy@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).