Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1508659 - SELinux is preventing ypbind from 'write' accesses on the sock_file rpcbind.sock.
Summary: SELinux is preventing ypbind from 'write' accesses on the sock_file rpcbind.s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:9e943165860987242cce2090627...
: 1498305 1508992 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-01 22:27 UTC by Craig Robson
Modified: 2018-01-02 16:49 UTC (History)
12 users (show)

Fixed In Version: selinux-policy-3.13.1-283.19.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-02 16:49:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Craig Robson 2017-11-01 22:27:06 UTC
Description of problem:
Attempting to start ypbind.
SELinux is preventing ypbind from 'write' accesses on the sock_file rpcbind.sock.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that ypbind should be allowed write access on the rpcbind.sock sock_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'ypbind' --raw | audit2allow -M my-ypbind
# semodule -X 300 -i my-ypbind.pp

Additional Information:
Source Context                system_u:system_r:ypbind_t:s0
Target Context                system_u:object_r:rpcbind_var_run_t:s0
Target Objects                rpcbind.sock [ sock_file ]
Source                        ypbind
Source Path                   ypbind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.10.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.13.8-300.fc27.x86_64 #1 SMP Wed
                              Oct 18 15:32:19 UTC 2017 x86_64 x86_64
Alert Count                   7
First Seen                    2017-10-23 13:04:15 PDT
Last Seen                     2017-10-23 13:04:15 PDT
Local ID                      62174613-448b-479f-bac6-c094bfd14db9

Raw Audit Messages
type=AVC msg=audit(1508789055.832:354): avc:  denied  { write } for  pid=9716 comm="ypbind" name="rpcbind.sock" dev="tmpfs" ino=15299 scontext=system_u:system_r:ypbind_t:s0 tcontext=system_u:object_r:rpcbind_var_run_t:s0 tclass=sock_file permissive=0


Hash: ypbind,ypbind_t,rpcbind_var_run_t,sock_file,write

Version-Release number of selected component:
selinux-policy-3.13.1-283.10.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.2
hashmarkername: setroubleshoot
kernel:         4.13.9-300.fc27.x86_64
type:           libreport

Comment 1 Michael J. Chudobiak 2017-11-27 14:29:39 UTC
See also bug 1508992.

Comment 2 Lukas Vrabec 2017-12-11 16:21:10 UTC
*** Bug 1508992 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Update System 2017-12-13 08:28:48 UTC
selinux-policy-3.13.1-283.18.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502

Comment 4 Fedora Update System 2017-12-14 11:13:17 UTC
selinux-policy-3.13.1-283.18.fc27 has been pushed to the Fedora 27 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-8225c4e502

Comment 5 Thomas Sailer 2017-12-14 17:47:16 UTC
selinux-policy-targeted-3.13.1-283.18.fc27.noarch does not seem to work for me, I still get:

type=AVC msg=audit(1513272922.865:370): avc:  denied  { write } for  pid=3124 comm="ypbind" name="rpcbind.sock" dev="tmpfs" ino=1904 scontext=system_u:system_r:ypbind_t:s0 tcontext=system_u:object_r:rpcbind_var_run_t:s0 tclass=sock_file permissive=0


#============= ypbind_t ==============
allow ypbind_t rpcbind_var_run_t:sock_file write;

Comment 6 Petr Kubat 2017-12-15 07:51:08 UTC
*** Bug 1498305 has been marked as a duplicate of this bug. ***

Comment 7 Lukas Vrabec 2017-12-18 08:45:47 UTC
Thoms, 

You're right, I forgot to push it to F27. Will be fixed in next update. Sorry for that.

Comment 9 Fedora Update System 2017-12-20 11:26:37 UTC
selinux-policy-3.13.1-283.19.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502

Comment 10 Eric 2017-12-20 19:47:06 UTC
selinux-policy-3.13.1-283.19.fc27 still does not work for me on two machines.

