Bug 1060802

Summary: SELinux is preventing /usr/lib64/erlang/erts-5.10.4/bin/beam from 'name_connect' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: Daniel Ashton <jdashton>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:3f8b777cf6eb8af475950dfa0114d609c4371c0b098b0a07d171fbf5df9fa954
Fixed In Version: selinux-policy-3.12.1-127.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-12 12:17:46 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 Daniel Ashton 2014-02-03 16:28:23 UTC
Description of problem:
Attempted to start RabbitMQ service
SELinux is preventing /usr/lib64/erlang/erts-5.10.4/bin/beam from 'name_connect' accesses on the tcp_socket .

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

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

Additional Information:
Source Context                system_u:system_r:rabbitmq_beam_t:s0
Target Context                system_u:object_r:amqp_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        beam
Source Path                   /usr/lib64/erlang/erts-5.10.4/bin/beam
Port                          5672
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-119.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.8-300.fc20.x86_64 #1 SMP Thu
                              Jan 16 01:07:50 UTC 2014 x86_64 x86_64
Alert Count                   1859
First Seen                    2014-01-28 11:21:17 EST
Last Seen                     2014-02-03 10:36:57 EST
Local ID                      bcb7aa5e-a785-489b-9a10-62c8701100ef

Raw Audit Messages
type=AVC msg=audit(1391441817.62:1281): avc:  denied  { name_connect } for  pid=8102 comm="beam.smp" dest=5672 scontext=system_u:system_r:rabbitmq_beam_t:s0 tcontext=system_u:object_r:amqp_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1391441817.62:1281): arch=x86_64 syscall=connect success=no exit=EACCES a0=1b a1=7f81290039d0 a2=10 a3=1 items=0 ppid=7918 pid=8102 auid=4294967295 uid=986 gid=983 euid=986 suid=986 fsuid=986 egid=983 sgid=983 fsgid=983 ses=4294967295 tty=(none) comm=beam.smp exe=2F7573722F6C696236342F65726C616E672F657274732D352E31302E342F62696E2F6265616D2E736D70202864656C6574656429 subj=system_u:system_r:rabbitmq_beam_t:s0 key=(null)

Hash: beam,rabbitmq_beam_t,amqp_port_t,tcp_socket,name_connect

Additional info:
reporter:       libreport-2.1.11
hashmarkername: setroubleshoot
kernel:         3.12.9-301.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-02-04 10:09:58 UTC
*** Bug 1060848 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2014-02-04 10:14:05 UTC
commit ca1df633bc49e569975eca5cf9b39b800c18c577
Author: Miroslav Grepl <mgrepl>
Date:   Tue Feb 4 11:13:34 2014 +0100

    Allow beam.smp connect to amqp port

Comment 3 Fedora Update System 2014-02-18 22:09:29 UTC
selinux-policy-3.12.1-126.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-126.fc20

Comment 4 Fedora Update System 2014-02-22 00:41:39 UTC
Package selinux-policy-3.12.1-126.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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.12.1-126.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2801/selinux-policy-3.12.1-126.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-02-26 13:49:26 UTC
Package selinux-policy-3.12.1-127.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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.12.1-127.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2801/selinux-policy-3.12.1-127.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-03-12 12:17:46 UTC
selinux-policy-3.12.1-127.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.