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 1377644 - Missing type enforcement (TE) allow rule.
Summary: Missing type enforcement (TE) allow rule.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.8
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-20 09:26 UTC by Mikash Haria
Modified: 2017-03-21 09:47 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-3.7.19-294.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 09:47:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
output of selinux denials (68.96 KB, text/x-vhdl)
2016-09-20 09:32 UTC, Mikash Haria
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0627 0 normal SHIPPED_LIVE selinux-policy bug fix update 2017-03-21 12:29:23 UTC

Description Mikash Haria 2016-09-20 09:26:22 UTC
type=AVC msg=audit(1474362891.573:639): avc:  denied  { write } for  pid=3594 comm="phantomjs" path="[eventfd]" dev=anon_inodefs ino=3841 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:anon_inodefs_t:s0 tclass=file
        Was caused by:
                Missing type enforcement (TE) allow rule.

                You can use audit2allow to generate a loadable module to allow this access.

Comment 2 Milos Malik 2016-09-20 09:30:17 UTC
Could you provide a complete list of SELinux denials?

# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today

Comment 3 Mikash Haria 2016-09-20 09:32:58 UTC
Created attachment 1202800 [details]
output of selinux denials

Comment 4 Milos Malik 2016-09-20 09:50:48 UTC
Based on SELinux denials in the attachment, I can identify several problems on your machine:

* there are mislabeled files in /root/.ssh directory
# restorecon -Rv /root/.ssh

* Apache cannot connect to MySQL database
# setsebool -P httpd_can_network_connect_db on

* phantomjs would like to set resource limits
# setsebool -P httpd_setrlimit on

* there is a process called wkhtmltopdf which would like to call mmap() 
# setsebool -P httpd_execmem on # be careful here!!!

and of course following allow rule is missing in the policy:

allow httpd_t anon_inodefs_t : file { write }

Comment 5 Mikash Haria 2016-09-20 10:17:21 UTC
thank you.
i will execute the above and test.

Comment 11 errata-xmlrpc 2017-03-21 09:47:44 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-2017-0627.html


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