Bug 1177017

Summary: SELinux: rabbitmq-server hostname denials
Product: [Fedora] Fedora Reporter: Richard Su <rwsu>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.12.1-197.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-10 00:56:03 UTC Type: Bug
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
audit.log none

Description Richard Su 2014-12-23 19:45:10 UTC
Created attachment 972510 [details]
audit.log

Description of problem:
When rabbitmq-server is configured to use /usr/bin/hostname to help with creating the log filename, SELinux logs denials about rabbitmq-server and its use of /usr/bin/hostname. See https://github.com/openstack/tripleo-image-elements/commit/55f7d878ceb0ea31c5e4fec9774f3641192bb731

Version-Release number of selected component (if applicable):
rabbitmq-server-3.1.5-10.fc20.noarch
selinux-policy-targeted-3.12.1-196.fc20.noarch

How reproducible:
always

Steps to Reproduce:
1. Run tripleo devtest.sh

Actual results:
rabbitmq-server hostname denials logged.

Expected results:
No denials are logged.

Additional info:
type=AVC msg=audit(1418940397.390:238): avc:  denied  { getattr } for  pid=6365 comm="rabbitmq-server" path="/usr/bin/hostname" dev="sda2" ino=59613 scontext=system_u:system_r:rabbitmq_t:s0 tcontext=unconfined_u:object_r:hostname_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(1418940397.391:239): avc:  denied  { execute } for  pid=6365 comm="rabbitmq-server" name="hostname" dev="sda2" ino=59613 scontext=system_u:system_r:rabbitmq_t:s0 tcontext=unconfined_u:object_r:hostname_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(1418940397.394:240): avc:  denied  { read } for  pid=6365 comm="rabbitmq-server" name="hostname" dev="sda2" ino=59613 scontext=system_u:system_r:rabbitmq_t:s0 tcontext=unconfined_u:object_r:hostname_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(1418940397.394:241): avc:  denied  { open } for  pid=6366 comm="rabbitmq-server" path="/usr/bin/hostname" dev="sda2" ino=59613 scontext=system_u:system_r:rabbitmq_t:s0 tcontext=unconfined_u:object_r:hostname_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(1418940397.394:241): avc:  denied  { execute_no_trans } for  pid=6366 comm="rabbitmq-server" path="/usr/bin/hostname" dev="sda2" ino=59613 scontext=system_u:system_r:rabbitmq_t:s0 tcontext=unconfined_u:object_r:hostname_exec_t:s0 tclass=file permissive=1

Comment 1 Daniel Walsh 2015-01-02 12:24:22 UTC
727cc6ca10d479ea58fc287fb05e0890668bde0f fixes this in git

Comment 2 Lukas Vrabec 2015-01-15 14:42:27 UTC
commit f313800866dc9bfb1cd9968da834d3e7b815c5ff
Author: Dan Walsh <dwalsh>
Date:   Fri Jan 2 07:23:58 2015 -0500

    Allow rabbitmq_t to run hostname

Comment 3 Fedora Update System 2015-01-27 16:56:55 UTC
selinux-policy-3.12.1-197.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-197.fc20

Comment 4 Fedora Update System 2015-01-30 04:41:49 UTC
Package selinux-policy-3.12.1-197.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-197.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1398/selinux-policy-3.12.1-197.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2015-03-10 00:56:03 UTC
selinux-policy-3.12.1-197.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.