Bug 1087175

Summary: SELinux is preventing /usr/lib64/erlang/erts-5.10.4/bin/beam.smp from 'name_connect' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: Erik Pearson <erik>
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:a67e31a413f897a81ee7e8e1861591fddf3650a23bc1fb49c129a1918e28f47c
Fixed In Version: selinux-policy-3.12.1-158.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-01 22:29:01 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 Erik Pearson 2014-04-14 05:55:25 UTC
Description of problem:
I'm not quite sure what operation initiated this, since I saw the notification after working with couchdb for an extended session. However, in general I had just installed couchdb, just enabled and started it for the first time, and proceeded to replicate several databases into it. I don't know exactly what cased this problem. I did follow the solution suggested and as far as I can tell couchdb is operating normally.
SELinux is preventing /usr/lib64/erlang/erts-5.10.4/bin/beam.smp from 'name_connect' accesses on the tcp_socket .

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow nis to enabled
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 (11.6 confidence) suggests   **************************

If you believe that beam.smp 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.smp /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:http_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        beam.smp
Source Path                   /usr/lib64/erlang/erts-5.10.4/bin/beam.smp
Port                          80
Host                          (removed)
Source RPM Packages           erlang-erts-R16B-03.1.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-149.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.13.9-200.fc20.x86_64 #1 SMP Fri
                              Apr 4 12:13:05 UTC 2014 x86_64 x86_64
Alert Count                   21
First Seen                    2014-04-13 18:54:22 PDT
Last Seen                     2014-04-13 18:59:03 PDT
Local ID                      e25fd544-a80a-497e-9112-ed41af901cdd

Raw Audit Messages
type=AVC msg=audit(1397440743.495:845): avc:  denied  { name_connect } for  pid=12426 comm="beam.smp" dest=80 scontext=system_u:system_r:rabbitmq_beam_t:s0 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1397440743.495:845): arch=x86_64 syscall=connect success=no exit=EACCES a0=18 a1=7fea066054b8 a2=10 a3=1 items=0 ppid=1 pid=12426 auid=4294967295 uid=989 gid=986 euid=989 suid=989 fsuid=989 egid=986 sgid=986 fsgid=986 ses=4294967295 tty=(none) comm=beam.smp exe=/usr/lib64/erlang/erts-5.10.4/bin/beam.smp subj=system_u:system_r:rabbitmq_beam_t:s0 key=(null)

Hash: beam.smp,rabbitmq_beam_t,http_port_t,tcp_socket,name_connect

Additional info:
reporter:       libreport-2.2.1
hashmarkername: setroubleshoot
kernel:         3.13.9-200.fc20.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2014-04-14 09:37:55 UTC
commit b07e6b7c3b21e422ce9170d175545622874b7409
Author: Lukas Vrabec <lvrabec>
Date:   Mon Apr 14 11:35:48 2014 +0200

    Allow rabbitmq_beam to connect to httpd port

Comment 2 Fedora Update System 2014-04-25 12:43:26 UTC
selinux-policy-3.12.1-158.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-158.fc20

Comment 3 Fedora Update System 2014-04-26 09:24:05 UTC
Package selinux-policy-3.12.1-158.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-158.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5660/selinux-policy-3.12.1-158.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-05-01 22:29:01 UTC
selinux-policy-3.12.1-158.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.