<p>lynxis lazus has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/25343">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gprs_ns2: also prevent recursive events when SGSN side cleans up<br><br>When cleaning up the SGSN side (e.g. receiving a SNS SIZE PDU) the<br>clean up will result in a use-after-free bug when the SGSN side is still<br>alive.<br><br>Change-Id: I0f57dd0577d1fc7bd270f58e15f6f22eb130ef59<br>---<br>M src/gb/gprs_ns2_sns.c<br>1 file changed, 2 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/43/25343/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c</span><br><span>index 3eff0f3..281f908 100644</span><br><span>--- a/src/gb/gprs_ns2_sns.c</span><br><span>+++ b/src/gb/gprs_ns2_sns.c</span><br><span>@@ -2732,6 +2732,7 @@</span><br><span>       ns2_clear_procedures(gss);</span><br><span>   ns2_clear_elems(&gss->local);</span><br><span>         ns2_clear_elems(&gss->remote);</span><br><span style="color: hsl(120, 100%, 40%);">+ gss->block_no_nsvc_events = true;</span><br><span>         llist_for_each_entry_safe(nsvc, nsvc2, &gss->nse->nsvc, list) {</span><br><span>            /* Ignore the NSVC over which the SIZE PDU got received */</span><br><span>           if (size_nsvc && size_nsvc == nsvc)</span><br><span>@@ -2739,6 +2740,7 @@</span><br><span> </span><br><span>              gprs_ns2_free_nsvc(nsvc);</span><br><span>    }</span><br><span style="color: hsl(120, 100%, 40%);">+     gss->block_no_nsvc_events = false;</span><br><span> }</span><br><span> </span><br><span> static void ns2_sns_st_sgsn_unconfigured_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/25343">change 25343</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/c/libosmocore/+/25343"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I0f57dd0577d1fc7bd270f58e15f6f22eb130ef59 </div>
<div style="display:none"> Gerrit-Change-Number: 25343 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>