Bug 684696

Summary: SELinux is preventing /usr/bin/qemu-kvm from read, write access on the chr_file /dev/bus/usb/001/007.
Product: [Fedora] Fedora Reporter: Artur Szymczak <ajes+redhat>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:49f351397f48c666b6a6aca549b22e240d70bcf2548a7cbf9ca951e0e4b84c9e
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-14 12:43: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 Artur Szymczak 2011-03-14 09:12:02 UTC
SELinux is preventing /usr/bin/qemu-kvm from read, write access on the chr_file /dev/bus/usb/001/007.

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

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

Additional Information:
Source Context                system_u:system_r:svirt_t:s0:c112,c574
Target Context                system_u:object_r:usb_device_t:s0
Target Objects                /dev/bus/usb/001/007 [ chr_file ]
Source                        qemu-kvm
Source Path                   /usr/bin/qemu-kvm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-0.13.0-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-31.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.11-83.fc14.x86_64
                              #1 SMP Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64
Alert Count                   4
First Seen                    Mon 14 Mar 2011 10:08:45 AM CET
Last Seen                     Mon 14 Mar 2011 10:09:12 AM CET
Local ID                      f781dc3e-01f8-457f-9066-f02719f6e630

Raw Audit Messages
type=AVC msg=audit(1300093752.32:41): avc:  denied  { read write } for  pid=2409 comm="qemu-kvm" path="/dev/bus/usb/001/007" dev=devtmpfs ino=43988 scontext=system_u:system_r:svirt_t:s0:c112,c574 tcontext=system_u:object_r:usb_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1300093752.32:41): arch=x86_64 syscall=ioctl success=no exit=EACCES a0=14 a1=c0105512 a2=7f7bbe04f9e0 a3=1 items=0 ppid=1 pid=2409 auid=4294967295 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 tty=(none) ses=4294967295 comm=qemu-kvm exe=/usr/bin/qemu-kvm subj=system_u:system_r:svirt_t:s0:c112,c574 key=(null)

Hash: qemu-kvm,svirt_t,usb_device_t,chr_file,read,write

audit2allow

#============= svirt_t ==============
allow svirt_t usb_device_t:chr_file { read write };

audit2allow -R

#============= svirt_t ==============
allow svirt_t usb_device_t:chr_file { read write };

Comment 1 Miroslav Grepl 2011-03-14 12:43:09 UTC

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