sasl2-bin broken, segfaulting during install

Bug #323409 reported by Fabien Tassin
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cyrus-sasl2 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: sasl2-bin

Jaunty (both 32 and 64bit)

Setting up sasl2-bin (2.1.22.dfsg1-23ubuntu2) ...
: Successful return: 0
DB->fd: method not permitted before handle's open method
/var/lib/dpkg/info/sasl2-bin.postinst: line 15: 29135 Done echo '!'
     29136 Segmentation fault (core dumped) | saslpasswd2 -c 'no:such:user'
DB->fd: method not permitted before handle's open method
/var/lib/dpkg/info/sasl2-bin.postinst: line 15: 29278 Segmentation fault (core dumped) saslpasswd2 -d 'no:such:user'
warning: --update given but /etc/sasldb2 does not exist
 * To enable saslauthd, edit /etc/default/saslauthd and set START=yes

so saslpasswd2 segfaulted during install.
Confirmed manually:

root@ix:~ # saslpasswd2 -c fake
Password:
Again (for verification):
: Successful return: 0
DB->fd: method not permitted before handle's open method
Segmentation fault (core dumped)
root@ix:~ # sasldblistusers2
DB->get: method not permitted before handle's open method
Segmentation fault (core dumped)

I have the same issue on my servers using SASL2 with sendmail, meaning SMTP AUTH is broken.

Related branches

Revision history for this message
Fabien Tassin (fta) wrote :

SourcePackage: cyrus-sasl2
Stacktrace:
 #0 0xb7b2c393 in strchrnul () from /lib/tls/i686/cmov/libc.so.6
 #1 0xb7aef87b in vfprintf () from /lib/tls/i686/cmov/libc.so.6
 #2 0xb7af45f0 in buffered_vfprintf () from /lib/tls/i686/cmov/libc.so.6
 #3 0xb7aefaae in vfprintf () from /lib/tls/i686/cmov/libc.so.6
 #4 0xb7babb81 in __vfprintf_chk () from /lib/tls/i686/cmov/libc.so.6
 #5 0xb7cdfb65 in __db_errfile () from /usr/lib/libdb-4.6.so
 #6 0xb7ce9b7f in ?? () from /usr/lib/libdb-4.6.so
 #7 0xb80c95aa in ?? () from /usr/lib/sasl2/libsasldb.so.2
 #8 0xb80c9aa9 in _sasldb_putdata () from /usr/lib/sasl2/libsasldb.so.2
 #9 0xb80c7180 in ?? () from /usr/lib/sasl2/libsasldb.so.2
 #10 0xb80ac5b2 in sasl_auxprop_store () from /usr/lib/libsasl2.so.2
 #11 0x080495d5 in ?? ()
 #12 0xb7ac6775 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
 #13 0x08048d51 in ?? ()
StacktraceTop:
 strchrnul () from /lib/tls/i686/cmov/libc.so.6
 vfprintf () from /lib/tls/i686/cmov/libc.so.6
 buffered_vfprintf () from /lib/tls/i686/cmov/libc.so.6
 vfprintf () from /lib/tls/i686/cmov/libc.so.6
 __vfprintf_chk () from /lib/tls/i686/cmov/libc.so.6
ThreadStacktrace:
 .
 Thread 1 (process 8861):
 #0 0xb7b2c393 in strchrnul () from /lib/tls/i686/cmov/libc.so.6
 #1 0xb7aef87b in vfprintf () from /lib/tls/i686/cmov/libc.so.6
 #2 0xb7af45f0 in buffered_vfprintf () from /lib/tls/i686/cmov/libc.so.6
 #3 0xb7aefaae in vfprintf () from /lib/tls/i686/cmov/libc.so.6
 #4 0xb7babb81 in __vfprintf_chk () from /lib/tls/i686/cmov/libc.so.6
 #5 0xb7cdfb65 in __db_errfile () from /usr/lib/libdb-4.6.so
 #6 0xb7ce9b7f in ?? () from /usr/lib/libdb-4.6.so
 #7 0xb80c95aa in ?? () from /usr/lib/sasl2/libsasldb.so.2
 #8 0xb80c9aa9 in _sasldb_putdata () from /usr/lib/sasl2/libsasldb.so.2
 #9 0xb80c7180 in ?? () from /usr/lib/sasl2/libsasldb.so.2
 #10 0xb80ac5b2 in sasl_auxprop_store () from /usr/lib/libsasl2.so.2
 #11 0x080495d5 in ?? ()
 #12 0xb7ac6775 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
 #13 0x08048d51 in ?? ()
