Bug 784367

Summary: selinux prevents zabbix from making ftp connections
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.10.0-75.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-02 17:25:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2012-01-24 17:38:26 UTC
Description of problem:

zabbix can be used to monitor ftp urls.  When I do so in enforcing it fails.  In permissive I see:

type=AVC msg=audit(1327426284.483:836): avc:  denied  { name_connect } for  pid=8670 comm="zabbix_server_m" dest=21 scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:object_r:ftp_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1327426284.521:837): avc:  denied  { name_connect } for  pid=8670 comm="zabbix_server_m" dest=8161 scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1327426344.992:843): avc:  denied  { name_connect } for  pid=8670 comm="zabbix_server_m" dest=58480 scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:object_r:ephemeral_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1327426404.357:867): avc:  denied  { name_connect } for  pid=8670 comm="zabbix_server_m" dest=21 scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:object_r:ftp_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1327426404.389:868): avc:  denied  { name_connect } for  pid=8670 comm="zabbix_server_m" dest=53568 scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:object_r:ephemeral_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1327426464.769:874): avc:  denied  { name_connect } for  pid=8670 comm="zabbix_server_m" dest=22522 scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1327426524.199:880): avc:  denied  { name_connect } for  pid=8670 comm="zabbix_server_m" dest=60616 scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:object_r:ephemeral_port_t:s0 tclass=tcp_socket

Version-Release number of selected component (if applicable):
selinux-policy-3.10.0-72.fc16.noarch

Comment 1 Miroslav Grepl 2012-01-24 23:34:33 UTC
We will need a boolean for this. But do you know which component of zabbix needs this access?

Comment 2 Orion Poplawski 2012-01-24 23:36:41 UTC
It's the server process that makes the connections if that's what you mean.

Comment 3 Miroslav Grepl 2012-01-25 07:26:57 UTC
I see from AVC

comm="zabbix_server_m"

Comment 4 Orion Poplawski 2012-01-25 13:45:00 UTC
/usr/sbin/zabbix_server_mysql

Comment 5 Daniel Walsh 2012-01-25 21:19:11 UTC
A boolean seems like a good idea.

Comment 6 Fedora Update System 2012-01-26 18:16:47 UTC
selinux-policy-3.10.0-74.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-74.fc16

Comment 7 Fedora Update System 2012-01-28 03:29:46 UTC
Package selinux-policy-3.10.0-74.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-74.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-0983/selinux-policy-3.10.0-74.fc16
then log in and leave karma (feedback).

Comment 8 Orion Poplawski 2012-01-30 16:18:31 UTC
With selinux-policy-3.10.0-74.fc16 and zabbix_can_network=on I'm still seeing:

type=AVC msg=audit(1327939960.125:306): avc:  denied  { name_connect } for  pid=1232 comm="zabbix_server_m" dest=21 scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:object_r:ftp_port_t:s0 tclass=tcp_socket

Comment 9 Miroslav Grepl 2012-01-30 16:54:41 UTC
Ah, you are right. I missed

type=AVC msg=audit(1327426404.357:867): avc:  denied  { name_connect } for 
pid=8670 comm="zabbix_server_m" dest=21 scontext=system_u:system_r:zabbix_t:s0
tcontext=system_u:object_r:ftp_port_t:s0 tclass=tcp_socket

Comment 10 Fedora Update System 2012-01-31 22:03:16 UTC
selinux-policy-3.10.0-74.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Miroslav Grepl 2012-02-01 09:36:21 UTC
Fixed in selinux-policy-3.10.0-75.fc16

Comment 12 Fedora Update System 2012-02-01 13:19:02 UTC
selinux-policy-3.10.0-75.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-75.fc16

Comment 13 Fedora Update System 2012-02-01 19:26:02 UTC
Package selinux-policy-3.10.0-75.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-75.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1133/selinux-policy-3.10.0-75.fc16
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2012-02-02 17:25:05 UTC
selinux-policy-3.10.0-75.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.