Bug 1261201 - SELinux is preventing mysqld from 'name_connect' accesses on the tcp_socket port 443.
Summary: SELinux is preventing mysqld from 'name_connect' accesses on the tcp_socket p...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 23
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f039d847f23b7a9210fab8ba113...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-08 21:42 UTC by Mikhail
Modified: 2015-09-11 13:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-11 13:08:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mikhail 2015-09-08 21:42:23 UTC
Description of problem:
SELinux is preventing mysqld from 'name_connect' accesses on the tcp_socket port 443.

*****  Plugin catchall_boolean (47.5 confidence) suggests   ******************

If you want to allow nis to enabled
Then you must tell SELinux about this by enabling the 'nis_enabled' boolean.
You can read 'None' man page for more details.
Do
setsebool -P nis_enabled 1

*****  Plugin catchall_boolean (47.5 confidence) suggests   ******************

If you want to allow mysql to connect any
Then you must tell SELinux about this by enabling the 'mysql_connect_any' boolean.
You can read 'None' man page for more details.
Do
setsebool -P mysql_connect_any 1

*****  Plugin catchall (6.38 confidence) suggests   **************************

If you believe that mysqld should be allowed name_connect access on the port 443 tcp_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep mysqld /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:mysqld_t:s0
Target Context                system_u:object_r:http_port_t:s0
Target Objects                port 443 [ tcp_socket ]
Source                        mysqld
Source Path                   mysqld
Port                          443
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-146.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.0-300.fc23.i686 #1 SMP Fri Sep
                              4 14:03:24 UTC 2015 i686 i686
Alert Count                   5
First Seen                    2015-09-09 02:39:14 YEKT
Last Seen                     2015-09-09 02:41:14 YEKT
Local ID                      bd6adc5d-efb0-4535-a64f-57b5ab554002

Raw Audit Messages
type=AVC msg=audit(1441748474.972:734): avc:  denied  { name_connect } for  pid=7038 comm="mysqld" dest=443 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket permissive=0


Hash: mysqld,mysqld_t,http_port_t,tcp_socket,name_connect

Version-Release number of selected component:
selinux-policy-3.13.1-146.fc23.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.0-300.fc23.i686
type:           libreport

Potential duplicate: bug 1235852

Comment 1 Miroslav Grepl 2015-09-11 13:08:01 UTC
You will need to run


If you want to allow mysql to connect any
Then you must tell SELinux about this by enabling the 'mysql_connect_any' boolean.
You can read 'None' man page for more details.
Do
setsebool -P mysql_connect_any 1


or add a local policy.


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