Bug 852160 - SELinux preventing /usr/bin/qemu-kvm from write access on the directory with config_home_t type
Summary: SELinux preventing /usr/bin/qemu-kvm from write access on the directory with ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-27 18:01 UTC by IBM Bug Proxy
Modified: 2012-09-21 23:59 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-09-21 23:59:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 84618 0 None None None 2012-08-27 18:01:24 UTC

Description IBM Bug Proxy 2012-08-27 18:01:23 UTC
---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 07:33:36 UTC
should be fixed by

selinux-policy-3.10.0-148.fc17

Comment 2 IBM Bug Proxy 2012-09-06 21:00:29 UTC
------- Comment From rmarwah.com 2012-09-06 20:58 EDT-------
Thanks a lot for backporting and fixing the bug

Comment 3 Fedora Update System 2012-09-17 12:13:56 UTC
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-19 02:55:33 UTC
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 23:59:38 UTC
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.