Dec 20 11:45:21 box setroubleshoot[3441]: failed to retrieve rpm info for /run/rpcbind.sock
Dec 20 11:45:22 box setroubleshoot[3441]: SELinux is preventing ypbind from connectto access on the unix_stream_socket /run/rpcbind.sock. For complete SELinux messages run: sealert -l 55305654-835a-432c-8c46-bacaf230a389
Dec 20 11:45:22 box python3[3441]: SELinux is preventing ypbind from connectto access on the unix_stream_socket /run/rpcbind.sock.
                                     
                                     *****  Plugin catchall_boolean (89.3 confidence) suggests   ******************
                                     
                                     If you want to allow daemons to enable cluster mode
                                     Then you must tell SELinux about this by enabling the 'daemons_enable_cluster_mode' boolean.
                                     
                                     Do
                                     setsebool -P daemons_enable_cluster_mode 1
                                     
                                     *****  Plugin catchall (11.6 confidence) suggests   **************************
                                     
                                     If you believe that ypbind should be allowed connectto access on the rpcbind.sock unix_stream_socket by default.
                                     Then you should report this as a bug.
                                     You can generate a local policy module to allow this access.
                                     Do
                                     allow this access for now by executing:
                                     # ausearch -c 'ypbind' --raw | audit2allow -M my-ypbind
                                     # semodule -X 300 -i my-ypbind.pp

Comment 11 Eric 2017-12-20 22:34:50 UTC
Correction: still broken on three out of three machines.

Comment 12 Francesco Simula 2017-12-21 17:20:18 UTC
(In reply to Fedora Update System from comment #9)
> selinux-policy-3.13.1-283.19.fc27 has been submitted as an update to Fedora
> 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502

I can confirm that selinux-policy-3.13.1-283.19.fc27 fixes the problem for me on the 3 boxes I tried it on.

Comment 13 Francesco Simula 2017-12-21 17:22:35 UTC
(In reply to Eric from comment #10)
> selinux-policy-3.13.1-283.19.fc27 still does not work for me on two machines.
> 
> Dec 20 11:45:21 box setroubleshoot[3441]: failed to retrieve rpm info for
> /run/rpcbind.sock
> Dec 20 11:45:22 box setroubleshoot[3441]: SELinux is preventing ypbind from
> connectto access on the unix_stream_socket /run/rpcbind.sock. For complete
> SELinux messages run: sealert -l 55305654-835a-432c-8c46-bacaf230a389
> Dec 20 11:45:22 box python3[3441]: SELinux is preventing ypbind from
> connectto access on the unix_stream_socket /run/rpcbind.sock.
>                                      
>                                      *****  Plugin catchall_boolean (89.3
> confidence) suggests   ******************
>                                      
>                                      If you want to allow daemons to enable
> cluster mode
>                                      Then you must tell SELinux about this
> by enabling the 'daemons_enable_cluster_mode' boolean.
>                                      
>                                      Do
>                                      setsebool -P
> daemons_enable_cluster_mode 1
>                                      
>                                      *****  Plugin catchall (11.6
> confidence) suggests   **************************
>                                      
>                                      If you believe that ypbind should be
> allowed connectto access on the rpcbind.sock unix_stream_socket by default.
>                                      Then you should report this as a bug.
>                                      You can generate a local policy module
> to allow this access.
>                                      Do
>                                      allow this access for now by executing:
>                                      # ausearch -c 'ypbind' --raw |
> audit2allow -M my-ypbind
>                                      # semodule -X 300 -i my-ypbind.pp

I had the same alert, which disappeared as soon as I issued "setsebool -P daemons_enable_cluster_mode 1" - can someone explain what "daemons_enable_cluster_mode" is about?

Comment 14 Fedora Update System 2017-12-21 20:22:18 UTC
selinux-policy-3.13.1-283.19.fc27 has been pushed to the Fedora 27 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-8225c4e502

Comment 15 Fedora Update System 2018-01-02 16:49:10 UTC
selinux-policy-3.13.1-283.19.fc27 has been pushed to the Fedora 27 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.