Bug 456324

Summary: SELinux breaks libvirts with QEMU error : internal error "failed to set CPU affinity" Permission denied
Product: [Fedora] Fedora Reporter: Matěj Cepl <mcepl>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: berrange, dwalsh, virt-maint
Target Milestone: ---Keywords: SELinux
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-10 06:41:16 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
AVC denials from ausearch
none
generated SELinux module none

Description Matěj Cepl 2008-07-22 17:01:14 EDT
Description of problem:
When starting a virtual machine on kvm (with full virt and via virsh create) I
get error in Summary.
audit2allow generated me this .te module:
module kvm01 1.0;

require {
        type virtd_t;
        type qemu_t;
        class capability sys_resource;
        class process { setsched getsched };
}
require {
        type virtd_t;
        type qemu_t;
        class capability sys_resource;
        class process { setsched getsched };
}

#============= virtd_t ==============
allow virtd_t qemu_t:process setsched;
allow virtd_t self:capability sys_resource;
allow virtd_t self:process getsched;

When applying this module, virsh works correctly.

Version-Release number of selected component (if applicable):
qemu-img-0.9.1-6.fc9.i386
qemu-0.9.1-6.fc9.i386
kvm-65-7.fc9.i386
libvirt-0.4.4-2.fc9.i386

How reproducible:
100%

Steps to Reproduce:
1.virsh create /etc/libvirtd/qemu/nahan.xml
2.
3.
  
Actual results:
error

Expected results:
started virtual machine

Additional info:
Comment 1 Matěj Cepl 2008-07-22 17:01:14 EDT
Created attachment 312394 [details]
AVC denials from ausearch
Comment 2 Matěj Cepl 2008-07-22 17:01:44 EDT
Created attachment 312395 [details]
generated SELinux module
Comment 3 Daniel Walsh 2008-07-24 07:41:51 EDT
Fixed in selinux-policy-3.3.1-79.fc9.noarch
Comment 4 Bug Zapper 2009-06-09 22:11:10 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping