Bug 1047021

Summary: SELinux is preventing /usr/sbin/ModemManager from 'read' accesses on the chr_file urandom.
Product: [Fedora] Fedora Reporter: Mario Blättermann <mario.blaettermann>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:2629e52a395449424b78789c42cdb7c5d4a348d3941634f2a03c7c8e2290473d
Fixed In Version: selinux-policy-3.12.1-116.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-16 07:12:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mario Blättermann 2013-12-28 12:39:02 UTC
Description of problem:
While trying to build a package for modem-manager-gui I stumbled upon this problem. Well, I could try to ship a SElinux exception rule with the package, but maybe this could be solved upstream. Don't know this access is critical in terms of security.
SELinux is preventing /usr/sbin/ModemManager from 'read' accesses on the chr_file urandom.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If sie folgendes tun möchten: allow global to ssp
Then sie müssen SELinux darüber benachrichtigen, indem Sie die 	boolesche Variable »global_ssp« aktivieren.
Für weitere Einzelheiten, können Sie die »None« man-Seiten konsultieren.
Do
setsebool -P global_ssp 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If sie denken, dass es ModemManager standardmässig erlaubt sein sollte, read Zugriff auf urandom chr_file zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# grep ModemManager /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:modemmanager_t:s0
Target Context                system_u:object_r:urandom_device_t:s0
Target Objects                urandom [ chr_file ]
Source                        ModemManager
Source Path                   /usr/sbin/ModemManager
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           ModemManager-1.1.0-2.git20130913.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-106.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.5-302.fc20.x86_64 #1 SMP Tue
                              Dec 17 20:42:32 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-12-28 12:29:53 CET
Last Seen                     2013-12-28 12:29:53 CET
Local ID                      2a22704f-dce1-47d8-97ea-16821b5a6491

Raw Audit Messages
type=AVC msg=audit(1388230193.358:663): avc:  denied  { read } for  pid=436 comm="ModemManager" name="urandom" dev="devtmpfs" ino=6025 scontext=system_u:system_r:modemmanager_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1388230193.358:663): arch=x86_64 syscall=open success=no exit=EACCES a0=38d68bdd5c a1=0 a2=1b6 a3=1 items=0 ppid=1 pid=436 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=ModemManager exe=/usr/sbin/ModemManager subj=system_u:system_r:modemmanager_t:s0 key=(null)

Hash: ModemManager,modemmanager_t,urandom_device_t,chr_file,read

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.12.5-302.fc20.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-01-03 19:22:10 UTC
1b2387cbde699449a251bcaf76e2d6db6f6f1bb7 fixes this in git.

Comment 2 Lukas Vrabec 2014-01-04 00:09:24 UTC
back ported.

Comment 3 Fedora Update System 2014-01-13 22:57:27 UTC
selinux-policy-3.12.1-116.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-116.fc20

Comment 4 Fedora Update System 2014-01-15 05:59:00 UTC
Package selinux-policy-3.12.1-116.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-116.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0806/selinux-policy-3.12.1-116.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-01-16 07:12:02 UTC
selinux-policy-3.12.1-116.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.