Bug 799381

Summary: SELinux is preventing /usr/bin/ruby from 'search' accesses on the directory kernel.
Product: [Fedora] Fedora Reporter: geminic86
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:fecd5f82a06586f909c78ed22d2def6286057c94d2665ba580bb29fcb56af846
Fixed In Version: selinux-policy-3.10.0-80.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-24 00:37:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description geminic86 2012-03-02 15:41:02 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.2.7-1.fc16.i686.PAE
reason:         SELinux is preventing /usr/bin/ruby from 'search' accesses on the directory kernel.
time:           Fri 02 Mar 2012 10:40:50 AM EST

description:
:SELinux is preventing /usr/bin/ruby from 'search' accesses on the directory kernel.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that ruby should be allowed search access on the kernel directory 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 deltacloudd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:deltacloudd_t:s0
:Target Context                system_u:object_r:sysctl_kernel_t:s0
:Target Objects                kernel [ dir ]
:Source                        deltacloudd
:Source Path                   /usr/bin/ruby
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           ruby-1.8.7.357-1.fc16.i686
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-75.fc16.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.2.7-1.fc16.i686.PAE #1 SMP Tue Feb
:                              21 01:30:59 UTC 2012 i686 i686
:Alert Count                   1
:First Seen                    Fri 02 Mar 2012 10:20:12 AM EST
:Last Seen                     Fri 02 Mar 2012 10:20:12 AM EST
:Local ID                      e8613b3e-f938-43ff-a557-a2c7eaed2f49
:
:Raw Audit Messages
:type=AVC msg=audit(1330701612.215:62): avc:  denied  { search } for  pid=1429 comm="deltacloudd" name="kernel" dev=proc ino=12468 scontext=system_u:system_r:deltacloudd_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=dir
:
:
:type=AVC msg=audit(1330701612.215:62): avc:  denied  { read } for  pid=1429 comm="deltacloudd" name="ngroups_max" dev=proc ino=16571 scontext=system_u:system_r:deltacloudd_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=file
:
:
:type=AVC msg=audit(1330701612.215:62): avc:  denied  { open } for  pid=1429 comm="deltacloudd" name="ngroups_max" dev=proc ino=16571 scontext=system_u:system_r:deltacloudd_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1330701612.215:62): arch=i386 syscall=open success=yes exit=ESRCH a0=4f59b9cf a1=0 a2=0 a3=3 items=0 ppid=1428 pid=1429 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=deltacloudd exe=/usr/bin/ruby subj=system_u:system_r:deltacloudd_t:s0 key=(null)
:
:Hash: deltacloudd,deltacloudd_t,sysctl_kernel_t,dir,search
:
:audit2allow
:
:#============= deltacloudd_t ==============
:allow deltacloudd_t sysctl_kernel_t:dir search;
:allow deltacloudd_t sysctl_kernel_t:file { read open };
:
:audit2allow -R
:
:#============= deltacloudd_t ==============
:allow deltacloudd_t sysctl_kernel_t:dir search;
:allow deltacloudd_t sysctl_kernel_t:file { read open };
:

Comment 1 Miroslav Grepl 2012-03-05 08:39:34 UTC
$ git log f16
commit 8a17ccfce15ea8c3dd6b09276287951037cb2b47
Author: Dan Walsh <dwalsh>
Date:   Fri Mar 2 14:45:06 2012 -0500

    Allow deltacloud to read kernel sysctl

Comment 2 Fedora Update System 2012-03-13 12:26:01 UTC
selinux-policy-3.10.0-80.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/FEDORA-2012-2733/selinux-policy-3.10.0-80.fc16

Comment 3 Fedora Update System 2012-03-21 02:25:10 UTC
Package selinux-policy-3.10.0-80.fc16:
* should fix your issue,
* was pushed to the Fedora 16 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.10.0-80.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-2733/selinux-policy-3.10.0-80.fc16
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-03-24 00:37:19 UTC
selinux-policy-3.10.0-80.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.