Bug 239802 - bind_sdb, ldap2zone segfaulting
bind_sdb, ldap2zone segfaulting
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: bind (Show other bugs)
6
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Adam Tkac
Ben Levenson
:
Depends On: 239149
Blocks: 240788
  Show dependency treegraph
 
Reported: 2007-05-11 09:37 EDT by Tomas Vanderka
Modified: 2013-04-30 19:35 EDT (History)
1 user (show)

See Also:
Fixed In Version: 9.4.1-4.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-08 11:59:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Vanderka 2007-05-11 09:37:59 EDT
Description:
bind_sdb and ldap2zone segfaulting when using ldap.

Version-Release number of selected component (if applicable):
bind-sdb-9.3.4-4.fc6

Additional info:
ldap.h is not correctly included during compilation, so ldap_* functions are 
implicitly declared like returning int (some of those return pointers, so on 
x86_64 the pointer is truncated to 32 bits -> segfault), package build 
finishes ok but binaries are broken. LDAP_DEPRECATED should be defined during 
compilation.

#rpmbuild -bi /usr/src/redhat/SPECS/bind.spec

gcc -fPIE -I/usr/src/redhat/BUILD/bind-9.3.4 -I./include -I./unix/include -I/usr/src/redhat/BUILD/bind-9.3.4/lib/lwres/include -I../../lib/lwres/unix/include -I../../lib/lwres/include -I/usr/src/redhat/BUILD/bind-9.3.4/lib/dns/include -I../../lib/dns/include -I/usr/src/redhat/BUILD/bind-9.3.4/lib/bind9/include -I../../lib/bind9/include -I/usr/src/redhat/BUILD/bind-9.3.4/lib/isccfg/include -I../../lib/isccfg/include -I/usr/src/redhat/BUILD/bind-9.3.4/lib/isccc/include -I../../lib/isccc/include -I/usr/src/redhat/BUILD/bind-9.3.4/lib/isc/include -I../../lib/isc -I../../lib/isc/include -I../../lib/isc/unix/include -I../../lib/isc/pthreads/include   -D_REENTRANT   -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/kerberos/include    -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing  -c 
ldapdb.c
ldapdb.c: In function 'ldapdb_getconn':
ldapdb.c:138: warning: implicit declaration of function 'ldap_unbind'
ldapdb.c: In function 'ldapdb_bind':
ldapdb.c:200: warning: implicit declaration of function 'ldap_open'
ldapdb.c:200: warning: assignment makes pointer from integer without a cast
ldapdb.c:214: warning: implicit declaration of function 'ldap_simple_bind_s'
ldapdb.c: In function 'ldapdb_search':
ldapdb.c:260: warning: implicit declaration of function 'ldap_search'
ldapdb.c:296: warning: implicit declaration of function 'ldap_get_values'
ldapdb.c:296: warning: assignment makes pointer from integer without a cast
ldapdb.c:301: warning: assignment makes pointer from integer without a cast
ldapdb.c:304: warning: implicit declaration of function 'ldap_value_free'
ldapdb.c:322: warning: assignment makes pointer from integer without a cast
Comment 1 Adam Tkac 2007-05-11 11:39:24 EDT
(In reply to comment #0)
> finishes ok but binaries are broken. LDAP_DEPRECATED should be defined during 
> compilation.

Better solution is change functions to newer than using deprecated API

Regards, -A-

Comment 2 Adam Tkac 2007-05-18 10:35:39 EDT
Needs more work than I think. You could download temporary solution with
LDAP_DEPRECATED macro before I rewrite affected parts of code.
http://people.redhat.com/atkac/test_srpms/bind-9.3.4-4.5.fc6.src.rpm

-A-
Comment 3 Adam Tkac 2007-05-21 09:30:59 EDT
Could you please test proposed update?
http://people.redhat.com/atkac/test_srpms/bind-9.4.1-2.1.fc8.src.rpm

Thanks, -A-
Comment 4 Adam Tkac 2007-05-22 11:29:41 EDT
Could be fixed in bind-9.3.4-5.fc6 which will be avaliable very soon. Please
tell me your feelings :)

Regards, Adam
Comment 5 Tomas Vanderka 2007-05-23 04:58:02 EDT
Hi, i tried version from comment #3, there are still segfaults. There's one in 
ldap2zone at 'ttlvals = ldap_get_values(ld, e, "dNSTTL");'

bind_sdb segfaults if i use ldapuri like "ldap://host/dc=aaa,dc=bb" (no 
extensions) cause then data->lud->lud_exts is null at ldapdb.c:643
When i just put ???? at the end of uri, so there's an empty extension 
ldap_url_parse does not like it.

I also tried to put some random text as the extension ????sad but then the 
bind fails (i use anonymous bind so there's no bindpw or binddn)

Let me know if you need more info ...
Comment 6 Adam Tkac 2007-05-24 10:44:35 EDT
In the end, I've used -DLDAP_DEPRECATED because it's no documentation about new
API, informed upstream about problems and open
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=241224 :) .
bind-9.3.4-6.fc6 could work fine

Regards, Adam
Comment 7 Fedora Update System 2007-06-08 11:59:07 EDT
bind-9.4.1-4.fc7 has been pushed to the Fedora 7 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.