<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9372">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_pubsub: segfault in function publish_expire<br><br>The function pubsub_on_rx_publish_request incorrectly uses<br>of AST_SCHED_REPLACE_UNREF.<br><br>The AST_SCHED_REPLACE_UNREF should unref old '_data'.<br><br>Because of this, there may be a double unref<br>of variable 'publication' when ast_sched_del is unsuccessful<br>that leads to use after free of the 'publication' in publish_expire.<br><br>ASTERISK-27956 #close<br><br>Change-Id: Ie0f0cfc7e036953d890b188656010b325a5cdc82<br>---<br>M res/res_pjsip_pubsub.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c</span><br><span>index 587c533..8f3b2f5 100644</span><br><span>--- a/res/res_pjsip_pubsub.c</span><br><span>+++ b/res/res_pjsip_pubsub.c</span><br><span>@@ -3354,7 +3354,7 @@</span><br><span> ao2_link(handler->publications, publication);</span><br><span> </span><br><span> AST_SCHED_REPLACE_UNREF(publication->sched_id, sched, expires * 1000, publish_expire, publication,</span><br><span style="color: hsl(0, 100%, 40%);">- ao2_ref(publication, -1), ao2_ref(publication, -1), ao2_ref(publication, +1));</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_ref(_data, -1), ao2_ref(publication, -1), ao2_ref(publication, +1));</span><br><span> } else {</span><br><span> AST_SCHED_DEL_UNREF(sched, publication->sched_id, ao2_ref(publication, -1));</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9372">change 9372</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9372"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ie0f0cfc7e036953d890b188656010b325a5cdc82 </div>
<div style="display:none"> Gerrit-Change-Number: 9372 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>