Bug 1242323 - SELinux is preventing /usr/libexec/mysqld from 'name_connect' accesses on the tcp_socket port 443.
Summary: SELinux is preventing /usr/libexec/mysqld from 'name_connect' accesses on the...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: x86_64
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-07-13 04:39 UTC by Patrick Sefton
Modified: 2015-07-13 07:51 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-07-13 07:51:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Patrick Sefton 2015-07-13 04:39:54 UTC
Description of problem:
Periodically after installation of Fedora 21, alerted via SELinux Alert Browser / Troubleshooter
SELinux is preventing /usr/libexec/mysqld from 'name_connect' accesses on the tcp_socket port 443.

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

If you want to allow system to run with NIS
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 mysqld to connect to all ports
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                   /usr/libexec/mysqld
Port                          443
Host                          (removed)
Source RPM Packages           mariadb-server-10.0.20-1.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-105.13.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.0.7-200.fc21.x86_64 #1 SMP Mon
                              Jun 29 22:11:52 UTC 2015 x86_64 x86_64
Alert Count                   5
First Seen                    2015-07-13 14:33:08 AEST
Last Seen                     2015-07-13 14:36:09 AEST
Local ID                      9cd03940-e6ad-447e-a2d7-b0ba8f59d31a

Raw Audit Messages
type=AVC msg=audit(1436762169.508:50918): avc:  denied  { name_connect } for  pid=14711 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


type=SYSCALL msg=audit(1436762169.508:50918): arch=x86_64 syscall=connect success=no exit=EACCES a0=0 a1=7f25a40527f0 a2=1c a3=10 items=0 ppid=14544 pid=14711 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm=mysqld exe=/usr/libexec/mysqld subj=system_u:system_r:mysqld_t:s0 key=(null)

Hash: mysqld,mysqld_t,http_port_t,tcp_socket,name_connect

Version-Release number of selected component:
selinux-policy-3.13.1-105.13.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         4.0.7-200.fc21.x86_64
type:           libreport

Potential duplicate: bug 1235852

Comment 1 Lukas Vrabec 2015-07-13 07:51:19 UTC
*****  Plugin catchall_boolean (47.5 confidence) suggests   ******************

If you want to allow mysqld to connect to all ports
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


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