Issue 3874 - assertion failed in ber_sockbuf_ctrl when using referrals
Summary: assertion failed in ber_sockbuf_ctrl when using referrals
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-19 16:00 UTC by d.mierzejewski@icm.edu.pl
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description d.mierzejewski@icm.edu.pl 2005-07-19 16:00:40 UTC
Full_Name: Dominik Mierzejewski
Version: 2.2.23
OS: Fedora Core 4
URL: 
Submission from: (NULL) (212.87.0.39)


[root@lab ~]# id rathann
id: ../../../libraries/liblber/sockbuf.c:91: ber_sockbuf_ctrl: Assertion `(
(sb)->sb_opts.lbo_valid == 0x3 )' failed.
uid=5242(rathann) gid=100(users)Aborted

`getent passwd` and `getent group` work fine and return the combined list of
accounts (both from referred server and localhost).

However, if I switch to using only the main LDAP server (i.e. host fs.icm.edu.pl
in /etc/ldap.conf), id works fine:

[root@lab ~]# id rathann
uid=5242(rathann) gid=100(users)
groups=100(users),732(lanACL),734(bassetACL),702(backupACL)

I've found similar bugreports:
http://www.openldap.org/its/index.cgi/Software%20Bugs?id=3800
http://www.openldap.org/lists/openldap-devel/200207/msg00000.html
http://bugzilla.padl.com/show_bug.cgi?id=104
http://www.openldap.org/lists/openldap-software/200202/msg00338.html
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=124549
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=158351

Config files and gdb trace (may not be very useful, because I didn't recompile
with debugging) below. If there's any more information that you need to pin this
down, let me know.

[root@lab ~]# cat /etc/ldap.conf
host 127.0.0.1
base dc=icm,dc=edu,dc=pl
ldap_version 3
scope one
pam_filter objectclass=posixAccount
pam_login_attribute uid
pam_password crypt
nss_base_passwd         ou=People,dc=icm,dc=edu,dc=pl
nss_base_shadow         ou=People,dc=icm,dc=edu,dc=pl
nss_base_group          ou=Group,dc=icm,dc=edu,dc=pl
nss_base_passwd         ou=People,dc=lab,dc=icm,dc=edu,dc=pl
nss_base_shadow         ou=People,dc=lab,dc=icm,dc=edu,dc=pl
nss_base_group          ou=Group,dc=lab,dc=icm,dc=edu,dc=pl
ssl start_tls
tls_checkpeer no
ssl on
tls_cacertdir /etc/openldap/cacerts

[root@lab ~]# cat /etc/openldap/slapd.conf
include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/nis.schema

referral        ldaps://fs.icm.edu.pl

pidfile         /var/run/slapd.pid
argsfile        /var/run/slapd.args

TLSCipherSuite HIGH:MEDIUM:+SSLv2
TLSCertificateFile /etc/openldap/lab_cert.pem
TLSCertificateKeyFile /etc/openldap/lab_key.pem
TLSCACertificateFile /etc/openldap/cacerts/ca-icm.pem

access to attrs=userPassword
  by self write
  by anonymous auth
  by * none

access to attrs=shadowLastChange
  by self write
  by * read

access to *
  by * read

database        bdb
limits          * size.soft=none size.hard=none
suffix          "dc=lab,dc=icm,dc=edu,dc=pl"
rootdn          "cn=Manager,dc=lab,dc=icm,dc=edu,dc=pl"
rootpw          {CRYPT}.............

password-hash {CRYPT}

directory       /var/lib/ldap

index   objectClass             pres,eq

index   uid                     pres,eq,sub
index   cn                      pres,eq,sub
index   displayName             pres,eq,sub
index   uidNumber               eq
index   gidNumber               eq
index   memberUid               eq

index   default                 sub

loglevel 63

[root@lab ~]# gdb id
GNU gdb Red Hat Linux (6.3.0.0-1.21rh)
...
(gdb) run rathann
Starting program: /usr/bin/id rathann
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0x6be000
id: ../../../libraries/liblber/sockbuf.c:91: ber_sockbuf_ctrl: Assertion `(
(sb)->sb_opts.lbo_valid == 0x3 )' failed.
uid=5242(rathann) gid=100(users)
Program received signal SIGABRT, Aborted.
0x006be402 in __kernel_vsyscall ()
(gdb) bt
#0  0x006be402 in __kernel_vsyscall ()
#1  0x001721f8 in *__GI_raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:67
#2  0x00173948 in *__GI_abort () at ../sysdeps/generic/abort.c:88
#3  0x0016b38e in *__GI___assert_fail (assertion=0x6 <Address 0x6 out of
bounds>,
    file=0x6 <Address 0x6 out of bounds>, line=6, function=0xc01060
