Bug 1055175

Summary: SELinux is preventing /usr/bin/qemu-system-x86_64 from 'write' accesses on the blk_file /dev/dm-5.
Product: [Fedora] Fedora Reporter: Mateusz Marzantowicz <mmarzantowicz>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:f0b116cd8f80d6eaa8698dce7da02155b9ad4334ca6066136cd357621818c9d6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-19 19:56:14 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 Mateusz Marzantowicz 2014-01-19 11:52:36 UTC
Description of problem:
It happened after updating selinux-policy-targeted to selinux-policy-targeted-3.12.1-117.fc20.noarch.
SELinux is preventing /usr/bin/qemu-system-x86_64 from 'write' accesses on the blk_file /dev/dm-5.

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

If aby qemu-system-x86_64 powinno mieć domyślnie write dostęp do dm-5 blk_file.
Then proszę to zgłosić jako błąd.
Można utworzyć lokalny moduł polityki, aby umożliwić ten dostęp.
Do
można tymczasowo zezwolić na ten dostęp wykonując polecenia:
# grep qemu:Web /var/log/audit/audit.log | audit2allow -M mojapolityka
# semodule -i mojapolityka.pp

Additional Information:
Source Context                system_u:system_r:svirt_t:s0:c386,c867
Target Context                system_u:object_r:fixed_disk_device_t:s0
Target Objects                /dev/dm-5 [ blk_file ]
Source                        qemu:Web
Source Path                   /usr/bin/qemu-system-x86_64
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-1.6.1-3.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-117.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.12.7-300.fc20.x86_64 #1 SMP Fri
                              Jan 10 15:35:31 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-01-19 12:45:25 CET
Last Seen                     2014-01-19 12:45:25 CET
Local ID                      ad1d911e-40ff-43ba-b0f8-bf9793fb36b7

Raw Audit Messages
type=AVC msg=audit(1390131925.63:2493): avc:  denied  { write } for  pid=23865 comm="qemu:Web" path="/dev/dm-5" dev="devtmpfs" ino=14703 scontext=system_u:system_r:svirt_t:s0:c386,c867 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file


type=SYSCALL msg=audit(1390131925.63:2493): arch=x86_64 syscall=pwritev success=yes exit=8192 a0=10 a1=7f4d634b1e28 a2=2 a3=894e5000 items=0 ppid=1 pid=23865 auid=4294967295 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 ses=4294967295 tty=(none) comm=qemu:Web exe=/usr/bin/qemu-system-x86_64 subj=system_u:system_r:svirt_t:s0:c386,c867 key=(null)

Hash: qemu:Web,svirt_t,fixed_disk_device_t,blk_file,write

Additional info:
reporter:       libreport-2.1.11
hashmarkername: setroubleshoot
kernel:         3.12.7-300.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-01-19 19:56:14 UTC

*** This bug has been marked as a duplicate of bug 1055168 ***