<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/26117">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lchan_fsm: Fix possible NULL ptr dereference in _lchan_on_mode_modify_failure()<br><br>_lchan_on_activation_failure(), which calls lchan_on_mode_modify_failure(),<br>already checks for !for_conn in other paths. Hence, it can be that<br>for_conn being passed to _lchan_on_mode_modify_failure() may be null.<br><br>"""<br> Stack trace of thread 7077:<br> #0  0x000055d25a463842 _lchan_on_mode_modify_failure (osmo-bsc)<br> #1  0x000055d25a46b57c _lchan_on_activation_failure (osmo-bsc)<br> #2  0x00007fe8b2083be4 state_chg (libosmocore.so.17)<br> #3  0x00007fe8b208409d _osmo_fsm_inst_state_chg (libosmocore.so.17)<br> #4  0x000055d25a46825a lchan_fsm_wait_rll_rtp_establish (osmo-bsc)<br> #5  0x00007fe8b2084239 _osmo_fsm_inst_dispatch (libosmocore.so.17)<br> #6  0x00007fe8b2083be4 state_chg (libosmocore.so.17)<br> #7  0x00007fe8b208409d _osmo_fsm_inst_state_chg (libosmocore.so.17)<br> #8  0x000055d25a46dbdc lchan_rtp_fsm_wait_ipacc_mdcx_ack (osmo-bsc)<br> #9  0x00007fe8b2084239 _osmo_fsm_inst_dispatch (libosmocore.so.17)<br> #10 0x000055d25a411d69 abis_rsl_rx_ipacc_mdcx_ack (osmo-bsc)<br>"""<br><br>Related: SYS#5698<br>Change-Id: If8b2895feef6e30f9c1db97394dd16d892b277f2<br>---<br>M src/osmo-bsc/lchan_fsm.c<br>1 file changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/17/26117/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c</span><br><span>index 2f62487..ae7a891 100644</span><br><span>--- a/src/osmo-bsc/lchan_fsm.c</span><br><span>+++ b/src/osmo-bsc/lchan_fsm.c</span><br><span>@@ -97,6 +97,11 @@</span><br><span>  case MODIFY_FOR_ASSIGNMENT:</span><br><span>          LOG_LCHAN(lchan, LOGL_NOTICE, "Signalling Assignment FSM of error (%s)\n",</span><br><span>                           lchan->last_error ? : "unknown error");</span><br><span style="color: hsl(120, 100%, 40%);">+                if (!for_conn) {</span><br><span style="color: hsl(120, 100%, 40%);">+                      LOG_LCHAN(lchan, LOGL_ERROR, "lchan Channel Mode Modify failed, "</span><br><span style="color: hsl(120, 100%, 40%);">+                             "but modify request has no conn\n");</span><br><span style="color: hsl(120, 100%, 40%);">+                      break;</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span>            _osmo_fsm_inst_dispatch(for_conn->assignment.fi, ASSIGNMENT_EV_LCHAN_ERROR, lchan,</span><br><span>                                        file, line);</span><br><span>                 return;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/26117">change 26117</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/osmo-bsc/+/26117"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If8b2895feef6e30f9c1db97394dd16d892b277f2 </div>
<div style="display:none"> Gerrit-Change-Number: 26117 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>