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.
SELinux is denying tomcat from connecting to MySQL or MariaDB on port 3306, with the following AVC denial in the audit log:
type=AVC msg=audit(1505399902.845:357696): avc: denied { name_connect } for pid=1168 comm="java" dest=3306 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:mysqld_port_t:s0 tclass=tcp_socket
This worked without issue previously. This is likely the same problem as https://bugzilla.redhat.com/show_bug.cgi?id=1484572 , which reported this for MSSQL, but I'm not sure if that bug's fix will cover this, so I'm reporting here. Feel free to close this as a duplicate if appropriate.
Version of the SELinux policy RPMs is 3.13.1-166.el7_4.4
Cross-filed ticket 01972611 at the Red Hat customer portal.
I also requested there that this gets fixed at latest (!) for RHEL 7.5,
because this is a regression introduced by making Tomcat a confined domain.
Further, I am not sure in which release notes this incompatible change was
documented, just found a knowledgebase article so far.
Hi All,
Seriously starting from 7.5.
In my opinion it shall be fixed still in 7.4.
The amount of bugzillas open for it shall increase severity to make it fix in 7.4, doesn't it ?
What is planned date of release of 7.5 ?
Hi,
I see support for mssql has been already rolled out in selinux-policy-3.13.1-166.el7_4.7: I can see this in policy-rhel-7.4.z-contrib.patch:
@@ -82,6 +85,7 @@ corenet_tcp_connect_amqp_port(tomcat_domain)
corenet_tcp_connect_oracle_port(tomcat_domain)
corenet_tcp_connect_ibm_dt_2_port(tomcat_domain)
corenet_tcp_connect_unreserved_ports(tomcat_domain)
+corenet_tcp_connect_mssql_port(tomcat_domain)
dev_read_rand(tomcat_domain)
dev_read_urand(tomcat_domain)
And this can be easily extended to also support mysqld_t:
@@ -82,6 +85,8 @@ corenet_tcp_connect_amqp_port(tomcat_domain)
corenet_tcp_connect_oracle_port(tomcat_domain)
corenet_tcp_connect_ibm_dt_2_port(tomcat_domain)
corenet_tcp_connect_unreserved_ports(tomcat_domain)
+corenet_tcp_connect_mssql_port(tomcat_domain)
+corenet_tcp_connect_mysqld_port(tomcat_domain)
dev_read_rand(tomcat_domain)
dev_read_urand(tomcat_domain)
Can we please have that out? I'd prefer to avoid rolling out custom policies that permit tomcat_t to talk to mysqld_t (or have admins start saying: "Just disable SELinux"....)
Thanks a lot in advance!
Cheers,
Vlad
Rolling custom policies for something that should have worked out of the box in 7.4 are going to make peopl who are required to stay on minor versions very unhappy.
Can we get this in a zstream?
Best,
Skip
Rolling custom policies for something that should have worked out of the box in 7.4 are going to make people who are required to stay on minor versions very unhappy.
Can we get this in a zstream?
Best,
Skip
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://access.redhat.com/errata/RHBA-2018:0763
SELinux is denying tomcat from connecting to MySQL or MariaDB on port 3306, with the following AVC denial in the audit log: type=AVC msg=audit(1505399902.845:357696): avc: denied { name_connect } for pid=1168 comm="java" dest=3306 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:mysqld_port_t:s0 tclass=tcp_socket This worked without issue previously. This is likely the same problem as https://bugzilla.redhat.com/show_bug.cgi?id=1484572 , which reported this for MSSQL, but I'm not sure if that bug's fix will cover this, so I'm reporting here. Feel free to close this as a duplicate if appropriate. Version of the SELinux policy RPMs is 3.13.1-166.el7_4.4