[Home]

Summary:ASTERISK-25609: [patch]Asterisk may crash when calling ast_channel_get_t38_state(c)
Reporter:Filip Jenicek (phill)Labels:
Date Opened:2015-12-04 07:47:17.000-0600Date Closed:2015-12-09 17:39:25.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/T.38
Versions:11.20.0 13.6.0 Frequency of
Occurrence
Related
Issues:
Environment:Asterisk 13.6.0, debian jessie 32-bitAttachments:( 0) ASTERISK-25609-ast13.6.patch
Description:Asterisk may crash when calling ast_channel_get_t38_state(c) on a locked channel which is being hung up.

We call the ast_channel_get_t38_state(c) function from a custom asterisk module, so I can't say whether the issue can happen with the unmodified asterisk code.

However, I believe there can be a channel with tech = sip_tech and tech_pvt* = NULL, probably when a call is being hung up. If the function ast_channel_get_t38_state(c) is called on a such channel, function sip_queryoption crashes while trying to dereference a pointer to tech_pvt.

I suggest adding a simple check of the tech_pvt pointer just as it is in other similar methods.

{code}
if (!p) {
return -1;
}
{code}
Comments:By: Asterisk Team (asteriskteam) 2015-12-04 07:47:19.682-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2015-12-07 18:45:25.480-0600

Thanks. Do you want to post your patch to Gerrit for peer review? That way others will be able to provide feedback and help get it in if necessary.

https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage
https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process