[asterisk-bugs] [JIRA] (ASTERISK-26570) Macro allows an infinite loop of dialplan inclusion
Tzafrir Cohen (JIRA)
noreply at issues.asterisk.org
Wed Nov 9 10:22:10 CST 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-26570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tzafrir Cohen updated ASTERISK-26570:
-------------------------------------
Description:
When app_macro considers the dialplan extension to execute, it loops through contexts and fails to protect from an infinite loop. The result may be a crash with over 5700 recursive calls to find_matching_priority() called from macro_exec().
Reproduce: An Asterisk system with the following dialplan:
{code}
[test]
include => test2
; A simplistic recursive scan never gets here
include => test1
exten => macro,1,Answer()
same => n,Macro(test)
same => n,Hangup()
[test2]
include => test
[test1]
exten => s,1,NoOp(Starting Macro)
[macro-test]
include => test
{code}
Now call the macro. E.g.:
{code}
channel originate Local/macro at test Application Wait 40
{code}
was:
When app_macro considers the dialplan extension to execute, it loops through contexts and fails to protect from an infinite loop. The result may be a crash with over 5700 recursive calls to find_matching_priority() called from macro_exec().
Reproduce: An Asterisk system with the following dialplan:
{code}
[test]
include => test2
include => test1
exten => macro,1,Answer()
same => n,Macro(test)
same => n,Hangup()
[test2]
include => test
[test1]
exten => s,1,NoOp(Starting Macro)
[macro-test]
include => test
{code}
Now call the macro. E.g.:
{code}
channel originate Local/macro at test Application Wait 40
{code}
> Macro allows an infinite loop of dialplan inclusion
> ---------------------------------------------------
>
> Key: ASTERISK-26570
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-26570
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Affects Versions: 11.22.0, 14.1.1
> Environment: Note: not tested with 14. Instead, tested with a fairly recent master (bf01ff53f8d93d637981720331405e56f0b3b118), on both my Debian Testing laptoop and a Centos 6 server.
> Reporter: Tzafrir Cohen
> Severity: Minor
>
> When app_macro considers the dialplan extension to execute, it loops through contexts and fails to protect from an infinite loop. The result may be a crash with over 5700 recursive calls to find_matching_priority() called from macro_exec().
> Reproduce: An Asterisk system with the following dialplan:
> {code}
> [test]
> include => test2
> ; A simplistic recursive scan never gets here
> include => test1
> exten => macro,1,Answer()
> same => n,Macro(test)
> same => n,Hangup()
> [test2]
> include => test
> [test1]
> exten => s,1,NoOp(Starting Macro)
> [macro-test]
> include => test
> {code}
> Now call the macro. E.g.:
> {code}
> channel originate Local/macro at test Application Wait 40
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list