Bug 1484572

Summary: SELinux denies name_connect to mssql_port_t for tomcat_t
Product: Red Hat Enterprise Linux 7 Reporter: David Mulford <dmulford>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact: Mirek Jahoda <mjahoda>
Priority: high    
Version: 7.4CC: angystardust, cisley, lvrabec, mgrepl, mjahoda, mmalik, mthacker, Petaris, plautrba, pvrabec, ranshac2, rbost, ssekidde, toneata, troels, zpytela
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-174.el7 Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
: 1500697 (view as bug list) Environment:
Last Closed: 2018-04-10 12:38:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1500697    

Description David Mulford 2017-08-23 21:51:20 UTC
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.

Comment 10 Petaris 2017-10-10 15:25:00 UTC
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

Comment 11 Milos Malik 2017-10-10 15:41:02 UTC
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.

Comment 22 errata-xmlrpc 2018-04-10 12:38:21 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://access.redhat.com/errata/RHBA-2018:0763