[Kolab-devel] [issue1824] cyrus-imapd segfaults on x86_64

Marcus Hüwe kolab-issues at intevation.de
Mon Jul 2 17:00:20 CEST 2007


New submission from Marcus Hüwe <suse-tux at gmx.de>:

cyrus-imapd starts segfaulting when trying to login from kontact. This happens
on openSUSE factory (x86_64) native installation (no openpkg but it may affect
it as well!! (see below)).

/var/log/messages:

Jun 28 19:41:14 build master[11342]: about to exec /usr/lib/cyrus/bin/imapd
Jun 28 19:41:14 build imaps[11342]: executed
Jun 28 19:41:14 build imaps[11342]: dracconn: localhost: RPC: Program not registered
Jun 28 19:41:14 build imaps[11342]: DRAC notifications disabled
Jun 28 19:41:14 build imaps[11342]: accepted connection
Jun 28 19:41:14 build imaps[11342]: TLS server engine: cannot load CA data
Jun 28 19:41:14 build imaps[11342]: mystore: starting txn 2147483671
Jun 28 19:41:14 build imaps[11342]: mystore: committing txn 2147483671
Jun 28 19:41:14 build imaps[11342]: starttls: TLSv1 with cipher AES256-SHA
(256/256 bits new) no authentication
Jun 28 19:41:15 build master[11048]: process 11342 exited, signaled to death by 11
Jun 28 19:41:15 build master[11048]: service imaps pid 11342 in BUSY state:
terminated abnormally


I finally figured out that the segfault happens in canonify_userid()
(imap/global.c).

434: if ( (vals = ldap_get_values(handle, entry, "mail")) ) {
435:    if (strchr(vals[0], '@')) {

gcc throws the following warning during the compile:

gcc -c -I.. -I./../lib -I../et -I./../sieve   -I/usr/include  -DHAVE_CONFIG_H 
-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fno-strict-aliasing
-I/usr/include/kerberosIV -I/usr/lib64/sasl2/include -fPIE \
	global.c
	In file included from global.c:68:
	imap_err.h:67: warning: ?struct et_list? declared inside parameter list
	imap_err.h:67: warning: its scope is only this definition or declaration, which
is probably not what you want
	In file included from global.c:73:
	mupdate_err.h:20: warning: ?struct et_list? declared inside parameter list
	global.c: In function ?canonify_userid?:
	global.c:434: warning: assignment makes pointer from integer without a cast


The code above comes from the kolab-ldap.patch
(http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/imapd/kolab-ldap.patch)
If i replace this deprecated ldap function (ldap_get_values() is deprecated, see
here http://en.opensuse.org/OpenLDAP_2.3_libldap_upgrade_howto and in the ldap.h
header for more information) everything works as expected.

This segfault may happen in a openpkg environment (on x86_64) too because it
uses openldap 2.3 as well (I'm referring to 2.2-beta1) but I'm not quite sure (i
can't test it atm because setting up an openpkg environment fails on openSUSE
factory (i'll try to figure out why)).

I attached a patch which fixes the problem (i simply replaced the _all_
deprecated ldap function calls with the new one's).

----------
files: cyrus-imapd-2.3.8_kolab_ldap_fix_deprecated.diff
messages: 11102
nosy: mhuewe
priority: bug
status: unread
title: cyrus-imapd segfaults on x86_64
topic: server
________________________________________________
Kolab issue tracker <kolab-issues at intevation.de>
<https://intevation.de/roundup/kolab/issue1824>
________________________________________________
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cyrus-imapd-2.3.8_kolab_ldap_fix_deprecated.diff
URL: <http://lists.kolab.org/pipermail/devel/attachments/20070702/3ea17590/attachment.ksh>


More information about the devel mailing list