Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375141 - =net-misc/asterisk-1.8.5.0 memory corruption in main/pbx.c
Summary: =net-misc/asterisk-1.8.5.0 memory corruption in main/pbx.c
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Tony Vroon (RETIRED)
URL: https://issues.asterisk.org/jira/brow...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-13 23:38 UTC by Jaco Kroon
Modified: 2011-07-14 08:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ast-1.8.5.0-pbx_exten_honor_findonly.patch (ast-1.8.5.0-pbx_exten_honor_findonly.patch,1.14 KB, patch)
2011-07-13 23:38 UTC, Jaco Kroon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaco Kroon 2011-07-13 23:38:00 UTC
Under extremely weird cases removal of an extension can cause the trie that maps strings to extension structures to reference freed memory.  The case I picked up on is where I have multiple iax/2 (will apply to SIP too) peers where one peer's name is a prefix for another, if the shorter name then goes away and gets removed as per regcontext in iax.conf or sip.conf memory corruption occurs, and if you're very lucky you don't crash.

Reproducible: Always
Comment 1 Jaco Kroon 2011-07-13 23:38:56 UTC
Created attachment 280027 [details, diff]
ast-1.8.5.0-pbx_exten_honor_findonly.patch

The patch I also submitted upstream that I can confirm fixes the problem (as per valgrind test).  Thanks Tony.
Comment 2 Tony Vroon (RETIRED) gentoo-dev 2011-07-14 08:49:06 UTC
+*asterisk-1.8.5.0-r2 (14 Jul 2011)
+
+  14 Jul 2011; Tony Vroon <chainsaw@gentoo.org> -asterisk-1.8.5.0-r1.ebuild,
+  +asterisk-1.8.5.0-r2.ebuild:
+  An intermittent explosion due to memory corruption was identified and patched
+  by Jaco Kroon, closes bug #375141. Old ebuild killed.