Bug 579744

Summary: SELinux is preventing /usr/bin/qemu-kvm "ioctl" access on /dev/bus/usb/002/004.
Product: [Fedora] Fedora Reporter: Luca Botti <luca.botti>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: berrange, bugzilla_redhat, clalance, crobinso, dwalsh, itamar, jforbes, mgrepl, mma.priv, thanosk, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:7d63e22f83763cb772c1a630851ae24c95dfa5288a9741235342c5920cbcf6c1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-07 10:10:00 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Luca Botti 2010-04-06 09:12:56 EDT

SELinux is preventing /usr/bin/qemu-kvm "ioctl" access on /dev/bus/usb/002/004.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by qemu-kvm. It is not expected that this access
is required by qemu-kvm and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug

Additional Information:

Source Context                system_u:system_r:svirt_t:s0:c759,c960
Target Context                system_u:object_r:usb_device_t:s0
Target Objects                /dev/bus/usb/002/004 [ chr_file ]
Source                        qemu-kvm
Source Path                   /usr/bin/qemu-kvm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-0.11.0-13.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-106.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) #1 SMP Tue
                              Mar 23 09:47:08 UTC 2010 x86_64 x86_64
Alert Count                   0
First Seen                    Tue 06 Apr 2010 02:40:33 PM CEST
Last Seen                     Tue 06 Apr 2010 02:40:33 PM CEST
Local ID                      3bbdeebc-1c62-4f7e-9348-b5388e305581
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1270557633.716:34): avc:  denied  { ioctl } for  pid=3404 comm="qemu-kvm" path="/dev/bus/usb/002/004" dev=devtmpfs ino=127425 scontext=system_u:system_r:svirt_t:s0:c759,c960 tcontext=system_u:object_r:usb_device_t:s0 tclass=chr_file

node=(removed) type=SYSCALL msg=audit(1270557633.716:34): arch=c000003e syscall=16 success=yes exit=0 a0=c a1=5514 a2=2f98680 a3=8 items=0 ppid=1 pid=3404 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:c759,c960 key=(null)

Hash String generated from  catchall,qemu-kvm,svirt_t,usb_device_t,chr_file,ioctl
audit2allow suggests:

#============= svirt_t ==============
allow svirt_t usb_device_t:chr_file ioctl;
Comment 1 Daniel Walsh 2010-04-06 09:29:14 EDT
libvirt did not set the label on the device?
Comment 2 Luca Botti 2010-04-07 02:00:09 EDT
Apparentrly not. Not able to access the device.
Comment 3 Daniel Walsh 2010-04-07 10:10:00 EDT

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