[Home]

Summary:ASTERISK-10633: Greater than 256 New messages crashes Asterisk
Reporter:Kevin Stewart (skavin)Labels:
Date Opened:2007-10-28 16:59:53Date Closed:2007-12-06 14:22:24.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 11101.patch
Description:a SIP user logging in with 257 messages in an imap mailbox will crash asterisk.
Comments:By: Kevin Stewart (skavin) 2007-10-28 21:23:38

looks like there is a buffer overflow.
it looks like msgArray overwrites mailstream in the vm_state structure when checking the number of messages in the mailbox for the MWI during registration.

also

vmu->maxmsg is not checked in the imap code path.
but I assume I have to log a feature request to get that to work

Patch not supplied as you did not like my last one liner.



By: Brandon Kruse (bkruse) 2007-10-29 09:07:34

Patches are ALWAYS welcome, whether or not the developers agree with the code change is the question.

Sometimes what makes it work is not always the 100% right way, and we have to chat and come up with the most efficient and effective way, no matter what it takes.

-bk

By: Kevin Stewart (skavin) 2007-10-29 15:46:59

I think you and Corydon76 need to get your messages straight.
Accepting patches for crashes but not for compliance issues with app_voicemail is confusing and annoying.
especially as imap support for app_voicemail is so raw

By: Mark Michelson (mmichelson) 2007-11-05 10:44:15.000-0600

I have uploaded a patch to try testing. Let me know if this fixes the issue.

By: Mark Michelson (mmichelson) 2007-12-06 14:18:02.000-0600

There has been no reply to this in over a month. My local tests show that this works, and the patch I have written can't hurt things any, so I'm going to go ahead and commit it and close this. If a new problem comes up related to this, a new bug can be opened.

By: Digium Subversion (svnbot) 2007-12-06 14:22:23.000-0600

Repository: asterisk
Revision: 91541

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r91541 | mmichelson | 2007-12-06 14:22:23 -0600 (Thu, 06 Dec 2007) | 8 lines

IMAP storage did not honor the maxmsg setting in voicemail.conf, and it also had the possibility
of crashing if a user had more than 256 messages in their voicemail. This patch kills two birds with
one stone by adding maxmsg support and also setting a hard limit on the number of messages at 255 so
that the crashes cannot happen.

(closes issue ASTERISK-10633, reported by Skavin, patched by me)


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=91541