RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1448799 - SELinux is preventing /usr/libexec/qemu-kvm from search access on process directory of sanlock daemon
Summary: SELinux is preventing /usr/libexec/qemu-kvm from search access on process dir...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.4
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-08 08:10 UTC by Han Han
Modified: 2018-10-30 10:01 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:00:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3111 0 None None None 2018-10-30 10:01:02 UTC

Description Han Han 2017-05-08 08:10:22 UTC
Description of problem:
As subject

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.9.0-3.el7.x86_64
libvirt-3.2.0-4.virtcov.el7.x86_64
sanlock-3.5.0-1.el7.x86_64
selinux-policy-3.13.1-147.el7.noarch

How reproducible:
50%

Steps to Reproduce:
1. Do as https://bugzilla.redhat.com/show_bug.cgi?id=1403691#c32 
When start the VM, sometimes you will get a selinux alert:
SELinux is preventing /usr/libexec/qemu-kvm from search access on the directory 15056.

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

If you believe that qemu-kvm should be allowed search access on the 15056 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                system_u:system_r:svirt_t:s0:c638,c927
Target Context                system_u:system_r:sanlock_t:s0-s0:c0.c1023
Target Objects                15056 [ dir ]
Source                        qemu-kvm
Source Path                   /usr/libexec/qemu-kvm
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           qemu-kvm-rhev-2.9.0-3.el7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-147.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     wlan-69-196.nay.redhat.com
Platform                      Linux wlan-69-196.nay.redhat.com
                              3.10.0-663.el7.x86_64 #1 SMP Tue May 2 16:00:29
                              EDT 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-05-08 15:19:20 CST
Last Seen                     2017-05-08 15:19:20 CST
Local ID                      2e2c7a0e-bd93-4489-958a-eedc74d69f23

Raw Audit Messages
type=AVC msg=audit(1494227960.386:3972): avc:  denied  { search } for  pid=7891 comm="qemu-kvm" name="15056" dev="proc" ino=8640215 scontext=system_u:system_r:svirt_t:s0:c638,c927 tcontext=system_u:system_r:sanlock_t:s0-s0:c0.c1023 tclass=dir


type=SYSCALL msg=audit(1494227960.386:3972): arch=x86_64 syscall=open success=no exit=EACCES a0=556549a9e620 a1=0 a2=7fffea39f110 a3=0 items=0 ppid=1 pid=7891 auid=4294967295 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 tty=(none) ses=4294967295 comm=qemu-kvm exe=/usr/libexec/qemu-kvm subj=system_u:system_r:svirt_t:s0:c638,c927 key=(null)

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


Actual results:
As above

Expected results:
Selinux allows qemu-kvm search access on process directory of sanlock daemon.

Additional info:

Comment 9 errata-xmlrpc 2018-10-30 10:00:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3111


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