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 1260536 - AVC is triggered when accessing ganglia web UI
Summary: AVC is triggered when accessing ganglia web UI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-07 08:13 UTC by Milos Malik
Modified: 2016-11-04 02:21 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-82.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1219900
Environment:
Last Closed: 2016-11-04 02:21:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2283 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2016-11-03 13:36:25 UTC

Description Milos Malik 2015-09-07 08:13:49 UTC
Description:
 * when the httpd_can_network_connect boolean is disabled, even more AVCs are triggered, but I believe that the boolean should be enabled in this case

NVRs:
ganglia-3.7.1-3.el7.x86_64
ganglia-gmetad-3.7.1-3.el7.x86_64
ganglia-gmond-3.7.1-3.el7.x86_64
ganglia-web-3.7.0-3.el7.x86_64
selinux-policy-3.13.1-46.el7.noarch
selinux-policy-devel-3.13.1-46.el7.noarch
selinux-policy-doc-3.13.1-46.el7.noarch
selinux-policy-minimum-3.13.1-46.el7.noarch
selinux-policy-mls-3.13.1-46.el7.noarch
selinux-policy-sandbox-3.13.1-46.el7.noarch
selinux-policy-targeted-3.13.1-46.el7.noarch

Steps to Reproduce:
# yum -y install ganglia-gmond ganglia-gmetad ganglia-web
# service gmond start
# service gmetad start
# service httpd start
# links http://localhost/ganglia

Actual results (enforcing mode):
----
type=PATH msg=audit(09/07/2015 09:55:18.265:274) : item=0 name=/var/lib/ganglia/dwoo/compiled/./ inode=21826000 dev=fd:02 mode=dir,755 ouid=apache ogid=apache rdev=00:00 obj=system_u:object_r:var_lib_t:s0 objtype=NORMAL 
type=CWD msg=audit(09/07/2015 09:55:18.265:274) :  cwd=/usr/share/ganglia 
type=SYSCALL msg=audit(09/07/2015 09:55:18.265:274) : arch=x86_64 syscall=chmod success=no exit=-13(Permission denied) a0=0x7f63e0f05f10 a1=0777 a2=0x7f63dcc79b40 a3=0x7f63dcc4ff30 items=1 ppid=5565 pid=5569 auid=unset uid=apache gid=apache euid=apache suid=apache fsuid=apache egid=apache sgid=apache fsgid=apache tty=(none) ses=unset comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null) 
type=AVC msg=audit(09/07/2015 09:55:18.265:274) : avc:  denied  { setattr } for  pid=5569 comm=httpd name=compiled dev="vda2" ino=21826000 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir 
----

Expected results:
 * no AVCs

Additional information:
 * http://maciek.lasyk.info/sysop/2013/09/29/selinux-ganglia-multicast-apache-rrds/

Comment 1 Milos Malik 2015-09-07 08:22:32 UTC
Following AVC appears in permissive mode:
----
type=PATH msg=audit(09/07/2015 10:17:21.215:363) : item=0 name=/var/lib/ganglia/dwoo/compiled/./ inode=21826000 dev=fd:02 mode=dir,777 ouid=apache ogid=apache rdev=00:00 obj=system_u:object_r:var_lib_t:s0 objtype=NORMAL 
type=CWD msg=audit(09/07/2015 10:17:21.215:363) :  cwd=/usr/share/ganglia 
type=SYSCALL msg=audit(09/07/2015 10:17:21.215:363) : arch=x86_64 syscall=chmod success=yes exit=0 a0=0x7f94ca8aae60 a1=0777 a2=0x7f94c6a20b40 a3=0x7f94c69f6f30 items=1 ppid=7141 pid=7150 auid=unset uid=apache gid=apache euid=apache suid=apache fsuid=apache egid=apache sgid=apache fsgid=apache tty=(none) ses=unset comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null) 
type=AVC msg=audit(09/07/2015 10:17:21.215:363) : avc:  denied  { setattr } for  pid=7150 comm=httpd name=compiled dev="vda2" ino=21826000 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir 
----

# ls -aRZ /var/lib/ganglia/dwoo/
/var/lib/ganglia/dwoo/:
drwxr-xr-x. apache apache system_u:object_r:var_lib_t:s0   .
drwxr-xr-x. root   root   system_u:object_r:var_lib_t:s0   ..
drwxr-xr-x. apache apache system_u:object_r:var_lib_t:s0   cache
drwxrwxrwx. apache apache system_u:object_r:var_lib_t:s0   compiled

/var/lib/ganglia/dwoo/cache:
drwxr-xr-x. apache apache system_u:object_r:var_lib_t:s0   .
drwxr-xr-x. apache apache system_u:object_r:var_lib_t:s0   ..

/var/lib/ganglia/dwoo/compiled:
drwxrwxrwx. apache apache system_u:object_r:var_lib_t:s0   .
drwxr-xr-x. apache apache system_u:object_r:var_lib_t:s0   ..
-rw-r--r--. apache apache system_u:object_r:httpd_var_lib_t:s0 classpath.cache.d17.php
drwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 templates

/var/lib/ganglia/dwoo/compiled/templates:
drwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 .
drwxrwxrwx. apache apache system_u:object_r:var_lib_t:s0   ..
drwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 default

/var/lib/ganglia/dwoo/compiled/templates/default:
drwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 .
drwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 ..
-rwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 cluster_extra.tpl.d17.php
-rwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 cluster_host_metric_graphs.tpl.d17.php
-rwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 cluster_overview.tpl.d17.php
-rwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 cluster_view.tpl.d17.php
-rwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 footer.tpl.d17.php
-rwxrwxrwx. apache apache system_u:object_r:httpd_var_lib_t:s0 header.tpl.d17.php
# 

restorecon -Rv /var/lib/ganglia restores labels to var_lib_t, which is incorrect in my opinion.

Comment 8 errata-xmlrpc 2016-11-04 02:21:58 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://rhn.redhat.com/errata/RHBA-2016-2283.html


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