Change in osmo-sgsn[master]: fix nullpointer: in gsm48_rx_gmm_ra_upd_req()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Sun May 10 22:43:00 UTC 2020


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16744 )

Change subject: fix nullpointer: in gsm48_rx_gmm_ra_upd_req()
......................................................................

fix nullpointer: in gsm48_rx_gmm_ra_upd_req()

This caused frequent crashes at 36c3. The "proper" fix is probably elsewhere
(lynxis mentions an unfinished patch), but at least this prevented some crashes
during active operation.

Once this is merged, we can (re)enable SGSN_Tests_Iu.TC_geran_attach_iu_rau,
which tests exactly for this scenario:  A Subscriber / MM context that is so
far attached via GERAN, but now receives a RAU via UTRAN/Iu.

Closes: OS#4339
Change-Id: Ifde15dc4151d84748f0e67b32c9c260cb2d9d8fc
---
M src/sgsn/gprs_gmm.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  neels: Looks good to me, approved



diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c
index 03ff513..0391229 100644
--- a/src/sgsn/gprs_gmm.c
+++ b/src/sgsn/gprs_gmm.c
@@ -1682,7 +1682,7 @@
 	rate_ctr_inc(&mmctx->ctrg->ctr[GMM_CTR_PKTS_SIG_IN]);
 
 	/* Update the MM context with the new RA-ID */
-	if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) {
+	if (mmctx->ran_type == MM_CTX_T_GERAN_Gb && msgb_bcid(msg)) {
 		bssgp_parse_cell_id(&mmctx->ra, msgb_bcid(msg));
 		/* Update the MM context with the new (i.e. foreign) TLLI */
 		mmctx->gb.tlli = msgb_tlli(msg);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16744
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ifde15dc4151d84748f0e67b32c9c260cb2d9d8fc
Gerrit-Change-Number: 16744
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-CC: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200510/2b1c19b7/attachment.htm>


More information about the gerrit-log mailing list