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:


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.