Bug 1460720

Summary: SELinux is denying rpcbind from creating a direcory in /run
Product: [Fedora] Fedora Reporter: Steve Dickson <steved>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: dominick.grift, dwalsh, francesco.simula, lvrabec, mbayer, mgrepl, plautrba, pmoore, rstonehouse, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-225.19.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-25 21:22:21 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
output of "sudo grep -i avc /var/log/audit/audit.log | ausearch -i" none

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.