Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1379355

Summary: AVC denials when running mysqld resource agent
Product: Red Hat Enterprise Linux 7 Reporter: michal novacek <mnovacek>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-26 16:46:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description michal novacek 2016-09-26 12:47:48 UTC
Info: Searching AVC errors produced since 1474888913.07 (Mon Sep 26 13:21:53 2016)
Searching logs...
Running '/usr/bin/env LC_ALL=en_US.UTF-8 /sbin/ausearch -m AVC -m USER_AVC -m SELINUX_ERR -ts 09/26/2016 13:21:53 < /dev/null >/mnt/testarea/tmp.rhts-db-submit-result.XWhogw 2>&1'
----
time->Mon Sep 26 13:28:31 2016
type=SYSCALL msg=audit(1474889311.733:299): arch=c000003e syscall=2 success=yes exit=16 a0=7f8ac6af75a0 a1=241 a2=1b4 a3=8 items=0 ppid=28193 pid=28432 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="mysqld" exe="/usr/libexec/mysqld" subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(1474889311.733:299): avc:  denied  { write } for  pid=28432 comm="mysqld" path="/run/mysql/mysqld.pid" dev="tmpfs" ino=66712 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file
type=AVC msg=audit(1474889311.733:299): avc:  denied  { create } for  pid=28432 comm="mysqld" name="mysqld.pid" scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file
type=AVC msg=audit(1474889311.733:299): avc:  denied  { add_name } for  pid=28432 comm="mysqld" name="mysqld.pid" scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir
type=AVC msg=audit(1474889311.733:299): avc:  denied  { write } for  pid=28432 comm="mysqld" name="mysql" dev="tmpfs" ino=66078 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir
----
time->Mon Sep 26 13:28:50 2016
type=SYSCALL msg=audit(1474889330.002:336): arch=c000003e syscall=87 success=yes exit=0 a0=7f8ac6af75a0 a1=0 a2=7f8ac6af75a0 a3=7f8ac843acec items=0 ppid=28193 pid=28893 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="mysqld" exe="/usr/libexec/mysqld" subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(1474889330.002:336): avc:  denied  { unlink } for  pid=28893 comm="mysqld" name="mysqld.pid" dev="tmpfs" ino=66712 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file
type=AVC msg=audit(1474889330.002:336): avc:  denied  { remove_name } for  pid=28893 comm="mysqld" name="mysqld.pid" dev="tmpfs" ino=66712 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir
type=AVC msg=audit(1474889330.002:336): avc:  denied  { write } for  pid=28893 comm="mysqld" name="mysql" dev="tmpfs" ino=66078 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir
----
time->Mon Sep 26 13:28:59 2016
type=SYSCALL msg=audit(1474889339.680:360): arch=c000003e syscall=2 success=yes exit=16 a0=7fa5ae4b15a0 a1=241 a2=1b4 a3=8 items=0 ppid=29125 pid=29353 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="mysqld" exe="/usr/libexec/mysqld" subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(1474889339.680:360): avc:  denied  { write } for  pid=29353 comm="mysqld" path="/run/mysql/mysqld.pid" dev="tmpfs" ino=70489 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file
type=AVC msg=audit(1474889339.680:360): avc:  denied  { create } for  pid=29353 comm="mysqld" name="mysqld.pid" scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file
type=AVC msg=audit(1474889339.680:360): avc:  denied  { add_name } for  pid=29353 comm="mysqld" name="mysqld.pid" scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir
type=AVC msg=audit(1474889339.680:360): avc:  denied  { write } for  pid=29353 comm="mysqld" name="mysql" dev="tmpfs" ino=66078 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir
----
time->Mon Sep 26 13:29:16 2016
type=SYSCALL msg=audit(1474889356.451:389): arch=c000003e syscall=87 success=yes exit=0 a0=7fa5ae4b15a0 a1=0 a2=7fa5ae4b15a0 a3=7fa5afd7acec items=0 ppid=29125 pid=29774 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="mysqld" exe="/usr/libexec/mysqld" subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(1474889356.451:389): avc:  denied  { unlink } for  pid=29774 comm="mysqld" name="mysqld.pid" dev="tmpfs" ino=70489 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file
type=AVC msg=audit(1474889356.451:389): avc:  denied  { remove_name } for  pid=29774 comm="mysqld" name="mysqld.pid" dev="tmpfs" ino=70489 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir
type=AVC msg=audit(1474889356.451:389): avc:  denied  { write } for  pid=29774 comm="mysqld" name="mysql" dev="tmpfs" ino=66078 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir
Fail: AVC messages found.
Checking for errors...
Using stronger AVC checks.
	Define empty RHTS_OPTION_STRONGER_AVC parameter if this causes any problems.
Running 'cat /mnt/testarea/tmp.rhts-db-submit-result.XWhogw | /sbin/ausearch -m AVC -m SELINUX_ERR'
Fail: AVC messages found.
Running 'cat %s | /sbin/ausearch -m USER_AVC >/mnt/testarea/tmp.rhts-db-submit-result.FczMb1 2>&1'
Info: No AVC messages found.
/bin/grep 'avc: ' /mnt/testarea/dmesg.log | /bin/grep --invert-match TESTOUT.log
No AVC messages found in dmesg
Running '/usr/sbin/sestatus'
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          permissive
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28
Running 'rpm -q selinux-policy || true'
selinux-policy-3.13.1-100.el7.noarch

Comment 1 Milos Malik 2016-09-26 13:19:45 UTC
I believe this bug is duplicate of BZ#1377383.

Comment 3 Lukas Vrabec 2016-09-26 16:46:39 UTC

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