Bug 1463697

Summary: SELinux is preventing qemu-system-x86 from using the 'execmem' accesses on a process.
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba, pmoore, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:ac65e9d2c4559f1e3eef8263e1e7beb1caf200884e2b1dbe0796fe79a6c8cc07;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-23 11:01:53 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 Joachim Frieben 2017-06-21 14:10:28 UTC
Description of problem:
SELinux is preventing qemu-system-x86 from using the 'execmem' accesses on a process.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow virt to use execmem
Then you must tell SELinux about this by enabling the 'virt_use_execmem' boolean.

Do
setsebool -P virt_use_execmem 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If you believe that qemu-system-x86 should be allowed execmem access on processes labeled svirt_t 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:
# ausearch -c 'qemu-system-x86' --raw | audit2allow -M my-qemusystemx86
# semodule -X 300 -i my-qemusystemx86.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:svirt_t:s0:c115,c493
Target Context                unconfined_u:unconfined_r:svirt_t:s0:c115,c493
Target Objects                Unknown [ process ]
Source                        qemu-system-x86
Source Path                   qemu-system-x86
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-257.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.11.6-300.fc26.x86_64 #1 SMP Mon
                              Jun 19 17:19:26 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-06-21 16:08:59 CEST
Last Seen                     2017-06-21 16:08:59 CEST
Local ID                      fe877ac1-3fc9-42c9-9c35-4a8381a994d8

Raw Audit Messages
type=AVC msg=audit(1498054139.187:341): avc:  denied  { execmem } for  pid=23216 comm="qemu-system-x86" scontext=unconfined_u:unconfined_r:svirt_t:s0:c115,c493 tcontext=unconfined_u:unconfined_r:svirt_t:s0:c115,c493 tclass=process permissive=0


Hash: qemu-system-x86,svirt_t,svirt_t,process,execmem

Version-Release number of selected component:
selinux-policy-3.13.1-257.fc26.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.6-300.fc26.x86_64
type:           libreport

Potential duplicate: bug 1159823