Title: saslpasswd2 crashed with SIGSEGV in strchrnul()

Revision history for this message
Fabien Tassin (fta) wrote :

a better stack trace:

 #0 0xb7a1f393 in strchrnul () from /lib/tls/i686/cmov/libc.so.6
 #1 0xb79e287b in vfprintf () from /lib/tls/i686/cmov/libc.so.6
 #2 0xb79e75f0 in buffered_vfprintf () from /lib/tls/i686/cmov/libc.so.6
 #3 0xb79e2aae in vfprintf () from /lib/tls/i686/cmov/libc.so.6
 #4 0xb7a9eb81 in __vfprintf_chk () from /lib/tls/i686/cmov/libc.so.6
 #5 0xb7bd2b65 in __db_errfile (dbenv=0x9dc2140, error=0,
     error_set=DB_ERROR_SET,
     fmt=0x41df5000 <Address 0x41df5000 out of bounds>,
     ap=0xbfde904c "ôïû·ôïû·Àoú·Ø\220Þ¿©Êû·\200\rÜ\t\001")
     at /usr/include/bits/stdio2.h:128
  fp = (FILE *) 0xb7b01560
  sysbuf = "äÿÿÿñI¡·$à ·ô\017°·Ì\214Þ¿;â ·ÈQÜ\täÿÿÿÿÿÿÿ\200!°·®Z®·Hu®·ND®·\232C®·ÿÿÿÿ\000\000\000\000p\215Þ¿Ôš£·Ñ1Ü\tn\215Þ¿\002\000\000\000\001\000\000\000àQÜ\tÓ1Ü\t\000\000\000\000\017H®·\0243®·#3®·\000\000\000\000\000\000\000\000\221ö ·p!°·ØQÜ\tÀQÜ\tîÞ ·š\214Þ¿\003\000\000\000õ\037\000\000ô\017°·ÈQÜ\t\200\214\232·\020ii\rØ\214Þ¿\210lý·\036T\233·\036T\233·Ô\214Þ¿ei¡·0µ\203·\002\000\000\000"...
 #6 0xb7bdcb7f in __dbh_err (dbp=0x9dc2b98, error=0,
     fmt=0x41df5000 <Address 0x41df5000 out of bounds>)
     at ../dist/../db/db_method.c:351
 No locals.
 #7 0xb7fbc5aa in berkeleydb_close (utils=0x41df5000, mbdb=0x25252525)
     at db_berkeley.c:144
  ret = <value optimized out>
 #8 0xb7fbcaa9 in _sasldb_putdata (utils=0x9dbe520, context=0x9dc0d80,
     authid=0x9dbf1c8 "fake", realm=0x9dbf1b8 "hostname",
     propName=0x8049846 "cmusaslsecretCRAM-MD5", data_in=0x0, data_len=0)
     at db_berkeley.c:345
  result = <value optimized out>
  key = 0x9dbf1d8 "fake"
  key_len = 29
  dbkey = {data = 0x9dbf1d8, size = 29, ulen = 0, dlen = 0, doff = 0,
   app_data = 0x0, flags = 0}
  mbdb = (DB *) 0x9dc2b98
 #9 0xb7fba180 in sasldb_auxprop_store (glob_context=0x0, sparams=0x9dbe328,
     ctx=0x9dbe2c0, user=0xbfdeae08 "fake", ulen=4) at sasldb.c:182
  userid = 0x9dbf1c8 "fake"
  realm = 0x9dbf1b8 "hostname"
  user_realm = <value optimized out>
  ret = -20
  tmp_res = <value optimized out>
  to_store = <value optimized out>
  cur = (const struct propval *) 0x9dc259c
  user_buf = 0x9dbeee0 "fake"
 #10 0xb7f9f5b2 in sasl_auxprop_store (conn=0x9dc0d80, ctx=0x9dbe2c0,
     user=0xbfdeae08 "fake") at auxprop.c:948
  getopt = (sasl_getopt_t *) 0xb7fa5f40 <_sasl_conn_getopt>
  ret = 0
  found = <value optimized out>
  context = (void *) 0x9dc0d80
  plist = 0x0
  ptr = (auxprop_plug_list_t *) 0x9dc01c0
  sparams = (sasl_server_params_t *) 0x9dbe328
  userlen = 4
 #11 0x080495d5 in ?? ()
 #12 0xb79b9775 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
 #13 0x08048d51 in ?? ()
