Bug 1460720 - SELinux is denying rpcbind from creating a direcory in /run
Summary: SELinux is denying rpcbind from creating a direcory in /run
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-12 13:47 UTC by Steve Dickson
Modified: 2017-07-25 21:22 UTC (History)
10 users (show)

Fixed In Version: selinux-policy-3.13.1-225.19.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-25 21:22:21 UTC


Attachments (Terms of Use)
output of "sudo grep -i avc /var/log/audit/audit.log | ausearch -i" (85.49 KB, text/x-vhdl)
2017-06-12 17:01 UTC, Francesco Simula
no flags Details

Description Steve Dickson 2017-06-12 13:47:49 UTC
Description of problem:
When /run/rpcbind does not exist when rpcbind starts, it
will use the following command to create the directory:

/usr/bin/systemd-tmpfiles --create rpcbind.conf


SELinux is denying it:

audit[3813]: AVC avc:  denied  { execute } for  pid=3813 comm="sh" name="systemd-tmpfiles" dev="dm-1" ino=33591631 scontext=system_u:system_r:rpcbind_t:s0 tcontext=system_u:object_r:systemd_tmpfiles_exec_t:s0 tclass=file permissive=0

audit[3813]: AVC avc:  denied  { getattr } for  pid=3813 comm="sh" path="/usr/bin/systemd-tmpfiles" dev="dm-1" ino=33591631 scontext=system_u:system_r:rpcbind_t:s0 tcontext=system_u:object_r:systemd_tmpfiles_exec_t:s0 tclass=file permissive=0

audit[3813]: AVC avc:  denied  { getattr } for  pid=3813 comm="sh" path="/usr/bin/systemd-tmpfiles" dev="dm-1" ino=33591631 scontext=system_u:system_r:rpcbind_t:s0 tcontext=system_u:object_r:systemd_tmpfiles_exec_t:s0 tclass=file permissive=0


rpcbind[3812]: sh: /usr/bin/systemd-tmpfiles: Permission denied
rpcbind[3812]: rpcbind: /run/rpcbind/rpcbind.lock: No such file or directory
systemd[1]: rpcbind.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start RPC Bind.

Version-Release number of selected component (if applicable):


How reproducible:
%100

Steps to Reproduce:
1. enable SELinux 
2. Reboot.

Comment 1 Francesco Simula 2017-06-12 17:01:59 UTC
Created attachment 1287077 [details]
output of "sudo grep -i avc /var/log/audit/audit.log | ausearch -i"

I've attached the output of "sudo grep -i avc /var/log/audit/audit.log | ausearch -i", I hope it is enough to diagnose the problem.

I must add that other (identical, maybe a little fresher) installations here have accepted the update without problems, while other ones (like the one the output comes from) have not, so it must be something specific to the installation but I cannot fathom what...

Comment 2 Daniel Walsh 2017-06-12 20:15:09 UTC
Looks like we should just add
systemd_tmpfiles_exec(rpcbind_t)

Comment 3 Fedora Update System 2017-06-23 18:10:40 UTC
selinux-policy-3.13.1-225.19.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0187b2a605

Comment 4 Fedora Update System 2017-06-24 22:23:33 UTC
selinux-policy-3.13.1-225.19.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-0187b2a605

Comment 5 Fedora Update System 2017-07-25 21:22:21 UTC
selinux-policy-3.13.1-225.19.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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