Bug 699331

Summary: SELinux is preventing /bin/bash from 'getattr' accesses on the file /usr/sbin/corosync.
Product: [Fedora] Fedora Reporter: geminic86
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:e539db25ceb19efd0071108d98c53084203c7bec474c56c283742e025f661bed
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-28 18:18:09 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 2011-04-25 07:23:07 UTC
SELinux is preventing /bin/bash from 'getattr' accesses on the file /usr/sbin/corosync.

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

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

Additional Information:
Source Context                system_u:system_r:aisexec_t:s0
Target Context                system_u:object_r:corosync_exec_t:s0
Target Objects                /usr/sbin/corosync [ file ]
Source                        aisexec
Source Path                   /bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.8-2.fc15
Target RPM Packages           corosync-1.3.0-2.fc15
Policy RPM                    selinux-policy-3.9.16-16.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.3-18.fc15.x86_64 #1 SMP Fri
                              Apr 22 13:24:23 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Sun 24 Apr 2011 03:19:29 PM EDT
Last Seen                     Sun 24 Apr 2011 03:19:29 PM EDT
Local ID                      cbcb5fe2-de0f-43f4-b706-2d13b9d656c9

Raw Audit Messages
type=AVC msg=audit(1303672769.220:1407): avc:  denied  { getattr } for  pid=16969 comm="aisexec" path="/usr/sbin/corosync" dev=dm-1 ino=159095 scontext=system_u:system_r:aisexec_t:s0 tcontext=system_u:object_r:corosync_exec_t:s0 tclass=file


type=SYSCALL msg=audit(1303672769.220:1407): arch=x86_64 syscall=stat success=no exit=EACCES a0=93d480 a1=7fff4b2f7350 a2=7fff4b2f7350 a3=fffffffffffffc22 items=0 ppid=16962 pid=16969 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=aisexec exe=/bin/bash subj=system_u:system_r:aisexec_t:s0 key=(null)

Hash: aisexec,aisexec_t,corosync_exec_t,file,getattr

audit2allow

#============= aisexec_t ==============
allow aisexec_t corosync_exec_t:file getattr;

audit2allow -R

#============= aisexec_t ==============
allow aisexec_t corosync_exec_t:file getattr;

Comment 1 Daniel Walsh 2011-04-25 13:01:25 UTC
Does aisexec have to execute corosync?

Comment 2 Miroslav Grepl 2011-04-26 07:34:25 UTC
I would say that yes.

geminic86,
could you try to execute

# semanage permissive -a aisexec_t

and try to re-test it.

Comment 3 Daniel Walsh 2011-04-26 14:37:34 UTC
Lets add
corosync_domtrans(aisexec_t)

We would want this in RHEL6 also.

Comment 4 Miroslav Grepl 2011-04-28 18:18:09 UTC
Fixed in selinux-policy-3.9.16-18.fc15