StacktraceTop:
 strchrnul () from /lib/tls/i686/cmov/libc.so.6
 vfprintf () from /lib/tls/i686/cmov/libc.so.6
 buffered_vfprintf () from /lib/tls/i686/cmov/libc.so.6
 vfprintf () from /lib/tls/i686/cmov/libc.so.6
 __vfprintf_chk () from /lib/tls/i686/cmov/libc.so.6

Revision history for this message
Andreas Olsson (andol) wrote :

I can confirm these errors, using jaunty 64bit.

Changed in cyrus-sasl2:
status: New → Confirmed
Revision history for this message
Saša Bodiroža (jazzva) wrote :

Same here... Jaunty 32bit

Revision history for this message
Fabien Tassin (fta) wrote :

Thank you.
I had a closer look and all binaries are crashing almost in the same place.

I initially thought it was caused by some changes in db4.6 but strangely enough, it works fine in Intrepid, with almost the same db4.6 (just unrelated packaging changes).

The changes for cyrus-sasl2 between intrepid and jaunty are also very minimal with the noticeable exception of:

"Switch back to Debian's libdb-dev build dependency, to match other changes going on in some kind of transition"
See https://edge.launchpad.net/ubuntu/jaunty/+source/cyrus-sasl2/2.1.22.dfsg1-23ubuntu2

The problem is libdb-dev is 4.7.* in Jaunty.
 libdb-dev | 4.7.25.2ubuntu1 | http://archive.ubuntu.com jaunty/main Packages

I also noticed that in Jaunty, sasl2-bin depends on libdb4.6 and db4.6-util, not 4.7.
This is inconsistent.

Revision history for this message
Fabien Tassin (fta) wrote :

The problem disappears when I revert the libdb-dev build dependency to libdb4.6-dev.
(debs are in my PPA if you want to test).

This is just a work-around, but I least, my SMTP AUTH is back.
A proper fix would be to sort this db 4.6/4.7 mess.

Changed in cyrus-sasl2:
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Daniel Holbach (dholbach) wrote :

Good work, Fabien - this bug bit me too when I upgraded my server to Jaunty.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cyrus-sasl2 - 2.1.22.dfsg1-23ubuntu3

---------------
cyrus-sasl2 (2.1.22.dfsg1-23ubuntu3) jaunty; urgency=low

  * Revert libdb-dev build dependency change introduced in the
    last version, it makes everyhing crash when libdb-dev is
    4.7.*. See LP: #323409

 -- Fabien Tassin <email address hidden> Sat, 31 Jan 2009 21:13:22 +0100

Changed in cyrus-sasl2:
status: Triaged → Fix Released
Revision history for this message
Daniel Holbach (dholbach) wrote :

(You forgot to subscribe ubuntu-main-sponsors, else it would have been a bit quicker :-/)

Josh (joshrnt)
Changed in cyrus-sasl2 (Ubuntu):
status: Fix Released → Fix Committed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Josh: why did you do this change:
 Changed in cyrus-sasl2 (Ubuntu):
 status: Fix Released → Fix Committed

Are you sure you know about the bug statuses: https://wiki.ubuntu.com/Bugs/Status ?

Changed in cyrus-sasl2 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.