Bug 852160 - SELinux preventing /usr/bin/qemu-kvm from write access on the directory with config_home_t type
SELinux preventing /usr/bin/qemu-kvm from write access on the directory with ...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
x86_64 All
unspecified Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-27 14:01 EDT by IBM Bug Proxy
Modified: 2012-09-21 19:59 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-21 19:59:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 84618 None None None 2012-08-27 14:01:24 EDT

  None (edit)
Description IBM Bug Proxy 2012-08-27 14:01:23 EDT
---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;
Comment 1 Miroslav Grepl 2012-08-28 03:33:36 EDT
should be fixed by

selinux-policy-3.10.0-148.fc17
Comment 2 IBM Bug Proxy 2012-09-06 17:00:29 EDT
------- Comment From rmarwah@us.ibm.com 2012-09-06 20:58 EDT-------
Thanks a lot for backporting and fixing the bug
Comment 3 Fedora Update System 2012-09-17 08:13:56 EDT
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
Comment 4 Fedora Update System 2012-09-18 22:55:33 EDT
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).
Comment 5 Fedora Update System 2012-09-21 19:59:38 EDT
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.

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