Bug 1561755 - SELinux is preventing sh from 'connectto' accesses on the unix_stream_socket /var/lib/sss/pipes/nss.
Summary: SELinux is preventing sh from 'connectto' accesses on the unix_stream_socket ...
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:ae11f49b8cc613e556019c6c0f5...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-28 20:07 UTC by kristciko
Modified: 2018-04-01 20:13 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-283.30.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-01 20:13:59 UTC
Type: ---


Attachments (Terms of Use)

Description kristciko 2018-03-28 20:07:59 UTC
Description of problem:
I found this error when trying to connect via L2TP IPsec VPN.
SELinux is preventing sh from 'connectto' accesses on the unix_stream_socket /var/lib/sss/pipes/nss.

*****  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 sh should be allowed connectto access on the nss 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 'sh' --raw | audit2allow -M my-sh
# semodule -X 300 -i my-sh.pp

Additional Information:
Source Context                system_u:system_r:l2tpd_t:s0
Target Context                system_u:system_r:sssd_t:s0
Target Objects                /var/lib/sss/pipes/nss [ unix_stream_socket ]
Source                        sh
Source Path                   sh
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.28.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.15.10-300.fc27.x86_64 #1 SMP Thu
                              Mar 15 17:13:04 UTC 2018 x86_64 x86_64
Alert Count                   13
First Seen                    2018-03-28 22:05:33 CEST
Last Seen                     2018-03-28 22:05:44 CEST
Local ID                      5da57c0c-6734-48aa-b573-f7852749eb89

Raw Audit Messages
type=AVC msg=audit(1522267544.227:422): avc:  denied  { connectto } for  pid=8212 comm="sh" path="/var/lib/sss/pipes/nss" scontext=system_u:system_r:l2tpd_t:s0 tcontext=system_u:system_r:sssd_t:s0 tclass=unix_stream_socket permissive=0


Hash: sh,l2tpd_t,sssd_t,unix_stream_socket,connectto

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

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

Comment 1 Fedora Update System 2018-03-29 21:10:37 UTC
selinux-policy-3.13.1-283.30.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-b3791c3118

Comment 2 Fedora Update System 2018-03-30 14:48:10 UTC
selinux-policy-3.13.1-283.30.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-2018-b3791c3118

Comment 3 kristciko 2018-03-31 20:01:45 UTC
I got another error after installed test updates.

SELinux is preventing sh from getattr access on the file /var/lib/sss/mc/passwd.

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

If you believe that sh should be allowed getattr access on the passwd 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 'sh' --raw | audit2allow -M my-sh
# semodule -X 300 -i my-sh.pp


Additional Information:
Source Context                system_u:system_r:l2tpd_t:s0
Target Context                system_u:object_r:sssd_public_t:s0
Target Objects                /var/lib/sss/mc/passwd [ file ]
Source                        sh
Source Path                   sh
Port                          <Unknown>
Host                          T450
Source RPM Packages           
Target RPM Packages           sssd-common-1.16.1-1.fc27.x86_64
Policy RPM                    selinux-policy-3.13.1-283.30.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     T450
Platform                      Linux T450 4.15.13-300.fc27.x86_64 #1 SMP Mon Mar
                              26 19:06:57 UTC 2018 x86_64 x86_64
Alert Count                   182
First Seen                    2018-03-28 22:09:28 CEST
Last Seen                     2018-03-31 21:53:56 CEST
Local ID                      4b5a7f34-5668-45e8-9d73-639b875e02ff

Raw Audit Messages
type=AVC msg=audit(1522526036.766:262): avc:  denied  { getattr } for  pid=3647 comm="sh" path="/var/lib/sss/mc/passwd" dev="dm-0" ino=3147042 scontext=system_u:system_r:l2tpd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file permissive=0


Hash: sh,l2tpd_t,sssd_public_t,file,getattr

Comment 4 Fedora Update System 2018-04-01 20:13:59 UTC
selinux-policy-3.13.1-283.30.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.