---Problem Description--- SELinux is preventing /usr/bin/qemu-kvm from 'write' accesses on the config_home_t type directory ---uname output--- 3.5.2-1.fc17.x86_64 Machine Type = x86_64 ---Steps to Reproduce--- When I am trying to run libvirt with selinux as permissive under an underprivileged user using /usr/bin/virsh -c qemu:///session I get the follwoing denials Raw Audit Messages type=AVC msg=audit(1346078885.821:100): avc: denied { write } for pid=2060 comm="qemu-kvm" name="lib" dev="dm-2" ino=15204904 scontext=unconfined_u:unconfined_r:svirt_t:s0:c202,c936 tcontext=unconfined_u:object_r:config_home_t:s0 tclass=dir type=AVC msg=audit(1346078885.821:100): avc: denied { add_name } for pid=2060 comm="qemu-kvm" name="F14_64.monitor" scontext=unconfined_u:unconfined_r:svirt_t:s0:c202,c936 tcontext=unconfined_u:object_r:config_home_t:s0 tclass=dir type=AVC msg=audit(1346078885.821:100): avc: denied { create } for pid=2060 comm="qemu-kvm" name="F14_64.monitor" scontext=unconfined_u:unconfined_r:svirt_t:s0:c202,c936 tcontext=unconfined_u:object_r:config_home_t:s0 tclass=sock_file type=SYSCALL msg=audit(1346078885.821:100): arch=x86_64 syscall=bind success=yes exit=0 a0=3 a1=7fff5e083560 a2=6e a3=756d65712f747269 items=0 ppid=1 pid=2060 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:unconfined_r:svirt_t:s0:c202,c936 key=(null) Hash: qemu-kvm,svirt_t,config_home_t,dir,write audit2allow #============= svirt_t ============== #!!!! The source type 'svirt_t' can write to a 'dir' of the following types: # tmpfs_t, tmp_t, svirt_tmp_t, var_t, hugetlbfs_t, svirt_image_t, svirt_tmpfs_t, virt_cache_t, var_run_t, qemu_var_run_t, svirt_home_t, virt_home_t, dosfs_t allow svirt_t config_home_t:dir { write add_name }; allow svirt_t config_home_t:sock_file create; audit2allow -R #============= svirt_t ============== #!!!! The source type 'svirt_t' can write to a 'dir' of the following types: # tmpfs_t, tmp_t, svirt_tmp_t, var_t, hugetlbfs_t, svirt_image_t, svirt_tmpfs_t, virt_cache_t, var_run_t, qemu_var_run_t, svirt_home_t, virt_home_t, dosfs_t allow svirt_t config_home_t:dir { write add_name }; allow svirt_t config_home_t:sock_file create;
should be fixed by selinux-policy-3.10.0-148.fc17
------- Comment From rmarwah.com 2012-09-06 20:58 EDT------- Thanks a lot for backporting and fixing the bug
selinux-policy-3.10.0-149.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-149.fc17
Package selinux-policy-3.10.0-149.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-149.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-14301/selinux-policy-3.10.0-149.fc17 then log in and leave karma (feedback).
selinux-policy-3.10.0-149.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.