Seeing dovecot-auth segfault on amd64
dovecot is 1.2.4
pertinent details below:
ldd /usr/local/libexec/dovecot/dovecot-auth linux-vdso.so.1 => (0x00007fffef1fe000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007fe8e6bae000) libvpopmail.so => /usr/lib/libvpopmail.so (0x00007fe8e6986000) libdl.so.2 => /lib/libdl.so.2 (0x00007fe8e6782000) librt.so.1 => /lib/librt.so.1 (0x00007fe8e657a000) libc.so.6 => /lib/libc.so.6 (0x00007fe8e6229000) /lib64/ld-linux-x86-64.so.2 (0x00007fe8e6de6000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007fe8e600e000)
dovecot -n
# 1.2.4: /etc/dovecot/dovecot.conf # OS: Linux 2.6.26-1-amd64 x86_64 Debian squeeze/sid base_dir: /var/run/dovecot log_path: /var/log/dovecot.log listen: 127.0.0.1:143 ssl_listen: *:993 ssl_cert_file: /var/qmail/control/servercert.pem ssl_key_file: /var/qmail/control/clientcert.pem disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login login_greeting: Computer Solutions IMAP Server login_max_connections: 4096 mail_max_userip_connections: 50 first_valid_uid: 89 first_valid_gid: 89 mail_debug: yes mail_drop_priv_before_exec: yes mail_plugins: quota imap_quota imap_client_workarounds: outlook-idle namespace: type: private prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: user: vpopmail passdb: driver: vpopmail userdb: driver: vpopmail plugin: quota: maildir
this is the strace
16:59:30.529067 epoll_wait(7, {}, 7, 1788) = 0
16:59:32.317110 epoll_wait(7, {{EPOLLIN, {u32=17196288,
u64=17196288}}}, 7, 5000) = 1
16:59:34.777612 read(8, "AUTH\t1\tPLAIN\tservice=imap\tsecured"...,
4074) = 134
16:59:34.777750 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
and from a core dump
gdb /usr/local/libexec/dovecot/dovecot-auth ./core GNU gdb (GDB) 6.8.50.20090628-cvs-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /usr/lib/libvpopmail.so...done. Loaded symbols for /usr/lib/libvpopmail.so Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib64/ld-linux-x86-64.so.2...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /lib/libpthread.so.0...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/libnss_compat.so.2...done. Loaded symbols for /lib/libnss_compat.so.2 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libnss_nis.so.2...done. Loaded symbols for /lib/libnss_nis.so.2 Reading symbols from /lib/libnss_files.so.2...done. Loaded symbols for /lib/libnss_files.so.2 Core was generated by `dovecot-auth'. Program terminated with signal 11, Segmentation fault. #0 0x0000000000000000 in ?? () (gdb)
(gdb) bt full
#0 0x0000000000000000 in ?? ()
No symbol table info available.
#1 0x000000000041eb2d in vpopmail_lookup_vqp (request=0x1ae6548,
vpop_user=0x7fff7a044830 "lawrence", vpop_domain=0x7fff7a0447d0
"shanghaiguide.com") at userdb-vpopmail.c:43
vpw = <value optimized out>
#2 0x000000000041c9c6 in vpopmail_password_lookup
(auth_request=0x7fff7a044830, cleartext=false,
result_r=0x7fff7a0448d4) at passdb-vpopmail.c:65
vpop_user = "lawrence", '\0'
vpop_domain = "shanghaiguide.com", '\0'
vpw = <value optimized out>
password = <value optimized out>
#3 0x000000000041cc0d in vpopmail_verify_plain
(request=0x7fff7a044830, password=0x1ad1278 "123", callback=0x412390
) at passdb-vpopmail.c:119
result = <value optimized out>
scheme = <value optimized out>
tmp_pass = <value optimized out>
crypted_pass = <value optimized out>
ret = <value optimized out>
#4 0x000000000041221d in auth_request_verify_plain
(request=0x1ae6548, password=0x1ad1278 "123", callback=0x41ab00
) at auth-request.c:507
passdb = 0x1ad9a10
result = <value optimized out>
cache_key = <value optimized out>
__PRETTY_FUNCTION__ = "auth_request_verify_plain"
#5 0x000000000041726e in mech_plain_auth_continue (request=0x1ae6548,
data=0x1ad1250 "", data_size=<value optimized out>) at mech-plain.c:58
authid = 0x1ad1250 ""
authenid = 0x1ad1251 "lawrence@shanghaiguide.com"
error = <value optimized out>
pass = 0x1ad1278 "123"
i = <value optimized out>
count = <value optimized out>
#6 0x0000000000412c12 in auth_request_handler_auth_begin
(handler=0x1ae18a8, args=<value optimized out>) at auth-request-
handler.c:388
mech = <value optimized out>
request = 0x1ae6548
list = 0x1ad1110
name = <value optimized out>
arg = 0x1ad1218 "P\22\255\1"
initial_resp = 0x1ad109c
"AGxhd3JlbmNlQHNoYW5naGFpZ3VpZGUuY29tADEyMw=="
initial_resp_len = 4428754
id = <value optimized out>
buf = 0x1ad1218
#7 0x000000000040e2d6 in auth_client_handle_line (conn=0x1ae01f0) at
auth-client-connection.c:174
No locals.
#8 auth_client_input (conn=0x1ae01f0) at auth-client-connection.c:250
---Type <return> to continue, or q <return> to quit---
_data_stack_cur_id = 3
line = 0x1ae0866 "AUTH\t1\tPLAIN\tservice=imap\tsecured
\tlip
(request=0x7fff7a044830, password=0x1ad1278 "123", callback=0x412390
(request=0x1ae6548, password=0x1ad1278 "123", callback=0x41ab00
data=0x1ad1250 "", data_size=<value optimized out>) at mech-plain.c:58 authid = 0x1ad1250 "" authenid = 0x1ad1251 "lawrence@shanghaiguide.com" error = <value optimized out> pass = 0x1ad1278 "123" i = <value optimized out> count = <value optimized out> #6 0x0000000000412c12 in auth_request_handler_auth_begin
(handler=0x1ae18a8, args=<value optimized out>) at auth-request- handler.c:388 mech = <value optimized out> request = 0x1ae6548 list = 0x1ad1110 name = <value optimized out> arg = 0x1ad1218 "P\22\255\1" initial_resp = 0x1ad109c
"AGxhd3JlbmNlQHNoYW5naGFpZ3VpZGUuY29tADEyMw==" initial_resp_len = 4428754 id = <value optimized out> buf = 0x1ad1218 #7 0x000000000040e2d6 in auth_client_handle_line (conn=0x1ae01f0) at
auth-client-connection.c:174 No locals. #8 auth_client_input (conn=0x1ae01f0) at auth-client-connection.c:250 ---Type <return> to continue, or q <return> to quit--- _data_stack_cur_id = 3 line = 0x1ae0866 "AUTH\t1\tPLAIN\tservice=imap\tsecured \tlip
127.0.0.1 \trip
127.0.0.1
\tlport
=993\trport=42735\tresp=AGxhd3JlbmNlQHNoYW5naGFpZ3VpZGUuY29tADEyMw=="
ret = 2
#9 0x0000000000429e8b in io_loop_handler_run (ioloop=<value optimized
out>) at ioloop-epoll.c:208
ctx = 0x1ad9fe0
event = 0x1adca40
list = 0x1ae0500
io = 0x1ae04c0
tv = {tv_sec = 4, tv_usec = 999952}
t_id = 2
msecs = <value optimized out>
ret = 1
call = <value optimized out>
#10 0x0000000000429318 in io_loop_run (ioloop=0x1ad9350) at ioloop.c:335
No locals.
#11 0x0000000000416aae in main (argc=<value optimized out>,
argv=<value optimized out>) at main.c:347
foreground = false