Bug 951079

Summary: SELinux is preventing /usr/bin/ovs-ofctl from 'getattr' accesses on the sock_file /run/openvswitch/br-int.mgmt.
Product: [Fedora] Fedora Reporter: Arindam Choudhury <arindam>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:4bf852095f96ea305631768ad8634a3101c156d0083d867c555001dd6a0513c6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-18 02:52:01 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 Arindam Choudhury 2013-04-11 12:35:04 UTC
Description of problem:
service quantum-openvswitch-agent start
SELinux is preventing /usr/bin/ovs-ofctl from 'getattr' accesses on the sock_file /run/openvswitch/br-int.mgmt.

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

If you believe that ovs-ofctl should be allowed getattr access on the br-int.mgmt sock_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 ovs-ofctl /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:quantum_t:s0
Target Context                system_u:object_r:openvswitch_var_run_t:s0
Target Objects                /run/openvswitch/br-int.mgmt [ sock_file ]
Source                        ovs-ofctl
Source Path                   /usr/bin/ovs-ofctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openvswitch-1.9.0-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-87.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.8.5-201.fc18.x86_64 #1 SMP Thu
                              Mar 28 21:01:19 UTC 2013 x86_64 x86_64
Alert Count                   4
First Seen                    2013-04-11 14:31:58 CEST
Last Seen                     2013-04-11 14:32:54 CEST
Local ID                      af547aea-6be1-419d-bd1f-d442665517bc

Raw Audit Messages
type=AVC msg=audit(1365683574.176:576): avc:  denied  { getattr } for  pid=11978 comm="ovs-ofctl" path="/run/openvswitch/br-int.mgmt" dev="tmpfs" ino=23850 scontext=system_u:system_r:quantum_t:s0 tcontext=system_u:object_r:openvswitch_var_run_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1365683574.176:576): arch=x86_64 syscall=stat success=no exit=EACCES a0=1013160 a1=7fffdb1daff0 a2=7fffdb1daff0 a3=7fffdb1dad70 items=0 ppid=11975 pid=11978 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=ovs-ofctl exe=/usr/bin/ovs-ofctl subj=system_u:system_r:quantum_t:s0 key=(null)

Hash: ovs-ofctl,quantum_t,openvswitch_var_run_t,sock_file,getattr

audit2allow

#============= quantum_t ==============
allow quantum_t openvswitch_var_run_t:sock_file getattr;

audit2allow -R
require {
	type openvswitch_var_run_t;
	type quantum_t;
	class sock_file getattr;
}

#============= quantum_t ==============
allow quantum_t openvswitch_var_run_t:sock_file getattr;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.5-201.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-04-15 05:37:05 UTC
Fixed in selinux-policy-3.11.1-90.fc18

Comment 2 Fedora Update System 2013-04-15 11:12:03 UTC
selinux-policy-3.11.1-90.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-90.fc18

Comment 3 Fedora Update System 2013-04-16 00:07:30 UTC
Package selinux-policy-3.11.1-90.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-90.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5742/selinux-policy-3.11.1-90.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-04-18 02:52:03 UTC
selinux-policy-3.11.1-90.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.