Bug 890555

Summary: SELinux is preventing /usr/bin/qemu-kvm from 'create' accesses on the rawip_socket .
Product: [Fedora] Fedora Reporter: Elad Alfassa <elad>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE 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:2c7d112cd01cc33e3a1a66d93cb2be8d045cce31ac0b38ea98e1ecb9b552b4a0
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-27 19:17:32 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 Elad Alfassa 2012-12-27 18:33:09 UTC
Description of problem:
SELinux is preventing /usr/bin/qemu-kvm from 'create' accesses on the rawip_socket .

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

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

Additional Information:
Source Context                unconfined_u:system_r:svirt_t:s0:c368,c879
Target Context                unconfined_u:system_r:svirt_t:s0:c368,c879
Target Objects                 [ rawip_socket ]
Source                        qemu-kvm
Source Path                   /usr/bin/qemu-kvm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-1.2.2-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-67.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.6.11-3.fc18.x86_64 #1 SMP Mon
                              Dec 17 21:35:39 UTC 2012 x86_64 x86_64
Alert Count                   2
First Seen                    2012-12-27 20:31:13 IST
Last Seen                     2012-12-27 20:31:18 IST
Local ID                      c35d2370-8747-448d-aa04-b3797289aa13

Raw Audit Messages
type=AVC msg=audit(1356633078.111:738): avc:  denied  { create } for  pid=16399 comm="qemu-kvm" scontext=unconfined_u:system_r:svirt_t:s0:c368,c879 tcontext=unconfined_u:system_r:svirt_t:s0:c368,c879 tclass=rawip_socket


type=SYSCALL msg=audit(1356633078.111:738): arch=x86_64 syscall=socket success=no exit=EACCES a0=2 a1=80002 a2=1 a3=a8 items=0 ppid=1 pid=16399 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=qemu-kvm exe=/usr/bin/qemu-kvm subj=unconfined_u:system_r:svirt_t:s0:c368,c879 key=(null)

Hash: qemu-kvm,svirt_t,svirt_t,rawip_socket,create

audit2allow

#============= svirt_t ==============
#!!!! This avc can be allowed using the boolean 'virt_use_rawip'

allow svirt_t self:rawip_socket create;

audit2allow -R

#============= svirt_t ==============
#!!!! This avc can be allowed using the boolean 'virt_use_rawip'

allow svirt_t self:rawip_socket create;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.6.11-3.fc18.x86_64
type:           libreport

Potential duplicate: bug 864497

Comment 1 Miroslav Grepl 2012-12-27 19:17:32 UTC

*** This bug has been marked as a duplicate of bug 864497 ***