Bug 858794 - SELinux is preventing /usr/bin/qemu-system-x86_64 from write access on file created by gnome-boxes
Summary: SELinux is preventing /usr/bin/qemu-system-x86_64 from write access on file c...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-19 17:17 UTC by Paul Lange
Modified: 2012-09-20 10:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-20 10:36:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Paul Lange 2012-09-19 17:17:08 UTC
SELinux is preventing /usr/bin/qemu-system-x86_64 from write access on the file /home/paul/.libvirt/qemu/log/Fedora-18-Nightly-20120831.22-i686-Live-desktop.iso.log.

*****  Plugin restorecon (93.9 confidence) suggests  *************************

If sie möchten die Kennzeichnung korrigieren.
/home/paul/.libvirt/qemu/log/Fedora-18-Nightly-20120831.22-i686-Live-desktop.iso.log Standard-Kennzeichnung sollte svirt_home_t sein.
Then sie können restorecon ausführen.
Do
# /sbin/restorecon -v /home/paul/.libvirt/qemu/log/Fedora-18-Nightly-20120831.22-i686-Live-desktop.iso.log

*****  Plugin leaks (6.10 confidence) suggests  ******************************

If sie möchten den write Zugriff von qemu-system-x86_64,auf  Fedora-18-Nightly-20120831.22-i686-Live-desktop.iso.log file ignorieren, weil Sie glauben, dass dieser Zugriff nicht benötigt wird.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
# grep /usr/bin/qemu-system-x86_64 /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

*****  Plugin catchall (1.43 confidence) suggests  ***************************

If sie denken, dass qemu-system-x86_64 standardmässig erlaubt sein sollte, write Zugriff auf Fedora-18-Nightly-20120831.22-i686-Live-desktop.iso.log file zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# grep qemu-system-x86 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:svirt_t:s0:c647,c766
Target Context                unconfined_u:object_r:virt_home_t:s0
Target Objects                /home/paul/.libvirt/qemu/log/Fedora-18-Nightly-201
                              20831.22-i686-Live-desktop.iso.log [ file ]
Source                        qemu-system-x86
Source Path                   /usr/bin/qemu-system-x86_64
Port                          <Unbekannt>
Host                          laptop
Source RPM Packages           qemu-system-x86-1.0.1-1.fc17.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-146.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     laptop
Platform                      Linux laptop 3.5.3-1.fc17.i686 #1 SMP Wed Aug 29
                              19:25:38 UTC 2012 i686 i686
Alert Count                   1
First Seen                    2012-09-19 19:11:18 CEST
Last Seen                     2012-09-19 19:11:18 CEST
Local ID                      53248c86-0c3a-483a-8994-68fb0811bf79

Raw Audit Messages
type=AVC msg=audit(1348074678.648:80): avc:  denied  { write } for  pid=2117 comm="qemu-system-x86" path="/home/paul/.libvirt/qemu/log/Fedora-18-Nightly-20120831.22-i686-Live-desktop.iso.log" dev="dm-1" ino=1325418 scontext=system_u:system_r:svirt_t:s0:c647,c766 tcontext=unconfined_u:object_r:virt_home_t:s0 tclass=file


type=AVC msg=audit(1348074678.648:80): avc:  denied  { write } for  pid=2117 comm="qemu-system-x86" path="/home/paul/.libvirt/qemu/log/Fedora-18-Nightly-20120831.22-i686-Live-desktop.iso.log" dev="dm-1" ino=1325418 scontext=system_u:system_r:svirt_t:s0:c647,c766 tcontext=unconfined_u:object_r:virt_home_t:s0 tclass=file


type=SYSCALL msg=audit(1348074678.648:80): arch=i386 syscall=execve success=yes exit=0 a0=b1c00d38 a1=b1c019e0 a2=b1c00858 a3=0 items=0 ppid=1 pid=2117 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=qemu-system-x86 exe=/usr/bin/qemu-system-x86_64 subj=system_u:system_r:svirt_t:s0:c647,c766 key=(null)

Hash: qemu-system-x86,svirt_t,virt_home_t,file,write

audit2allow

#============= svirt_t ==============
allow svirt_t virt_home_t:file write;

audit2allow -R

#============= svirt_t ==============
allow svirt_t virt_home_t:file write;

Comment 1 Miroslav Grepl 2012-09-20 10:36:32 UTC
Please execute

# restorecon -R -v /home/paul/.libvirt


will fix this issue. Thank you.


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