Bug 3281 - segfault in pdb_ldap when built against libldap 2.3 on x86_64
Summary: segfault in pdb_ldap when built against libldap 2.3 on x86_64
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts (show other bugs)
Version: 3.0.20
Hardware: x64 Linux
: P3 normal
Target Milestone: none
Assignee: Guenther Deschner
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-24 05:38 UTC by Buchan Milne
Modified: 2005-11-24 06:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Buchan Milne 2005-11-24 05:38:59 UTC
When built against libldap from OpenLDAP 2.3 on x86_64, smbd segfaults when using pdb_ldap.

I found it easier to reproduce with pdbedit:

[root@build ~]# gdb pdbedit
GNU gdb 6.3-5mdk (Mandriva Linux release 2006.0)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-mandriva-linux-gnu"...Using host libthread_db library "/lib64/tls/libthread_db.so.1".

(gdb) run -L
Starting program: /usr/bin/pdbedit -L

Program received signal SIGSEGV, Segmentation fault.
ldap_count_values (vals=0x2ad0a3c0) at getvalues.c:153
153             for ( i = 0; vals[i] != NULL; i++ )
(gdb) bt
#0  ldap_count_values (vals=0x2ad0a3c0) at getvalues.c:153
#1  0x000000552ab3dc4d in smbldap_check_root_dse () from /usr/bin/pdbedit
#2  0x000000552ab3dd60 in smbldap_has_control () from /usr/bin/pdbedit
#3  0x000000552ab3c3d0 in smbldap_connect_system () from /usr/bin/pdbedit
#4  0x000000552ab3c64a in smbldap_open () from /usr/bin/pdbedit
#5  0x000000552ab3c841 in another_ldap_try () from /usr/bin/pdbedit
#6  0x000000552ab3cb9b in smbldap_search_ext () from /usr/bin/pdbedit
#7  0x000000552ab3cc23 in smbldap_search () from /usr/bin/pdbedit
#8  0x000000552ab3d4f9 in smbldap_search_suffix () from /usr/bin/pdbedit
#9  0x000000552ab3e3d6 in smbldap_search_domain_info () from /usr/bin/pdbedit
#10 0x000000552aaf3881 in pdb_init_ldapsam () from /usr/bin/pdbedit
#11 0x000000552aae4379 in make_pdb_methods_name () from /usr/bin/pdbedit
#12 0x000000552aae4911 in make_pdb_context_list () from /usr/bin/pdbedit
#13 0x000000552aae4bbf in pdb_get_static_context () from /usr/bin/pdbedit
#14 0x000000552aae5504 in initialize_password_db () from /usr/bin/pdbedit
#15 0x000000552aad0be7 in main () from /usr/bin/pdbedit


There are no problems under x86 (with exaclt the same versions), or with OpenLDAP 2.2 (on x86_64).

Samba 3.0.20b exhibits the same behaviour.

OpenLDAP developers don't think this is their bug.
Comment 1 Guenther Deschner 2005-11-24 05:51:00 UTC
What exact version of OpenLDAP did you compile with? 
(Could not reproduce with OpenLDAP 2.3.11)
Comment 2 Buchan Milne 2005-11-24 06:56:05 UTC
Sorry, ensuring LDAP_DEPRECATED is really defined avoids this.