Bug 521916

Summary: setroubleshoot: SELinux is preventing qemu-kvm "write" access on /var/lib/libvirt/qemu.
Product: [Fedora] Fedora Reporter: Matěj Cepl <mcepl>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dwalsh, jkubin, mcepl, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:05886bfd4da965ccb0665712a0412bb12a01da65e0b4da350c4827c1f2de87a2
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-08 23:23:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matěj Cepl 2009-09-08 17:32:07 UTC
The following was filed automatically by setroubleshoot:

Souhrn:

SELinux is preventing qemu-kvm "write" access on /var/lib/libvirt/qemu.

Podrobný popis:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by qemu-kvm. It is not expected that this access
is required by qemu-kvm and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

Povolení přístupu:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug
report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.

Další informace:

Kontext zdroje                system_u:system_r:svirt_t:s0:c41,c313
Kontext cíle                 system_u:object_r:virt_var_lib_t:s0
Objekty cíle                 /var/lib/libvirt/qemu [ dir ]
Zdroj                         qemu-kvm
Cesta zdroje                  /usr/bin/qemu-kvm
Port                          <Neznámé>
Počítač                    (removed)
RPM balíčky zdroje          qemu-system-x86-0.10.91-0.9.rc1.fc12
RPM balíčky cíle           libvirt-0.7.1-0.1.git3ef2e05.fc12
RPM politiky                  selinux-policy-3.6.30-4.fc12
Selinux povolen               True
Typ politiky                  targeted
MLS povoleno                  True
Vynucovací režim            Permissive
Název zásuvného modulu     catchall
Název počítače            (removed)
Platforma                     Linux (removed) 2.6.31-0.204.rc9.fc12.x86_64 #1 SMP
                              Sat Sep 5 20:45:55 EDT 2009 x86_64 x86_64
Počet upozornění           3
Poprvé viděno               Út 8. září 2009, 17:12:36 CEST
Naposledy viděno             Út 8. září 2009, 17:12:36 CEST
Místní ID                   52fdf509-1895-40b7-ae33-c2ea554d5e7f
Čísla řádků              

Původní zprávy auditu      

node=(removed) type=AVC msg=audit(1252422756.686:195): avc:  denied  { write } for  pid=13657 comm="qemu-kvm" name="qemu" dev=dm-1 ino=75599 scontext=system_u:system_r:svirt_t:s0:c41,c313 tcontext=system_u:object_r:virt_var_lib_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1252422756.686:195): avc:  denied  { add_name } for  pid=13657 comm="qemu-kvm" name="tikanga.monitor" scontext=system_u:system_r:svirt_t:s0:c41,c313 tcontext=system_u:object_r:virt_var_lib_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1252422756.686:195): avc:  denied  { create } for  pid=13657 comm="qemu-kvm" name="tikanga.monitor" scontext=system_u:system_r:svirt_t:s0:c41,c313 tcontext=system_u:object_r:virt_var_lib_t:s0:c41,c313 tclass=sock_file

node=(removed) type=SYSCALL msg=audit(1252422756.686:195): arch=c000003e syscall=49 success=yes exit=0 a0=9 a1=7fffe9efec80 a2=6e a3=7fffe9efe9f0 items=0 ppid=1 pid=13657 auid=500 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 tty=(none) ses=1 comm="qemu-kvm" exe="/usr/bin/qemu-kvm" subj=system_u:system_r:svirt_t:s0:c41,c313 key=(null)


audit2allow suggests:

#============= svirt_t ==============
allow svirt_t virt_var_lib_t:dir { write add_name };
allow svirt_t virt_var_lib_t:sock_file create;

Comment 1 Daniel Walsh 2009-09-08 23:23:47 UTC
Fixed in selinux-policy-3.6.30-6.fc12.noarch

Comment 2 Daniel Walsh 2009-09-08 23:24:13 UTC
*** Bug 521917 has been marked as a duplicate of this bug. ***