Bug#532218: libsasl2-2: Bug #499770 still exists

Lars Hanke lars at lhanke.de
Sun Jun 7 15:22:09 UTC 2009


Package: libsasl2-2
Version: 2.1.22.dfsg1-23+lenny1
Severity: important
Tags: patch

Using the ldapdb auxprop with cyrus-imap fails because the authentication process crashes due to a double init of a mutex (cause briefly explained by Eric Leblond in Bug #499770). This makes any kind of login into the IMAP server entirely impossible. The error messages produced are not very helpful so it's more than annoying to hunt the problem down to begin with. It took more than a week when I first faced that issue some time beginning this year.

Today due to the security upgrade SASL was replaced and my IMAP was down again with the same symptoms (I love my internal wiki). Re-installing my hand-fixed sasl2 packages from cyrus-sasl2-2.1.22.dfsg1 sources got it working instantly.

I'll prepare a new build based on the security patched sources shortly and report whether this still fixes the issue. Actually, the patch is a single if statement.

--8<-----------------------------------------
admin at valhalla:~/packages/cyrus-sasl2$ cat 0021_fix_sasl_mutex.dpatch
#! /bin/sh /usr/share/dpatch/dpatch-run
## 0021_fix_sasl_mutex.dpatch by  <admin at valhalla.mgr>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix SEGFAULT on sasl_mutex. Debian Bug #405495

@DPATCH@

--- trunk~/lib/common.c 2009-01-05 12:20:53.000000000 +0100
+++ trunk/lib/common.c  2009-01-05 12:24:19.000000000 +0100
@@ -150,9 +150,17 @@
   &sasl_mutex_free
 };

-void sasl_set_mutex(sasl_mutex_alloc_t *n, sasl_mutex_lock_t *l,
-                   sasl_mutex_unlock_t *u, sasl_mutex_free_t *d)
-{
+void sasl_set_mutex(sasl_mutex_alloc_t *n,
+                   sasl_mutex_lock_t *l,
+                   sasl_mutex_unlock_t *u,
+                   sasl_mutex_free_t *d)
+{
+  /* Disallow mutex function changes once sasl_client_init
+     and/or sasl_server_init is called */
+  if(_sasl_server_cleanup_hook || _sasl_client_cleanup_hook){
+    return;
+  }
+
   _sasl_mutex_utils.alloc=n;
   _sasl_mutex_utils.lock=l;
   _sasl_mutex_utils.unlock=u;
--8<-----------------------------------------

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-openvz-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages libsasl2-2 depends on:
ii  libc6                         2.7-18     GNU C Library: Shared libraries
ii  libdb4.6                      4.6.21-11  Berkeley v4.6 Database Libraries [

Versions of packages libsasl2-2 recommends:
ii  libsasl2-modules  2.1.22.dfsg1-23+lenny1 Cyrus SASL - pluggable authenticat

libsasl2-2 suggests no packages.

-- no debconf information





More information about the Pkg-cyrus-sasl2-debian-devel mailing list