Bug 1307214 - SELinux is preventing /usr/bin/qemu-system-x86_64 from 'write' accesses on the fifo_file fifo_file.
SELinux is preventing /usr/bin/qemu-system-x86_64 from 'write' accesses on th...
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
24
x86_64 Unspecified
high Severity high
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:a33cfeb6f239cd38c3a62995f70...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-13 02:30 EST by Jakub Filak
Modified: 2016-11-30 19:42 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-10 03:37:20 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)

  None (edit)
Description Jakub Filak 2016-02-13 02:30:26 EST
Description of problem:
I started a second VM. This AVC cannot be easily reproduced. If I reboot and try to start two VMs, the AVC does not always appear.
SELinux is preventing /usr/bin/qemu-system-x86_64 from 'write' accesses on the fifo_file fifo_file.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that qemu-system-x86_64 should be allowed write access on the fifo_file fifo_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# 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:c180,c533
Target Context                system_u:system_r:virtd_t:s0-s0:c0.c1023
Target Objects                fifo_file [ fifo_file ]
Source                        qemu-system-x86
Source Path                   /usr/bin/qemu-system-x86_64
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-2.5.0-4.fc24.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-169.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.5.0-0.rc3.git1.2.fc24.x86_64 #1
                              SMP Tue Feb 9 22:52:55 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-02-13 07:59:28 CET
Last Seen                     2016-02-13 07:59:28 CET
Local ID                      12fa2153-31e7-4e35-9f20-d95abbf8d1c7

Raw Audit Messages
type=AVC msg=audit(1455346768.370:3398): avc:  denied  { write } for  pid=4311 comm="qemu-system-x86" path="pipe:[44408]" dev="pipefs" ino=44408 scontext=system_u:system_r:svirt_t:s0:c180,c533 tcontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tclass=fifo_file permissive=1


type=SYSCALL msg=audit(1455346768.370:3398): arch=x86_64 syscall=write success=yes exit=ENOSPC a0=2 a1=7ffd841cbbe0 a2=1c a3=1b items=0 ppid=1 pid=4311 auid=4294967295 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 tty=(none) ses=4294967295 comm=qemu-system-x86 exe=/usr/bin/qemu-system-x86_64 subj=system_u:system_r:svirt_t:s0:c180,c533 key=(null)

Hash: qemu-system-x86,svirt_t,virtd_t,fifo_file,write

Version-Release number of selected component:
selinux-policy-3.13.1-169.fc24.noarch

Additional info:
reporter:       libreport-2.6.4.2.g18a1
hashmarkername: setroubleshoot
kernel:         4.5.0-0.rc3.git1.2.fc24.x86_64
type:           libreport
Comment 1 Jakub Filak 2016-02-13 02:37:43 EST
I analyzed my system logs and I found out that the AVC appears when I run 'virsh destroy rhel6':

Feb 13 07:59:28 photon setroubleshoot[13678]: SELinux is preventing /usr/bin/qemu-system-x86_64 from write access on the fifo_file fifo_file. For complete SELinux message
Feb 13 07:59:28 photon audit[1488]: VIRT_CONTROL pid=1488 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm op=stop reason=
Feb 13 07:59:28 photon virtlogd[3444]: End of file while reading data: Input/output error
Feb 13 07:59:28 photon dbus[1287]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Feb 13 07:59:28 photon systemd-machined[3471]: Machine qemu-rhel6 terminated.
Comment 2 Jan Kurik 2016-02-24 10:47:15 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 3 Miroslav Grepl 2016-05-10 02:32:54 EDT
Jakub,
can you reproduce it? I am not able to reproduce it.
Comment 4 Jakub Filak 2016-05-10 03:37:20 EDT
I don't have a F24 box handy, I run Rawhide with KDE and the AVC was observerd on F24 with LXQt and I was able to reproduce it reliably there - why I mention DE, because destroying a VM using 'virsh destroy' provokes some Desktop action due to integration with systemd.

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