[imp] CRAM-MD5 authentication mysteriously crashes

chris albert albert at dms.umontreal.ca
Sun Jan 18 09:18:44 PST 2004


Hi,
Running php-4.3.4,imap-2002d-3,horde-2.2.4, and imp-3.2.2 on a RH
Advanced Server machine. Attempting to login via IMP to a IMAP server
using CRAM-MD5 segfaults the pache child process. The symptoms can
depend on the browser, either 'document contains no data(moz)' or 'error
reading from socket(links)'. I realize this is not a problem with IMP,
but since similar issues have been raised, perhaps someone can point me
in the right direction.

Doing a tcpdump of the impa exchange gives:

Response: OK my.imap.server PMDF IMAP
00000000 Request: CAPABILITY
Response: CAPABILITY IMAP4 IMAP4rev1 A
00000001 Request: AUTHENTICATE CRAM-MD5
Response: PFFBb2ttN2ZpUnZxdzhJQHN0YWZm
[FIN,ACK]
00000001 Response: BAD Invalid base64 st
[TCP zero window] RST

Doing an strace on the apache child process is not that informative but
shows that it is when the webmail server reads the first CRAM-MD5
response packet that crashes the child pid (not the same process as above):

19483 read(16, "+ PFFBcWlTS2pJSks0SHhPQHN0YWZmLm"..., 8192) = 48
19483 alarm(0)                          = 0
19483 alarm(0)                          = 0
19483 alarm(0)                          = 0
19483 --- SIGSEGV (Segmentation fault) @ 0 (0) ---

Logins to an Exchange server, which does not support CRAM-MD5 work fine.


On the other hand, using the 'imtest' tool from cyrus-imapd shows that I
can connect correctly :

# imtest -m CRAM-MD5 -a chris.albert my.imap.server
S: * OK my.imap.server PMDF IMAP4rev1 V6.0-24 (Message store V6.0-24)
C: C01 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 ACL LITERAL+ NAMESPACE QUOTA UIDPLUS
X-NON-HIERARCHICAL-RENAME AUTH=CRAM-MD5 AUTH=DIGEST-MD5 AUTH=PLAIN
S: C01 OK Completed
C: A01 AUTHENTICATE CRAM-MD5
S: + PFFBcStTMzFhZ3crS0N5QHN0YWZmLm1jZ2lsbC5jYT4=
Please enter your password:
C: Y2hyaXMuYWxiZXJ0IDA1NzQ2ZTVlNGRkYmM1MWQ1NWZjMjY5OTRlNjhmNmMy

Max debugging enabled on php and horde show nothing revealing.


Anyone have any ideas on what might be going on here or where I could go
for help?

TIA,
Chris




More information about the imp mailing list