Package:  libnss-ldapd
Version:  0.7.1
Severity: important

I backported nss-pam-ldapd version 0.7.1 to Lenny, and installed the
nslcd and libnss-ldapd (pam would not work without newer pam-runtime)
packages to see if I could get rid of a segfault in nscd.  To trigger
the problem, I try to log in using ssh.  I suspect the cause is the
huge amount of groups and the huge amount of group members we have
here at the university.  Upgrading did not solve the problem, so here
is the bug report.  The crash do not happen when using NIS instead of
LDAP, so I assume the bug is in libnss-ldapd.

I rebuilt the package using DEB_BUILD_OPTIONS=nostrip to get more
useful debug information, and then ran valgrind nscd -d to pinpoint
the crash.

This is the valgrind output when it crashes:

==9529==
==9529== Process terminating with default action of signal 11 (SIGSEGV)
==9529==  Bad permissions for mapped region at address 0xAEA0000
==9529==    at 0xB5CB663: read_group (group.c:43)
==9529==    by 0xB5CB9E3: _nss_ldap_getgrent_r (group.c:155)
==9529==    by 0xB5A54D0: getgrent_next_nss (compat-initgroups.c:324)
==9529==    by 0xB5A596E: _nss_compat_initgroups_dyn (compat-initgroups.c:430)
==9529==    by 0x1232C: addinitgroupsX (in /usr/sbin/nscd)
==9529==    by 0x12E0E: readdinitgroups (in /usr/sbin/nscd)
==9529==    by 0xF302: prune_cache (in /usr/sbin/nscd)
==9529==    by 0x756A: nscd_run (in /usr/sbin/nscd)
==9529==    by 0x4836F3A: start_thread (pthread_create.c:297)
==9529==    by 0x492ABED: clone (in /usr/lib/debug/libc-2.7.so)
==9529==
==9529== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 25 from 1)
==9529== malloc/free: in use at exit: 276,148 bytes in 16 blocks.
==9529== malloc/free: 17,708 allocs, 17,692 frees, 1,159,719,814 bytes 
allocated.
==9529== For counts of detected errors, rerun with: -v
==9529== searching for pointers to 16 not-freed blocks.
==9529== checked 8,918,640 bytes.
==9529==
==9529== LEAK SUMMARY:
==9529==    definitely lost: 136 bytes in 1 blocks.
==9529==      possibly lost: 952 bytes in 7 blocks.
==9529==    still reachable: 275,060 bytes in 8 blocks.
==9529==         suppressed: 0 bytes in 0 blocks.
==9529== Rerun with --leak-check=full to see details of leaked memory.
Killed

This is the content of /etc/nsswitch.conf:

%grep -v '#' /etc/nsswitch.conf |grep -v '^$'
passwd:        compat
passwd_compat: ldap
shadow:        compat
shadow_compat: ldap
group:         compat
group_compat:  ldap
hosts:      files dns
netgroup:   ldap
services:   files
networks:   ldap [NOTFOUND=continue] files
protocols:  files
rpc:        files
ethers:     files
netmasks:   ldap [NOTFOUND=continue] files
bootparams: ldap [NOTFOUND=continue] files
publickey:  ldap [NOTFOUND=continue] files
automount:  ldap
%

Changing the group entry to 'files ldap' avoid the crash, but will not
work for me as we use +...@netgroup entries in /etc/group and
/etc/passwd.

I am using nscd version 2.7-18.

-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=no_NO (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages libnss-ldapd depends on:
ii  debconf [debconf-2.0]         1.5.24     Debian configuration management sy
ii  libc6                         2.7-18     GNU C Library: Shared libraries
ii  nslcd                         0.7.1      Daemon for NSS and PAM lookups usi

Versions of packages libnss-ldapd recommends:
ii  libpam-ldap                   184-4.2    Pluggable Authentication Module fo

libnss-ldapd suggests no packages.

-- debconf information:
* libnss-ldapd/ldap-base: cn=system,dc=uio,dc=no
* libnss-ldapd/nsswitch: netgroup, networks, netmasks, bootparams, publickey, 
automount
* libnss-ldapd/ldap-binddn:
* libnss-ldapd/ldap-uris: ldap://ldap-prod01.uio.no/
  libnss-ldapd/clean_nsswitch: false
  libnss-ldapd/ldap-rootbinddn:



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to