Bug 987052 - SELinux is preventing /usr/sbin/zebra from 'read' accesses on the chr_file random.
SELinux is preventing /usr/sbin/zebra from 'read' accesses on the chr_file ra...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:81eb134dcb043cd23b028d15a3f...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-22 11:34 EDT by Richard W.M. Jones
Modified: 2013-07-26 19:06 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-66.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-26 19:06:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2013-07-22 11:34:43 EDT
Description of problem:
zebra appears to want to access /dev/random, and this generates AVCs.
SELinux is preventing /usr/sbin/zebra from 'read' accesses on the chr_file random.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that zebra should be allowed read access on the random 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 zebra /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:zebra_t:s0
Target Context                system_u:object_r:random_device_t:s0
Target Objects                random [ chr_file ]
Source                        zebra
Source Path                   /usr/sbin/zebra
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           quagga-0.99.22.1-7.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-65.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.9-302.fc19.x86_64 #1 SMP Sat
                              Jul 6 13:41:07 UTC 2013 x86_64 x86_64
Alert Count                   3
First Seen                    2013-07-21 11:44:13 BST
Last Seen                     2013-07-22 16:30:24 BST
Local ID                      263cebce-16c7-4053-b738-197bfb69c353

Raw Audit Messages
type=AVC msg=audit(1374507024.71:2271): avc:  denied  { read } for  pid=31091 comm="ripd" name="random" dev="devtmpfs" ino=6728 scontext=system_u:system_r:zebra_t:s0 tcontext=system_u:object_r:random_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1374507024.71:2271): arch=x86_64 syscall=open success=no exit=EACCES a0=7f00f8312c1b a1=900 a2=7973 a3=7fff6d190c90 items=0 ppid=1 pid=31091 auid=4294967295 uid=92 gid=92 euid=92 suid=92 fsuid=92 egid=92 sgid=92 fsgid=92 ses=4294967295 tty=(none) comm=ripd exe=/usr/sbin/ripd subj=system_u:system_r:zebra_t:s0 key=(null)

Hash: zebra,zebra_t,random_device_t,chr_file,read

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.9-302.fc19.x86_64
type:           libreport
Comment 1 Richard W.M. Jones 2013-07-22 11:37:33 EDT
It appears to be a legit access.  From the quagga source:

$ find -type f | xargs grep /dev/urandom
./babeld/kernel.c:/* If /dev/urandom doesn't exist, this will fail with ENOENT, which the
./babeld/kernel.c:    fd = open("/dev/urandom", O_RDONLY);
Comment 2 Daniel Walsh 2013-07-22 15:34:19 EDT
34016c775003530181c93c9efdad0173953b13f6 fixes this in git.
Comment 3 Fedora Update System 2013-07-24 10:14:12 EDT
selinux-policy-3.12.1-66.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-66.fc19
Comment 4 Fedora Update System 2013-07-24 20:36:04 EDT
Package selinux-policy-3.12.1-66.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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-66.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-13543/selinux-policy-3.12.1-66.fc19
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2013-07-26 19:06:50 EDT
selinux-policy-3.12.1-66.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

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