[Dovecot] dovecot 1.1.4 maildir imap segfault in message_parse_header_next
I've tried to stress test dovecot 1.1.4 with imaptest for days without any assertion failure or crash. Just some "got too little data" messages.
So far it's the most stable 1.1.x version.
Today a user got this imap segfault with vanilla 1.1.4 (I don't know if it's something you have already fixed in current tree). The user didn't complain of anything, I've just found the error in the logs and the core file.
Regards, Diego.
Core was generated by `/usr/libexec/dovecot/imap'.
Program terminated with signal 11, Segmentation fault.
#0 0x080c8d41 in message_parse_header_next (ctx=0x8774fa0,
hdr_r=0xbfa438e0) at message-header-parser.c:114
114 if (msg[0] == '\n' ||
(gdb) bt full
#0 0x080c8d41 in message_parse_header_next (ctx=0x8774fa0,
hdr_r=0xbfa438e0) at message-header-parser.c:114
msg = (const unsigned char *) 0x0
i = <value optimized out>
size = 0
startpos = <value optimized out>
colon_pos = 4294967295
parse_size = 0
value_pos = <value optimized out>
ret = -2
continued = false
continues = <value optimized out>
crlf_newline = false
#1 0x080c62f5 in read_header (mstream=0x877d6d0) at istream-header-filter.c:163
hdr = (struct message_header_line *) 0x0
highwater_offset = <value optimized out>
pos = <value optimized out>
ret = <value optimized out>
matched = false
hdr_ret = <value optimized out>
__PRETTY_FUNCTION__ = '\0'
On Oct 16, 2008, at 11:33 AM, Diego Liziero wrote:
Today a user got this imap segfault with vanilla 1.1.4 (I don't know
Hmm. And Maildir as topic says?
#0 0x080c8d41 in message_parse_header_next (ctx=0x8774fa0, hdr_r=0xbfa438e0) at message-header-parser.c:114
p *ctx.input p *ctx.input.real_stream
size = 0
i_stream_read_data() returned 0 bytes, but
ret = -2
it also returned that the input buffer is full. That shouldn't be
happening. http://hg.dovecot.org/dovecot-1.1/rev/82d4756f43cc should
catch it earlier.
On Thu, Oct 16, 2008 at 11:39 AM, Timo Sirainen tss@iki.fi wrote:
On Oct 16, 2008, at 11:33 AM, Diego Liziero wrote:
Today a user got this imap segfault with vanilla 1.1.4 (I don't know
Hmm. And Maildir as topic says?
No, sorry, wrong subject, mbox
#0 0x080c8d41 in message_parse_header_next (ctx=0x8774fa0, hdr_r=0xbfa438e0) at message-header-parser.c:114
p *ctx.input p *ctx.input.real_stream
(gdb) p *ctx.input
$1 = {v_offset = 0, stream_errno = 0, mmaped = 0, blocking = 1, closed
= 0, seekable = 1, eof = 0, real_stream = 0x8771538}
(gdb) p *ctx.input.real_stream
$2 = {iostream = {refcount = 3, close = 0x80e3f10
size = 0
i_stream_read_data() returned 0 bytes, but
ret = -2
it also returned that the input buffer is full. That shouldn't be happening. http://hg.dovecot.org/dovecot-1.1/rev/82d4756f43cc should catch it earlier.
Ok thanks.
On Thu, 2008-10-16 at 12:07 +0200, Diego Liziero wrote:
On Thu, Oct 16, 2008 at 11:39 AM, Timo Sirainen tss@iki.fi wrote:
On Oct 16, 2008, at 11:33 AM, Diego Liziero wrote:
Today a user got this imap segfault with vanilla 1.1.4 (I don't know
Hmm. And Maildir as topic says?
No, sorry, wrong subject, mbox
OK, good. :)
it also returned that the input buffer is full. That shouldn't be happening. http://hg.dovecot.org/dovecot-1.1/rev/82d4756f43cc should catch it earlier.
Ok thanks.
Another one: http://hg.dovecot.org/dovecot-1.1/rev/c9e9cf2ad4c9
Can you find a really long line (>8000 bytes) from that user's mbox file?
participants (2)
-
Diego Liziero
-
Timo Sirainen