Bug 740905 - 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: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:7fd3fc7084d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-23 17:58 UTC by eric@christensenplace.us
Modified: 2011-12-04 02:36 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.9.16-48.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-04 02:36:17 UTC


Attachments (Terms of Use)

Description eric@christensenplace.us 2011-09-23 17:58:14 UTC
SELinux is preventing /usr/sbin/asterisk from 'name_connect' accesses on the tcp_socket port 5222.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that asterisk should be allowed name_connect access on the port 5222 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 asterisk /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:asterisk_t:s0
Target Context                system_u:object_r:jabber_client_port_t:s0
Target Objects                port 5222 [ tcp_socket ]
Source                        asterisk
Source Path                   /usr/sbin/asterisk
Port                          5222
Host                          (removed)
Source RPM Packages           asterisk-1.8.5.0-1.fc15.2
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-38.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux localhost.localdomain 2.6.40.4-5.fc15.x86_64
                              #1 SMP Tue Aug 30 14:38:32 UTC 2011 x86_64 x86_64
Alert Count                   22984
First Seen                    Thu 22 Sep 2011 11:42:51 AM EDT
Last Seen                     Fri 23 Sep 2011 01:57:09 PM EDT
Local ID                      84d018e0-2934-42c6-8163-e5cc2728bee6

Raw Audit Messages
type=AVC msg=audit(1316800629.616:26899): avc:  denied  { name_connect } for  pid=5552 comm="asterisk" dest=5222 scontext=system_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:jabber_client_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1316800629.616:26899): arch=x86_64 syscall=connect success=no exit=EACCES a0=b a1=7f1190003640 a2=10 a3=1 items=0 ppid=1 pid=5552 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(removed) ses=4294967295 comm=asterisk exe=/usr/sbin/asterisk subj=system_u:system_r:asterisk_t:s0 key=(null)

Hash: asterisk,asterisk_t,jabber_client_port_t,tcp_socket,name_connect

audit2allow

#============= asterisk_t ==============
allow asterisk_t jabber_client_port_t:tcp_socket name_connect;

audit2allow -R

#============= asterisk_t ==============
allow asterisk_t jabber_client_port_t:tcp_socket name_connect;

Comment 1 eric@christensenplace.us 2011-09-23 18:03:31 UTC
This is because Asterisk now acts as a jabber client.

Comment 2 Miroslav Grepl 2011-09-26 09:44:22 UTC
Fixed in selinux-policy-3.9.16-41.fc15

Comment 3 Fedora Update System 2011-11-16 16:18:01 UTC
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15

Comment 4 Fedora Update System 2011-11-17 23:36:22 UTC
Package selinux-policy-3.9.16-48.fc15:
* should fix your issue,
* was pushed to the Fedora 15 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.9.16-48.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-12-04 02:36:17 UTC
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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