Bug 1017363 - SELinux is preventing /usr/lib/systemd/systemd-logind from 'read' accesses on the chr_file urandom.
Summary: SELinux is preventing /usr/lib/systemd/systemd-logind from 'read' accesses on...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:2a5002eb8eb91e340998c5a68f7...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-09 17:39 UTC by Mikhail
Modified: 2013-10-16 11:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-16 11:59:44 UTC
Type: ---


Attachments (Terms of Use)

Description Mikhail 2013-10-09 17:39:42 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-logind from 'read' accesses on the chr_file urandom.

*****  Plugin catchall_boolean (47.5 confidence) suggests   ******************

If you want to allow authlogin to nsswitch use ldap
Then you must tell SELinux about this by enabling the 'authlogin_nsswitch_use_ldap' boolean.
You can read 'None' man page for more details.
Do
setsebool -P authlogin_nsswitch_use_ldap 1

*****  Plugin catchall_boolean (47.5 confidence) suggests   ******************

If you want to allow global to ssp
Then you must tell SELinux about this by enabling the 'global_ssp' boolean.
You can read 'None' man page for more details.
Do
setsebool -P global_ssp 1

*****  Plugin catchall (6.38 confidence) suggests   **************************

If you believe that systemd-logind should be allowed read access on the urandom chr_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:urandom_device_t:s0
Target Objects                urandom [ chr_file ]
Source                        systemd-logind
Source Path                   /usr/lib/systemd/systemd-logind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-208-2.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-84.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.3-301.fc20.x86_64 #1 SMP Thu
                              Oct 3 00:57:21 UTC 2013 x86_64 x86_64
Alert Count                   4
First Seen                    2013-10-06 20:04:13 YEKT
Last Seen                     2013-10-09 23:17:49 YEKT
Local ID                      0c18a470-705b-4161-bbb0-3c254855e3ba

Raw Audit Messages
type=AVC msg=audit(1381339069.565:465): avc:  denied  { read } for  pid=480 comm="systemd-logind" name="urandom" dev="devtmpfs" ino=1033 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1381339069.565:465): arch=x86_64 syscall=open success=no exit=EACCES a0=7fe56d89381d a1=80100 a2=7fe56e6485c0 a3=0 items=0 ppid=1 pid=480 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-logind exe=/usr/lib/systemd/systemd-logind subj=system_u:system_r:systemd_logind_t:s0 key=(null)

Hash: systemd-logind,systemd_logind_t,urandom_device_t,chr_file,read

Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.11.3-301.fc20.x86_64
type:           libreport

Potential duplicate: bug 1016190

Comment 1 Lukas Vrabec 2013-10-16 11:59:44 UTC
Hi, 

Please update selinux-policy packages to fix it. 

$ audit2allow -i avc 


#============= systemd_logind_t ==============

#!!!! This avc is allowed in the current policy
allow systemd_logind_t urandom_device_t:chr_file read;

$ rpm -q selinux-policy
selinux-policy-3.12.1-90.fc20.noarch


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