Bug 1461141

Summary: SELinux is preventing /usr/libexec/qemu-kvm from 'search' accesses on the directory 7030.
Product: Red Hat Enterprise Linux 7 Reporter: David Jaša <djasa>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED WONTFIX QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde, zpytela
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: abrt_hash:ac5aced226284807ae00be0ef04b455bfc345d60d51ecdac4c6ed889c6986b96
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-27 15:04:04 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 David Jaša 2017-06-13 15:47:49 UTC
Description of problem:
I got this AVC when running a VM in user session of qemu-kvm that worked for me for a long time. The only difference is update to selinux-policy:
selinux-policy-targeted-3.13.1-151.el7.noarch -> -161

and qemu-kvm-rhev (using 2.9.0 instead of 2.6.0)
SELinux is preventing /usr/libexec/qemu-kvm from 'search' accesses on the directory 7030.

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

If you believe that qemu-kvm should be allowed search access on the 7030 directory 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-kvm' --raw | audit2allow -M my-qemukvm
# semodule -i my-qemukvm.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:svirt_t:s0:c214,c588
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                7030 [ dir ]
Source                        qemu-kvm
Source Path                   /usr/libexec/qemu-kvm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-kvm-rhev-2.9.0-9.el7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-161.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.0-679.el7.x86_64 #1 SMP Mon
                              Jun 5 23:13:08 EDT 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-06-13 17:43:04 CEST
Last Seen                     2017-06-13 17:43:04 CEST
Local ID                      663854ca-def6-476c-8459-b648e92f79ce

Raw Audit Messages
type=AVC msg=audit(1497368584.348:793): avc:  denied  { search } for  pid=7326 comm="qemu-kvm" name="7030" dev="proc" ino=212909 scontext=unconfined_u:unconfined_r:svirt_t:s0:c214,c588 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=dir


type=SYSCALL msg=audit(1497368584.348:793): arch=x86_64 syscall=open success=no exit=EACCES a0=55f54467e100 a1=0 a2=7ffec94369b0 a3=0 items=0 ppid=1 pid=7326 auid=16189 uid=16189 gid=16189 euid=16189 suid=16189 fsuid=16189 egid=16189 sgid=16189 fsgid=16189 tty=(none) ses=1 comm=qemu-kvm exe=/usr/libexec/qemu-kvm subj=unconfined_u:unconfined_r:svirt_t:s0:c214,c588 key=(null)

Hash: qemu-kvm,svirt_t,unconfined_t,dir,search

Version-Release number of selected component:
selinux-policy-3.13.1-161.el7.noarch

Additional info:
reporter:       libreport-2.1.11.1
hashmarkername: setroubleshoot
kernel:         3.10.0-679.el7.x86_64
reproducible:   Not sure how to reproduce the problem
type:           libreport

Comment 5 Zdenek Pytela 2019-02-27 15:04:04 UTC
This issue was not selected to be included in Red Hat Enterprise Linux 7.7 because it is seen either as low or moderate impact to a small number of use-cases. The next release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available.

We will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise, we recommend moving the request to Red Hat Enterprise Linux 8 if applicable.