[asterisk-dev] [Code Review] 3055: pbx.c: put copy of ast_exten.data on stack to prevent memory corruption
Scott Griepentrog
reviewboard at asterisk.org
Wed Dec 11 09:31:07 CST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3055/
-----------------------------------------------------------
(Updated Dec. 11, 2013, 9:31 a.m.)
Review request for Asterisk Developers and Matt Jordan.
Changes
-------
Reworked code prior to lock release to be more efficient about making a copy of exten->data prior to optional variable substitution
Bugs: AST-1179 and AST-1246
https://issues.asterisk.org/jira/browse/AST-1179
https://issues.asterisk.org/jira/browse/AST-1246
Repository: Asterisk
Description
-------
During dialplan execution in pbx_extension_helper(), the contexts global read lock is used prevent changes to the dialplan. This patch puts a copy of exten->data on the stack so that can be referenced safely during variable substitution (expression evaluation) even if another thread is reloading dialplan and has deleted ast_exten.
Diffs (updated)
-----
/branches/1.8/main/pbx.c 403615
Diff: https://reviewboard.asterisk.org/r/3055/diff/
Testing
-------
Testsuite test 'dialplan_stress' (https://reviewboard.asterisk.org/r/3056/) created to isolate this problem and test this fix.
Thanks,
Scott Griepentrog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131211/5e9e9576/attachment.html>
More information about the asterisk-dev
mailing list