Bug 993279

Summary: SELinux is preventing /usr/lib64/erlang/erts-5.10.1/bin/beam from 'name_bind' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: Raf Geens <rafgeens+redhatbugs>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:f8835a68006169ed188e0b7e879ede6cf496ad631330ae9890270c6f5f377640
Fixed In Version: selinux-policy-3.12.1-74.26.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-27 02:22:47 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:
Attachments:
Description Flags
File: rabbitmq-audit.log.tar.bz2 none

Description Raf Geens 2013-08-05 19:04:30 UTC
Description of problem:
1. Do a fresh DVD install, pick the Gnome desktop
2. yum update -y, reboot
3. yum install rabbitmq-server
4. systemctl start rabbitmq-server

A mass of name_bind avc denials is logged together with one name_connect denial. RabbitMQ fails to start. I've attached the full audit.log that's produced.
SELinux is preventing /usr/lib64/erlang/erts-5.10.1/bin/beam from 'name_bind' accesses on the tcp_socket .

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

If you believe that beam should be allowed name_bind 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:amanda_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        beam
Source Path                   /usr/lib64/erlang/erts-5.10.1/bin/beam
Port                          10083
Host                          (removed)
Source RPM Packages           erlang-erts-R16B-0.3.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-69.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.4-300.fc19.x86_64 #1 SMP Tue
                              Jul 30 11:29:05 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-08-05 20:31:44 CEST
Last Seen                     2013-08-05 20:31:44 CEST
Local ID                      86cbe682-d9ca-4fdf-857f-4f12c1f3d592

Raw Audit Messages
type=AVC msg=audit(1375727504.209:556): avc:  denied  { name_bind } for  pid=2178 comm="beam" src=10083 scontext=system_u:system_r:rabbitmq_beam_t:s0 tcontext=system_u:object_r:amanda_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1375727504.209:556): arch=x86_64 syscall=bind success=no exit=EACCES a0=d a1=7fff23c635c0 a2=1c a3=a items=0 ppid=1 pid=2178 auid=4294967295 uid=989 gid=988 euid=989 suid=989 fsuid=989 egid=988 sgid=988 fsgid=988 ses=4294967295 tty=(none) comm=beam exe=/usr/lib64/erlang/erts-5.10.1/bin/beam subj=system_u:system_r:rabbitmq_beam_t:s0 key=(null)

Hash: beam,rabbitmq_beam_t,amanda_port_t,tcp_socket,name_bind

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.4-300.fc19.x86_64
type:           libreport

Comment 1 Raf Geens 2013-08-05 19:04:34 UTC
Created attachment 782983 [details]
File: rabbitmq-audit.log.tar.bz2

Comment 2 Lukas Vrabec 2014-03-31 14:43:10 UTC
commit 553323dbc52396b74c01f1e48db86e592bd88c9c
Author: Lukas Vrabec <lvrabec>
Date:   Mon Mar 31 16:42:34 2014 +0200

    Allow rabbitmq to bind to amanda port

Comment 3 Fedora Update System 2014-05-07 16:25:31 UTC
selinux-policy-3.12.1-74.26.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-74.26.fc19

Comment 4 Fedora Update System 2014-05-08 09:59:03 UTC
Package selinux-policy-3.12.1-74.26.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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-74.26.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6075/selinux-policy-3.12.1-74.26.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-06-27 02:22:47 UTC
selinux-policy-3.12.1-74.26.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.