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 809746 - SELinux prevents heartbeat service from starting
Summary: SELinux prevents heartbeat service from starting
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.3
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-04 09:20 UTC by Milos Malik
Modified: 2012-10-16 12:04 UTC (History)
1 user (show)

Fixed In Version: selinux-policy-3.7.19-151.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 12:33:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
heartbeat AVCs in permissive (17.14 KB, text/plain)
2012-04-04 12:53 UTC, Milos Malik
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0780 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2012-06-19 20:34:59 UTC

Description Milos Malik 2012-04-04 09:20:45 UTC
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-doc-3.7.19-143.el6.noarch
selinux-policy-3.7.19-143.el6.noarch
selinux-policy-mls-3.7.19-143.el6.noarch
selinux-policy-minimum-3.7.19-143.el6.noarch
selinux-policy-targeted-3.7.19-143.el6.noarch
heartbeat-libs-3.0.4-1.el6.x86_64
heartbeat-3.0.4-1.el6.x86_64
clusterlib-3.1.3-1.el6.x86_64
cluster-glue-1.0.5-6.el6.x86_64
cluster-snmp-0.16.2-18.el6.x86_64
cluster-glue-libs-1.0.5-6.el6.x86_64

How reproducible:
always

Steps to Reproduce:
# yum -y -q install heartbeat cluster-glue
# cp /usr/share/doc/heartbeat-3.0.4/ha.cf /etc/ha.d/
# run_init service heartbeat start
Authenticating root.
Password: 
Starting High-Availability services:  Heartbeat failure [rc=1]. Failed.

heartbeat[24076]: 2012/04/04_11:14:22 WARN: glib: lt_dlopen() failure on plugin InterfaceMgr/generic [/usr/lib64/heartbeat/plugins/InterfaceMgr/generic.so]. Reason: [file not found]
heartbeat[24076]: 2012/04/04_11:14:22 ERROR: ERROR: cannot load generic interface manager plugin [InterfaceMgr/generic]: No such plugin/interface/interface type
heartbeat[24076]: 2012/04/04_11:14:22 ERROR: Heartbeat not started: module init error.
# ausearch -m avc -m user_avc -m selinux_err -ts recent

Actual results:
----
time->Wed Apr  4 11:14:17 2012
type=SYSCALL msg=audit(1333530857.588:2601): arch=c000003e syscall=9 success=no exit=-13 a0=0 a1=202370 a2=5 a3=802 items=0 ppid=24015 pid=24022 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=147 comm="heartbeat" exe="/usr/lib64/heartbeat/heartbeat" subj=system_u:system_r:corosync_t:s0 key=(null)
type=AVC msg=audit(1333530857.588:2601): avc:  denied  { execute } for  pid=24022 comm="heartbeat" path="/usr/lib64/heartbeat/plugins/InterfaceMgr/generic.so" dev=sda3 ino=6425707 scontext=system_u:system_r:corosync_t:s0 tcontext=system_u:object_r:corosync_var_lib_t:s0 tclass=file
----

Expected results:
* no AVCs

