]> git.ipfire.org Git - thirdparty/asterisk.git/commit
AST-2012-011: Resolve heap corruption issue with voicemail
authorKinsey Moore <kmoore@digium.com>
Thu, 5 Jul 2012 19:36:21 +0000 (19:36 +0000)
committerKinsey Moore <kmoore@digium.com>
Thu, 5 Jul 2012 19:36:21 +0000 (19:36 +0000)
commit163d3b05d43edfa22f82c45d7a5fa4b8ec81d957
treee8b5f716373acd85b8c5545b1010f5a1047f637c
parentf653a2026dcd163589b98d3178ec492151e08bd2
AST-2012-011: Resolve heap corruption issue with voicemail

The heard and deleted arrays in the voicemail state structure were not
handled properly following the memory leak fix in r354890 and a fix for
an invalid free in r356797.  This could result in accessing and writing
into freed memory.  The allocation for these arrays has been reworked
to avoid the possibility of invalid frees, access of freed memory, and
crashes that were occurring as a result of this.

Locking around accesses and modifications of the voicemail state
structure members dh_arraysize, heard, and deleted has been added to
prevent simultaneous modification and access when IMAP storage is in
use.  If IMAP storage is not in use, this locking is not compiled in.

Review: https://reviewboard.asterisk.org/r/1994/
(closes issue ASTERISK-19923)
Reported by: Dan Delaney
Tested by: Dan Delaney, Julian Yap
Patches:
  vm_alloc_fix.diff uploaded by kmoore (license 6273)

........

Merged revisions 369652 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 369653 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_voicemail.c