"ber_sockbuf_ctrl")
    at assert.c:83
#4  0x009d4256 in ber_sockbuf_ctrl () from /lib/libnss_ldap.so.2
#5  0x009b0579 in try_read1msg () from /lib/libnss_ldap.so.2
#6  0x009b1526 in ldap_result () from /lib/libnss_ldap.so.2
#7  0x009a56a6 in do_result (ctx=0x9f48a58, all=0) at ldap-nss.c:2154
#8  0x009a6463 in _nss_ldap_getent_ex (args=0xbf990df4, ctx=0xbf990e14,
result=0xbf990ea8,
    buffer=0x0, buflen=0, errnop=0xbf990e10,
    filterprot=0xc1bf60 "(&(objectclass=posixGroup)(uniqueMember=%s))",
sel=LM_GROUP,
    user_attrs=0xbf990e08, parser=0x9a7e46 <do_parse_initgroups>) at
ldap-nss.c:2500
#9  0x009a807b in do_parse_initgroups (e=0x9f47dc8, pvt=0x9f39b68,
result=0xbf990ea8, buffer=0x0,
    buflen=0) at ldap-grp.c:816
#10 0x009a6424 in _nss_ldap_getent_ex (args=0xbf990ec4, ctx=0xbf990ee0,
result=0xbf990ea8,
    buffer=0x0, buflen=0, errnop=0xb7f896a0,
    filterprot=0xc19b60
"(&(objectclass=posixGroup)(|(memberUid=%s)(uniqueMember=%s)))",
    sel=LM_GROUP, user_attrs=0xbf990ed8, parser=0x9a7e46 <do_parse_initgroups>)
at ldap-nss.c:2519
#11 0x009a7b69 in _nss_ldap_initgroups_dyn (user=0x0, group=0, start=0x0,
size=0x0, groupsp=0x0,
    limit=0, errnop=0x0) at ldap-grp.c:966
#12 0x001d3de4 in internal_getgrouplist (user=0xbf991c25 "rathann", group=100,
size=0xbf990f64,
    groupsp=0xbf990f68, limit=-1) at initgroups.c:104
#13 0x001d3fe1 in getgrouplist (user=0xbf991c25 "rathann", group=100,
groups=0x0,
    ngroups=0xbf990fa8) at initgroups.c:158
#14 0x08049235 in xgetgroups (username=0xbf991c25 "rathann", gid=100,
n_groups=0xbf991028,
    groups=0xbf991024) at id.c:322
#15 0x08049a25 in main (argc=2, argv=0xbf9910c4) at id.c:456
#16 0x0015ede6 in __libc_start_main (main=0x804934a <main>, argc=2,
ubp_av=0xbf9910c4,
    init=0x804b00c <__libc_csu_init>, fini=0x804b05c <__libc_csu_fini>,
    rtld_fini=0x139f2d <_dl_fini>, stack_end=0xbf9910bc) at
../sysdeps/generic/libc-start.c:228
#17 0x08048f11 in _start ()
(gdb) q

Comment 1 ando@openldap.org 2005-07-20 16:27:50 UTC
changed notes
Comment 2 ando@openldap.org 2005-08-04 16:49:03 UTC
changed state Open to Suspended
Comment 3 Kurt Zeilenga 2005-08-09 16:29:27 UTC
changed state Suspended to Closed
Comment 4 Howard Chu 2009-02-17 05:28:27 UTC
moved from Incoming to Archive.Incoming
Comment 5 OpenLDAP project 2014-08-01 21:05:55 UTC
not OpenLDAP software?