Previously, an SELinux allow rule for the Apache Tomcat servlet container was missing, and SELinux prevented Tomcat from connecting to Microsoft SQL Server on port 1433. This rule has been added to the selinux-policy packages, and Tomcat is now able to connect to Microsoft SQL Server.
SELinux is denying tomcat from connecting to Microsoft SQL Server on port 1433, with the following AVC denial in /var/log/audit.log
type=AVC msg=audit(1503434074.102:50305): avc: denied { name_connect } for pid=4488 comm="java" dest=1433 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:mssql_port_t:s0 tclass=tcp_socket
This worked without issue in previous versions of the targeted policy.
Version-Release number of selected component (if applicable):
- selinux-policy-targeted-3.13.1-166.el7.noarch
- RHEL 7.4
How reproducible:
Always
Steps to Reproduce:
1. Create a new RHEL 7.4 machine
2. yum install tomcat; systemctl start tomcat.service
3. Install a tomcat application that will connect to an existing MS SQL server.
Actual results:
AVC denial
Expected results:
A successful connection, like previous versions of the policy.
Hello,
This bug report indicates that this issue is resolved in version 3.13.1-174.el7 but the latest version I see available is 3.13.1-166.el7_4.4.
Is there an ETA on the release of the fixed version?
Thank you,
Justin
This bug will be fixed as soon as RHEL-7.5 becomes generally available. If you need the fix sooner, please provide a business justification or propose this bug for z-stream.
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 Microsoft SQL Server on port 1433, with the following AVC denial in /var/log/audit.log type=AVC msg=audit(1503434074.102:50305): avc: denied { name_connect } for pid=4488 comm="java" dest=1433 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:mssql_port_t:s0 tclass=tcp_socket This worked without issue in previous versions of the targeted policy. Version-Release number of selected component (if applicable): - selinux-policy-targeted-3.13.1-166.el7.noarch - RHEL 7.4 How reproducible: Always Steps to Reproduce: 1. Create a new RHEL 7.4 machine 2. yum install tomcat; systemctl start tomcat.service 3. Install a tomcat application that will connect to an existing MS SQL server. Actual results: AVC denial Expected results: A successful connection, like previous versions of the policy.