Bug 518014 - Allow svirt images to create sock_file in svirt_var_run_t
Summary: Allow svirt images to create sock_file in svirt_var_run_t
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F11VirtTarget
TreeView+ depends on / blocked
 
Reported: 2009-08-18 13:33 UTC by Perry Myers
Modified: 2009-09-03 12:09 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-03 12:09:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Perry Myers 2009-08-18 13:33:04 UTC
Description of problem:
When trying to start a kvm domain via virsh when SELinux is in Enforcing mode, the domain fails to start with the following errors:

[root@sdp1 ~]# virsh start f11
error: Failed to start domain f11
error: internal error unable to start guest: bind(unix:/var/run/libvirt/qemu/f11.monitor): Permission denied
qemu: could not open monitor device 'unix:/var/run/libvirt/qemu/f11.monitor,server,nowait'

avc logs are;
Aug 18 09:28:46 sdp1 libvirtd: 09:28:46.164: error : qemudReadLogOutput:816 : internal error Process exited while reading console log output
Aug 18 09:28:46 sdp1 libvirtd: 09:28:46.164: error : qemudWaitForMonitor:1103 : internal error unable to start guest: bind(unix:/var/run/libvirt/qemu/f11.monitor): Permission denied#012qemu: could not open monitor device 'unix:/var/run/libvirt/qemu/f11.monitor,server,nowait'#012
Aug 18 09:28:47 sdp1 setroubleshoot: SELinux is preventing qemu-kvm (svirt_t) "create" svirt_var_run_t. For complete SELinux messages. run sealert -l 698e9589-b6f0-43d6-8d8c-8a403774f74e

node=sdp1 type=AVC msg=audit(1250602126.69:60873): avc:  denied  { create } for  pid=9920 comm="qemu-kvm" name="f11.monitor" scontext=system_u:system_r:svirt_t:s0:c751,c922 tcontext=system_u:object_r:svirt_var_run_t:s0:c751,c922 tclass=sock_file

node=sdp1 type=SYSCALL msg=audit(1250602126.69:60873): arch=c000003e syscall=49 success=no exit=-13 a0=9 a1=7fff624548e0 a2=6e a3=7fff62454670 items=0 ppid=1 pid=9920 auid=11912 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="qemu-kvm" exe="/usr/bin/qemu-kvm" subj=system_u:system_r:svirt_t:s0:c751,c922 key=(null)

Version-Release number of selected component (if applicable):
libvirt-0.7.0-3.fc11.x86_64
qemu-kvm-0.10.91-0.5.rc1.fc11.x86_64
selinux-policy-targeted-3.6.12-72.fc11.noarch
selinux-policy-3.6.12-72.fc11.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Enable selinux via setenforce Enforcing
2. virsh start <domain>
3.
  
Actual results:
Errors listed above

Expected results:
Domain should start

Additional info:

Comment 1 Mark McLoughlin 2009-08-18 13:50:30 UTC
The fix for this in Fedora 12 was this:

   * Wed Aug 5 2009 Dan Walsh <dwalsh> 3.6.26-5
   - Allow svirt images to create sock_file in svirt_var_run_t

Can we get this applied in Fedora 11 too for users of the virt-preview repository?

(The idea with the virt-preview repo is that Fedora 11 users can try out the new Fedora 12 virt bits without breaking non-virt things on their system)

Comment 2 Miroslav Grepl 2009-08-18 13:57:17 UTC
It was fixed in selinux-policy-3.6.12-74.fc11

  * Wed Aug 05 2009 Miroslav Grepl <mgrepl> 3.6.12-74 
    - Allow svirt images to create sock_file in svirt_var_run_t

Comment 3 Mark McLoughlin 2009-08-18 14:24:46 UTC
Ah, okay thanks

https://admin.fedoraproject.org/updates/F11/FEDORA-2009-8536

Comment 4 Mark McLoughlin 2009-09-03 12:09:19 UTC
Since pushed to stable


Note You need to log in before you can comment on or make changes to this bug.