IMAP v2.4.2 imap process crashes if imapd.conf doesn't define servername or syslog_prefix

Rosenbaum, Larry M. rosenbaumlm at
Wed Oct 27 11:09:29 EDT 2010

I installed and started Cyrus IMAP v2.4.2 on Solaris 9 Sparc.  Every time I
tried to connect, the connection would fail and the log would show (for
example) "process 12723 exited, signaled to death by 11".  If I added a
definition for "servername" to the imapd.conf file, it would run OK and I was
able to connect.  The code causing the problem is in the function
session_new_id() in the file imap/global.c:

    base = config_getstring(IMAPOPT_SYSLOG_PREFIX);
    if (!base) base = config_getstring(IMAPOPT_SERVERNAME);
    snprintf(session_id_buf, MAX_SESSIONID_SIZE, "%.128s-%d-%d-%d",
             base, getpid(), session_id_time, session_id_count);

servername and syslog_prefix are documented as optional, but if neither one is
explicitly defined in imapd.conf, then the character pointer "base" is zero,
which causes a SEGV in snprintf().


-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Info-cyrus mailing list