Comment 2 Milos Malik 2012-04-04 09:30:00 UTC
Following AVCs appeared in permissive mode after "run_init service heartbeat status":
----
time->Wed Apr  4 11:26:06 2012
type=SYSCALL msg=audit(1333531566.913:2617): arch=c000003e syscall=9 success=yes exit=140055973367808 a0=0 a1=202370 a2=5 a3=802 items=0 ppid=24190 pid=24197 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=147 comm="heartbeat" exe="/usr/lib64/heartbeat/heartbeat" subj=system_u:system_r:corosync_t:s0 key=(null)
type=AVC msg=audit(1333531566.913:2617): avc:  denied  { execute } for  pid=24197 comm="heartbeat" path="/usr/lib64/heartbeat/plugins/InterfaceMgr/generic.so" dev=sda3 ino=6431361 scontext=system_u:system_r:corosync_t:s0 tcontext=system_u:object_r:corosync_var_lib_t:s0 tclass=file
----
time->Wed Apr  4 11:26:06 2012
type=SYSCALL msg=audit(1333531566.913:2618): arch=c000003e syscall=29 success=yes exit=1114117 a0=0 a1=1460 a2=180 a3=7fff3478ccd0 items=0 ppid=24190 pid=24197 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=147 comm="heartbeat" exe="/usr/lib64/heartbeat/heartbeat" subj=system_u:system_r:corosync_t:s0 key=(null)
type=AVC msg=audit(1333531566.913:2618): avc:  denied  { create } for  pid=24197 comm="heartbeat" key=0  scontext=system_u:system_r:corosync_t:s0 tcontext=system_u:system_r:corosync_t:s0 tclass=shm
----
time->Wed Apr  4 11:26:06 2012
type=SYSCALL msg=audit(1333531566.913:2619): arch=c000003e syscall=30 success=yes exit=140056016449536 a0=110005 a1=0 a2=0 a3=7fff3478ccd0 items=0 ppid=24190 pid=24197 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=147 comm="heartbeat" exe="/usr/lib64/heartbeat/heartbeat" subj=system_u:system_r:corosync_t:s0 key=(null)
type=AVC msg=audit(1333531566.913:2619): avc:  denied  { read write } for  pid=24197 comm="heartbeat" key=0  scontext=system_u:system_r:corosync_t:s0 tcontext=system_u:system_r:corosync_t:s0 tclass=shm
type=AVC msg=audit(1333531566.913:2619): avc:  denied  { unix_read unix_write } for  pid=24197 comm="heartbeat" key=0  scontext=system_u:system_r:corosync_t:s0 tcontext=system_u:system_r:corosync_t:s0 tclass=shm
----
time->Wed Apr  4 11:26:06 2012
type=SYSCALL msg=audit(1333531566.913:2620): arch=c000003e syscall=31 success=yes exit=0 a0=110005 a1=0 a2=0 a3=7fff3478ccd0 items=0 ppid=24190 pid=24197 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=147 comm="heartbeat" exe="/usr/lib64/heartbeat/heartbeat" subj=system_u:system_r:corosync_t:s0 key=(null)
type=AVC msg=audit(1333531566.913:2620): avc:  denied  { destroy } for  pid=24197 comm="heartbeat" key=0  scontext=system_u:system_r:corosync_t:s0 tcontext=system_u:system_r:corosync_t:s0 tclass=shm
----

Comment 3 Milos Malik 2012-04-04 09:41:10 UTC
Following AVCs appeared in permissive mode after "run_init service heartbeat start":
----
time->Wed Apr  4 11:29:27 2012
type=SYSCALL msg=audit(1333531767.827:2631): arch=c000003e syscall=2 success=yes exit=3 a0=7f40e62c7477 a1=0 a2=4 a3=7fff72fcf530 items=0 ppid=24482 pid=24483 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=147 comm="heartbeat" exe="/usr/lib64/heartbeat/heartbeat" subj=system_u:system_r:corosync_t:s0 key=(null)
type=AVC msg=audit(1333531767.827:2631): avc:  denied  { read } for  pid=24483 comm="heartbeat" scontext=system_u:system_r:corosync_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=file
type=AVC msg=audit(1333531767.827:2631): avc:  denied  { search } for  pid=24483 comm="heartbeat" scontext=system_u:system_r:corosync_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=dir
----

Comment 4 Miroslav Grepl 2012-04-04 11:46:08 UTC
Yes, we now treat this policy with corosync. I need to fix these.

Comment 5 Milos Malik 2012-04-04 12:53:29 UTC
Created attachment 575120 [details]
heartbeat AVCs in permissive

All these AVCs appeared in permissive mode when the automated test was running.

Comment 6 Miroslav Grepl 2012-04-05 15:02:48 UTC
Adde to Fedora. Backporting to RHEL6.3

Comment 8 Miroslav Grepl 2012-04-06 12:45:58 UTC
What is a patch to "ha-log"?

Try again with fifo_files. It should be ok.

Comment 13 Daniel Walsh 2012-04-10 18:57:37 UTC
We have 

/var/run/hearbeat(/.*)?             gen_context(system_u:object_r:corosync_var_run_t,s0)

So I guess we should have

/var/lib/heartbeat(/.*)?			gen_context(system_u:object_r:corosync_var_lib_t,s0)

Comment 14 Daniel Walsh 2012-04-10 18:59:16 UTC
I believe 5b32d445af1d3d1efe5bec8bf8129320ef330a50 fixes this problem.

Comment 27 errata-xmlrpc 2012-06-20 12:33:16 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.

http://rhn.redhat.com/errata/RHBA-2012-0780.html


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