Bug 860226 - SELinux is preventing /usr/sbin/nslcd from 'name_connect' accesses on the tcp_socket .
SELinux is preventing /usr/sbin/nslcd from 'name_connect' accesses on the tcp...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
i686 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:010536a214dc79dfb9ba41ec6b5...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-25 06:37 EDT by Sergey
Modified: 2012-12-20 10:03 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 10:03:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-09-25 06:37 EDT, Sergey
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-09-25 06:37 EDT, Sergey
no flags Details

  None (edit)
Description Sergey 2012-09-25 06:37:15 EDT
Additional info:
libreport version: 2.0.13
kernel:         3.5.3-1.fc17.i686

description:
:SELinux is preventing /usr/sbin/nslcd from 'name_connect' accesses on the tcp_socket .
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that nslcd should be allowed name_connect access on the  tcp_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:
:# grep nslcd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:nslcd_t:s0
:Target Context                system_u:object_r:ldap_port_t:s0
:Target Objects                 [ tcp_socket ]
:Source                        nslcd
:Source Path                   /usr/sbin/nslcd
:Port                          389
:Host                          (removed)
:Source RPM Packages           nss-pam-ldapd-0.7.16-2.fc17.i686
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-149.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.5.3-1.fc17.i686 #1 SMP Wed Aug
:                              29 19:25:38 UTC 2012 i686 i686
:Alert Count                   1
:First Seen                    2012-09-25 13:34:47 FET
:Last Seen                     2012-09-25 13:34:47 FET
:Local ID                      9c6b1bdd-8f61-4f86-a979-162cb0be388d
:
:Raw Audit Messages
:type=AVC msg=audit(1348569287.890:144): avc:  denied  { name_connect } for  pid=10543 comm="nslcd" dest=389 scontext=system_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:ldap_port_t:s0 tclass=tcp_socket
:
:
:type=SYSCALL msg=audit(1348569287.890:144): arch=i386 syscall=socketcall success=no exit=EINPROGRESS a0=3 a1=b566fce0 a2=b76fcff4 a3=0 items=0 ppid=1 pid=10543 auid=4294967295 uid=65 gid=55 euid=65 suid=65 fsuid=65 egid=55 sgid=55 fsgid=55 tty=(none) ses=4294967295 comm=nslcd exe=/usr/sbin/nslcd subj=system_u:system_r:nslcd_t:s0 key=(null)
:
:Hash: nslcd,nslcd_t,ldap_port_t,tcp_socket,name_connect
:
:audit2allow
:
:#============= nslcd_t ==============
:#!!!! This avc can be allowed using one of the these booleans:
:#     authlogin_nsswitch_use_ldap, allow_ypbind
:
:allow nslcd_t ldap_port_t:tcp_socket name_connect;
:
:audit2allow -R
:
:#============= nslcd_t ==============
:#!!!! This avc can be allowed using one of the these booleans:
:#     authlogin_nsswitch_use_ldap, allow_ypbind
:
:allow nslcd_t ldap_port_t:tcp_socket name_connect;
:
Comment 1 Sergey 2012-09-25 06:37:18 EDT
Created attachment 616958 [details]
File: type
Comment 2 Sergey 2012-09-25 06:37:20 EDT
Created attachment 616959 [details]
File: hashmarkername
Comment 3 Daniel Walsh 2012-09-25 14:54:41 EDT
I see this allowed in selinux-policy-3.10.0-150.fc17
Comment 4 Fedora Update System 2012-10-08 10:06:07 EDT
selinux-policy-3.10.0-153.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-153.fc17
Comment 5 Fedora Update System 2012-10-08 17:57:10 EDT
Package selinux-policy-3.10.0-153.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-153.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-15652/selinux-policy-3.10.0-153.fc17
then log in and leave karma (feedback).
Comment 6 David Mansfield 2012-10-18 15:29:03 EDT
I have the same exact problem, and the update to selinux-policy-3.10.0-153.fc17.noarch did not fix it:

Here is relevant aureport:

1707. 10/18/2012 15:26:21 nslcd system_u:system_r:nslcd_t:s0 42 tcp_socket name_connect system_u:object_r:ldap_port_t:s0 denied 11939

I restarted nslcd daemon in case it matters, but did not reboot (shouldn't have to).
Comment 7 Miroslav Grepl 2012-10-19 05:26:52 EDT
Fixed.

commit c58b47335ab984dd47feeb0b67952b586a835d2c
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Fri Oct 19 11:26:25 2012 +0200

    Allow nslcd to connect to ldap port without boolean
Comment 9 Rob K 2012-10-25 01:44:00 EDT
Not fixed for me:

rpm -q selinux-policy
selinux-policy-3.10.0-156.fc17.noarch

Had to do policy tweak as per selinux-troubleshooter instructions to get this to work.
Comment 10 Rob K 2012-10-25 02:07:45 EDT
Woops. If anyone could remove the hostname from comment 8 that would be splendid.
Comment 11 Daniel Walsh 2012-10-25 14:12:40 EDT
I can make it private, not sure I can modify it.
Comment 12 Daniel Walsh 2012-10-25 14:13:19 EDT
Rob please show us the latest AVC messages.
Comment 13 Rob K 2012-10-25 20:21:26 EDT
Last AVC in the log before I tweaked policy:

type=SYSCALL msg=audit(1351136435.126:100): arch=c000003e syscall=42 success=no 
exit=-13 a0=b a1=7fcd2000a410 a2=1c a3=7fcd25345254 items=0 ppid=1 pid=1717 auid
=4294967295 uid=65 gid=55 euid=65 suid=65 fsuid=65 egid=55 sgid=55 fsgid=55 tty=
(none) ses=4294967295 comm="nslcd" exe="/usr/sbin/nslcd" subj=system_u:system_r:
nslcd_t:s0 key=(null)
type=AVC msg=audit(1351136435.126:101): avc:  denied  { name_connect } for  pid=
1717 comm="nslcd" dest=389 scontext=system_u:system_r:nslcd_t:s0 tcontext=system
_u:object_r:ldap_port_t:s0 tclass=tcp_socket
Comment 14 Rob K 2012-10-25 20:32:13 EDT
(In reply to comment #11)
> I can make it private, not sure I can modify it.

If you could make #8 private that would be great; but I can live otherwise.
Comment 15 Daniel Walsh 2012-10-26 14:37:05 EDT
Fixed in 3.10.0-157
Comment 16 Fedora Update System 2012-11-06 03:22:13 EST
selinux-policy-3.10.0-159.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-159.fc17
Comment 17 Fedora Update System 2012-11-07 21:04:33 EST
Package selinux-policy-3.10.0-159.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-159.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-17782/selinux-policy-3.10.0-159.fc17
then log in and leave karma (feedback).
Comment 18 Fedora Update System 2012-12-20 10:03:08 EST
selinux-policy-3.10.0-153.fc17 has been pushed to the Fedora 17 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.