<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/3247/">https://reviewboard.asterisk.org/r/3247/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers, Alec Davis and Joshua Colp.</div>
<div>By Matt Jordan.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-21737">ASTERISK-21737</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">When two RTP channels are in a remote bridge, the remote bridging loop in rtp_engine will periodically check to see if the two channels can still be bridged. One of the many things it checks is whether or not the codecs have changed on the channel. If the codec has changed, it will break out of the loop to re-determine which type of bridge is appropriate.
In order to perform this check, the ast_rtp_glue virtual table's get_codec callback is called for each channel. The callback implementations assume that the channel tech private is valid when called; as such, there has always been some code in place to check whether or not the channel pvt is NULL before calling. However, this check is insufficient.
The channels are unlocked during the remote bridging loop. It is possible for a channel to get masqueraded between the check for the pvt being NULL and the actual call to get_codec. When this occurs, the callback is called with a ZOMBIE channel, which now has a NULL pvt. Crash.
While this has always been possible in Asterisk 1.8, it is much more likely to occur in Asterisk 11 due to the timing changes that occur when getting the codec from a channel. As a result, this is much more likely to be reproduced on slow, boggy hardware running Asterisk 11 - but fairly rarely otherwise.
Note: This crash was also caught by the various SIP blind transfer tests, in addition to the bug report Alec filed.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/1.8/main/rtp_engine.c <span style="color: grey">(408837)</span></li>
<li>/branches/1.8/include/asterisk/rtp_engine.h <span style="color: grey">(408837)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3247/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>