asterisk / asterisk

The official Asterisk Project repository.
https://www.asterisk.org
Other
1.99k stars 929 forks source link

pbx_variables.c: Prevent SEGV due to stack overflow. #663

Closed InterLinked1 closed 2 months ago

InterLinked1 commented 2 months ago

It is possible for dialplan to result in an infinite recursion of variable substitution, which eventually leads to stack overflow. If we detect this, abort substitution and log an error for the user to fix the broken dialplan.

Resolves: #480

UpgradeNote: The maximum amount of dialplan recursion using variable substitution (such as by using EVAL_EXTEN) is capped at 15.

InterLinked1 commented 2 months ago

cherry-pick-to: none

github-actions[bot] commented 2 months ago

Successfully merged to branch 18.