Bug 1393643 - ejabberd is not allowed to open tcp port 5349
Summary: ejabberd is not allowed to open tcp port 5349
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1393649
TreeView+ depends on / blocked
 
Reported: 2016-11-10 04:55 UTC by Randy Barlow
Modified: 2017-12-12 10:37 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:37:19 UTC
Type: Bug


Attachments (Terms of Use)

Description Randy Barlow 2016-11-10 04:55:33 UTC
Description of problem:
The ejabberd unit file currently launches it with /usr/bin/bash, which gets it the initrc_t context. I've been trying to get it to launch ejabberdctl directly to get a less permissive context, but I get an avc denial on trying to open port 5349 which is the port typically used for ejabberd's built-in STUN server.


Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-220.fc25.noarch


How reproducible:
Every time.


Steps to Reproduce:
1. Install ejabberd.
2. Edit the unit file and remove /usr/bin/bash from the ExecStart line.
3. Start ejabberd.


Actual results:
In the audit.log, you will see this:

type=AVC msg=audit(1478751171.865:650): avc:  denied  { name_bind } for  pid=2986 comm="beam" src=5349 scontext=system_u:system_r:rabbitmq_t:s0


Expected results:
ejabberd should be allowed to use that port.


Additional info:
I'm not really sure why ejabberd is being labelled with rabbitmq's context. That seems pretty weird to me. They do share two major similarities: they are both messaging servers written in Erlang, but in my opinion it might make sense for them to have different policies. However, I suppose that is outside of the scope of this ticket.

I discovered all of this while trying to sort out this ticket:

https://bugzilla.redhat.com/show_bug.cgi?id=1393587

Comment 1 Peter Lemenkov 2016-11-10 14:34:26 UTC
(In reply to Randy Barlow from comment #0)

> I'm not really sure why ejabberd is being labelled with rabbitmq's context.
> That seems pretty weird to me. They do share two major similarities: they
> are both messaging servers written in Erlang, but in my opinion it might
> make sense for them to have different policies. However, I suppose that is
> outside of the scope of this ticket.

I believe this/these rule(s) should be named more generic. Something which reflects that these rules are generic to all Erlang applications.

I remember there is another one set of rules, related to another Erlang-application, CouchDB. These all should be unified I suppose.

Comment 2 Fedora End Of Life 2017-11-16 19:44:17 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2017-12-12 10:37:19 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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