RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1334756 - SELinux is preventing /usr/sbin/asterisk from 'name_connect' accesses on the tcp_socket port 5222
Summary: SELinux is preventing /usr/sbin/asterisk from 'name_connect' accesses on the ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.7
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-10 13:14 UTC by Patrick Laimbock
Modified: 2017-03-21 09:46 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-3.7.19-296.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 09:46:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0627 0 normal SHIPPED_LIVE selinux-policy bug fix update 2017-03-21 12:29:23 UTC

Description Patrick Laimbock 2016-05-10 13:14:45 UTC
Description of problem:
SELinux is preventing /usr/sbin/asterisk from 'name_connect' accesses on the tcp_socket port 5222

Version-Release number of selected component (if applicable):
selinux-policy-3.7.19-279.el6_7.9.noarch
selinux-policy-targeted-3.7.19-279.el6_7.9.noarch

How reproducible:
Configure Asterisk as an XMPP client of an XMPP server (Prosody in this case). When Asterisk tries to authenticate to the XMPP serer, the AVCs start to show up:

type=AVC msg=audit(1462870342.402:9362): avc:  denied  { name_connect } for  pid=12367 comm="asterisk" dest=5222 scontext=unconfined_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:jabber_client_port_t:s0 tclass=tcp_socket


Steps to Reproduce:
1. configure XMPP server (Prosody)
2. configure Asterisk as an XMPP client of the XMPP server
3. see AVCs when Asterisk tries the authenticate to the XMPP server

Actual results:
type=AVC msg=audit(1462870342.402:9362): avc:  denied  { name_connect } for  pid=12367 comm="asterisk" dest=5222 scontext=unconfined_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:jabber_client_port_t:s0 tclass=tcp_socket

With setenforce 0 authentication works fine.

Expected results:
No AVC and successful authentication.

Additional info:
This bug is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=740905 where it was fixed for Fedora. It seems this fix did not make it into the EL6 branch. I'm not sure about EL7. Please add the fix from bz740905 to EL6 and EL7 too.

FWIW XMPP uses the following ports:

5222 TCP     XMPP client connection (RFC 3920)        Official  
5223 TCP     XMPP client connection over SSL          Unofficial
5269 TCP     XMPP server connection (RFC 3920)        Official
5298 TCP UDP XMPP JEP-0174: Link-Local Messaging /    Official
             XEP-0174: Serverless Messaging
8010 TCP     XMPP File transfers                      Unofficial    

And BOSH (Jabber over HTTP) can use 80 & 443.

Comment 5 Patrick Laimbock 2016-11-01 13:34:40 UTC
@Lukas thanks for the fix for EL6. can you please confirm if this has been fixed for EL7 too?

Comment 9 errata-xmlrpc 2017-03-21 09:46:34 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://rhn.redhat.com/errata/RHBA-2017-0627.html


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