RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1362273 - SELinux prevents ModemManager from sending a D-bus message to systemd-logind and vice versa
Summary: SELinux prevents ModemManager from sending a D-bus message to systemd-logind ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On: 1364485
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-01 19:24 UTC by John Sefler
Modified: 2016-11-04 02:35 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-93.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 02:35:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2283 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2016-11-03 13:36:25 UTC

Description John Sefler 2016-08-01 19:24:29 UTC
Description of problem:
While testing rhel73 composes, I see two USER_AVC denied message written to /var/log/audit/audit.log every two minutes which coincides with two systemd messages written to /var/log/messages every two minutes.


Version-Release number of selected component (if applicable):
[root@jsefler-rhel7 ~]# rpm -qa | egrep "selinux|dbus|systemd"
dbus-x11-1.6.12-14.el7.x86_64
systemd-219-24.el7.x86_64
python-slip-dbus-0.4.0-2.el7.noarch
systemd-python-219-24.el7.x86_64
libselinux-python-2.5-4.el7.x86_64
systemd-libs-219-24.el7.x86_64
libselinux-utils-2.5-4.el7.x86_64
selinux-policy-3.13.1-92.el7.noarch
dbus-1.6.12-14.el7.x86_64
selinux-policy-targeted-3.13.1-92.el7.noarch
dbus-python-1.1.1-9.el7.x86_64
oci-systemd-hook-1.10.3-44.el7.x86_64
abrt-dbus-2.1.11-41.el7.x86_64
libselinux-2.5-4.el7.x86_64
docker-selinux-1.10.3-44.el7.x86_64
dbus-glib-0.100-7.el7.x86_64
dbus-libs-1.6.12-14.el7.x86_64
systemd-sysv-219-24.el7.x86_64
dleyna-connector-dbus-0.2.0-1.el7.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel7 ~]# service auditd restart
Stopping logging:                                          [  OK  ]
Redirecting start to /bin/systemctl start auditd.service
[root@jsefler-rhel7 ~]# setenforce 1
[root@jsefler-rhel7 ~]# restorecon -Rv /etc /run /var
restorecon reset /run/user/42/gvfs context system_u:object_r:user_tmp_t:s0->system_u:object_r:fusefs_t:s0
restorecon:  Warning no default label for /run/lvmetad.pid
<....cutting out a lot of restorecon Warnings....>
restorecon:  Warning no default label for /var/tmp/sosreport-jsefler-rhel7.usersys.redhat.com-20160720175239.tar.xz.md5
[root@jsefler-rhel7 ~]# START_DATE_TIME=`date "+%m/%d/%Y %T"`
[root@jsefler-rhel7 ~]# 


With two terminals open, watch the tail of these two logs for about four minutes...


[root@jsefler-rhel7 ~]# tail -f /var/log/messages
Aug  1 14:56:01 jsefler-rhel7 systemd: Started Session 141 of user root.
Aug  1 14:56:01 jsefler-rhel7 systemd: Starting Session 141 of user root.
Aug  1 14:58:01 jsefler-rhel7 systemd: Started Session 142 of user root.
Aug  1 14:58:01 jsefler-rhel7 systemd: Starting Session 142 of user root.


[root@jsefler-rhel7 ~]# tail -f /var/log/audit/audit.log | grep AVC
type=USER_AVC msg=audit(1470077761.241:21946): pid=693 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { 0x2 } for msgtype=signal interface=org.freedesktop.login1.Manager member=SessionNew dest=org.freedesktop.DBus spid=691 tpid=720 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:system_r:modemmanager_t:s0 tclass=(null)  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
type=USER_AVC msg=audit(1470077761.449:21951): pid=693 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { 0x2 } for msgtype=signal interface=org.freedesktop.login1.Manager member=SessionRemoved dest=org.freedesktop.DBus spid=691 tpid=720 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:system_r:modemmanager_t:s0 tclass=(null)  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
type=USER_AVC msg=audit(1470077881.463:21955): pid=693 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { 0x2 } for msgtype=signal interface=org.freedesktop.login1.Manager member=SessionNew dest=org.freedesktop.DBus spid=691 tpid=720 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:system_r:modemmanager_t:s0 tclass=(null)  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
type=USER_AVC msg=audit(1470077881.665:21960): pid=693 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { 0x2 } for msgtype=signal interface=org.freedesktop.login1.Manager member=SessionRemoved dest=org.freedesktop.DBus spid=691 tpid=720 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:system_r:modemmanager_t:s0 tclass=(null)  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'


Then after four minutes run...

[root@jsefler-rhel7 ~]# ausearch -m AVC -m USER_AVC -m SELINUX_ERR -i -ts ${START_DATE_TIME}
----
type=USER_AVC msg=audit(08/01/2016 14:56:01.241:21946) : pid=693 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { 0x2 } for msgtype=signal interface=org.freedesktop.login1.Manager member=SessionNew dest=org.freedesktop.DBus spid=691 tpid=720 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:system_r:modemmanager_t:s0 tclass=(null)  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
----
type=USER_AVC msg=audit(08/01/2016 14:56:01.449:21951) : pid=693 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { 0x2 } for msgtype=signal interface=org.freedesktop.login1.Manager member=SessionRemoved dest=org.freedesktop.DBus spid=691 tpid=720 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:system_r:modemmanager_t:s0 tclass=(null)  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
----
type=USER_AVC msg=audit(08/01/2016 14:58:01.463:21955) : pid=693 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { 0x2 } for msgtype=signal interface=org.freedesktop.login1.Manager member=SessionNew dest=org.freedesktop.DBus spid=691 tpid=720 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:system_r:modemmanager_t:s0 tclass=(null)  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
----
type=USER_AVC msg=audit(08/01/2016 14:58:01.665:21960) : pid=693 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { 0x2 } for msgtype=signal interface=org.freedesktop.login1.Manager member=SessionRemoved dest=org.freedesktop.DBus spid=691 tpid=720 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:system_r:modemmanager_t:s0 tclass=(null)  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
[root@jsefler-rhel7 ~]# 



Actual results:
  above

Expected results:


Additional info:
  When I run with permissive, I do not get the denials every two minutes.

Comment 2 Milos Malik 2016-08-02 11:43:37 UTC
The D-bus messages are blocked in both directions:
----
time->Fri Jul 29 13:55:53 2016
type=USER_AVC msg=audit(1469814953.722:649): pid=778 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { 0x2 } for msgtype=method_call interface=org.freedesktop.login1.Manager member=Inhibit dest=:1.0 spid=11142 tpid=777 scontext=system_u:system_r:modemmanager_t:s0 tcontext=system_u:system_r:systemd_logind_t:s0 tclass=(null)  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
----

Comment 7 errata-xmlrpc 2016-11-04 02:35:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2283.html


Note You need to log in before you can comment on or make changes to this bug.