[asterisk-bugs] [JIRA] (ASTERISK-29264) Certain IAX2 authentication failures cause Asterisk to crash
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Thu Jan 28 16:15:00 CST 2021
[ https://issues.asterisk.org/jira/browse/ASTERISK-29264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Asterisk Team updated ASTERISK-29264:
-------------------------------------
Status: Waiting for Feedback (was: Waiting for Feedback)
> Certain IAX2 authentication failures cause Asterisk to crash
> ------------------------------------------------------------
>
> Key: ASTERISK-29264
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29264
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_iax2, Resources/res_crypto
> Affects Versions: 16.16.0
> Environment: Debian Linux 9 and 10, multiple Asterisk versions ranging from 13.23.1 to 13.38 to version 16. To my knowledge, all Asterisk versions with res_crypto are affected from the testing that has been done.
> Reporter: N A
> Assignee: Asterisk Team
> Severity: Major
> Labels: crash
> Attachments: core-brief.txt, core-full.txt, core-info.txt, core-locks.txt, core-thread1.txt
>
>
> Versions affected: All versions of Asterisk with res_crypto.so loaded: This bug affects all known Asterisk versions from the testing that has been done on multiple different Asterisk machines on multiple versions of Debian Linux. The dump attached is from a 13.23.1 testing system.
> This issue affects chan_iax2 and/or res_crypto. I initially thought it was the former, but it may be more of the latter.
> IAX2 supports no, plaintext, md5, and rsa authentication, the latter two of which allow for encryption. It has been identified that Asterisk contains a bug that results in a crash in the following circumstance: Switch B requires MD5 authentication (i.e. it requires a secret) for some IAX2 user. Switch A places a call to Switch B with all the correct information, except it omits to provide any kind of secret (that is, the Dial string is IAX2/user at host/extension as opposed to IAX2/user:secret at host/extension). In this case, Switch A's Asterisk will immediately crash. Once Asterisk is manually started again, Asterisk runs normally until the next crash.)
> This does not occur with plaintext authentication, it does not occur if an invalid IAX2 user is called, and it does not occur if the desired IAX2 user is called and a secret is provided that is not the right secret. It only occurs when the called IAX2 user requires an MD5 secret but NO secret at all is provided by the calling switch. RSA has not been tested at all.
> I suspect this issue is related to Switch A not knowing how to handle the failed authentication negotiation with Switch B. In most such scenarios, Switch A will say "I don't know how to authenticate to..." and then time out or end the call with CHANUNAVAIL, as expected. In this case, it says "I don't know how to authenticate to..." and then immediately crashes.
> If res_crypto is not loaded, Switch A cannot negotiate the authentication at all, so the call fails but the switch does not crash. Obviously, such a switch cannot make any encrypted IAX2 call.
> What should be happening here is that Asterisk should simply fail the call with a CHANUNAVAIL result as in all other circumstances where an IAX2 call fails (e.g. wrong user, wrong plaintext secret, etc.) Instead, Asterisk just crashes.
> Backtrace files from ast_coredumper attached.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list