Bug 1526722

Summary: SELinux prevents dbus signals and method calls from/to ModemManager
Product: [Fedora] Fedora Reporter: Yussuf Khalil <fedora>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-283.19.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-02 16:50:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yussuf Khalil 2017-12-16 18:08:33 UTC
Description of problem:

ModemManager emits org.freedesktop.DBus.Properties.PropertiesChanged and org.freedesktop.ModemManager1.Modem.StateChanged signals when the properties or the state of a modem are changed. GNOME Shell calls org.freedesktop.DBus.Properties.GetAll to retrieve the current set of property values. All of these actions lead to SELinux denials. In consequence, the GNOME integration of ModemManager is partially broken when SELinux is running in enforcing mode, causing errors like the following:

gnome-shell[1386]: JS ERROR: TypeError: this._proxy.SignalQuality is null
  BroadbandModem<._reloadSignalQuality@resource:///org/gnome/shell/misc/modemManager.js:278:13
  wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
  BroadbandModem<._init@resource:///org/gnome/shell/misc/modemManager.js:260:9

SELinux denials like these can be observed:
audit[1000]: USER_AVC pid=1000 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.DBus.Properties member=GetAll dest=:1.5 spid=1377 tpid=997 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:system_r:modemmanager_t:s0 tclass=dbus permissive=0 exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'

audit[1000]: USER_AVC pid=1000 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=signal interface=org.freedesktop.DBus.Properties member=PropertiesChanged dest=org.freedesktop.DBus spid=997 tpid=1377 scontext=system_u:system_r:modemmanager_t:s0 tcontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tclass=dbus permissive=0 exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'

audit[1000]: USER_AVC pid=1000 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=signal interface=org.freedesktop.ModemManager1.Modem member=StateChanged dest=org.freedesktop.DBus spid=997 tpid=1377 scontext=system_u:system_r:modemmanager_t:s0 tcontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tclass=dbus permissive=0 exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
SELinux denials like these can be observed:

Version-Release number of selected component (if applicable):
 % dnf info selinux-policy | grep "Version\|Release"
Version      : 3.13.1
Release      : 283.17.fc27

Steps to Reproduce:
1. SELINUX=enforcing
2. Use any device with a modem
3. Read journalctl

Comment 1 Fedora Update System 2017-12-20 11:21:52 UTC
selinux-policy-3.13.1-283.19.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502

Comment 2 Fedora Update System 2017-12-20 11:28:18 UTC
selinux-policy-3.13.1-283.19.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502

Comment 3 Fedora Update System 2017-12-21 20:23:20 UTC
selinux-policy-3.13.1-283.19.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502

Comment 4 Fedora Update System 2018-01-02 16:50:20 UTC
selinux-policy-3.13.1-283.19.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.