Bug 1412456

Summary: rpcbind should be allowed to create directory /run/rpcbind
Product: [Fedora] Fedora Reporter: Edgar Hoch <edgar.hoch>
Component: selinux-policy-targetedAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED EOL QA Contact: Ben Levenson <benl>
Severity: high Docs Contact:
Priority: unspecified    
Version: 34CC: bcodding, dwalsh, yoyang
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-07 23:03:35 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:

Description Edgar Hoch 2017-01-12 04:43:19 UTC
Description of problem:

rpcbind cannot create /run/rpcbind because selinux denies it.

This error occurs on Fedora 24, but not on Fedora 25.

systemd[1]: Starting RPC Bind...

audit[29058]: AVC avc:  denied  { create } for  pid=29058 comm="rpcbind" name="rpcbind" scontext=system_u:system_r:rpcbind_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=dir permissive

rpcbind[29058]: mkdir_warmstart: mkdir failed '/run/rpcbind', errno 13 (Permission denied)

SELinux is preventing rpcbind from create access on the directory rpcbind.

Raw Audit Messages
type=AVC msg=audit(1484195544.21:5344): avc:  denied  { create } for  pid=29058 comm="rpcbind" name="rpcbind" scontext=system_u:system_r:rpcbind_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=dir permissive=0


Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-191.23.fc24.noarch
selinux-policy-targeted-3.13.1-191.23.fc24.noarch

How reproducible:
Always

Comment 1 Fedora End Of Life 2017-07-26 00:10:59 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 '24'.

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 24 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 2 Fedora End Of Life 2017-08-08 19:33:45 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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.

Comment 3 Benjamin Coddington 2021-10-08 14:21:10 UTC
Indeed this is still the case, re-opening this bug:

If you remove /run/rpcbind, then the rpcbind service fails to start with selinux enabled.  We've received a report that a tmpfs-mounted /run creates these conditions on boot.

It appears that we need something like:
#============= rpcbind_t ==============
allow rpcbind_t init_t:file { getattr ioctl open read };
allow rpcbind_t rpcbind_var_run_t:dir { relabelfrom relabelto };
allow rpcbind_t self:capability { fowner fsetid };
allow rpcbind_t tmpfs_t:filesystem getattr;

With selinux disabled, rpcbind is able to create its working directory.

Comment 4 Ben Cotton 2022-05-12 16:06:10 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
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
'version' of '34'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Ben Cotton 2022-06-07 23:03:35 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 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.

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