[PATCH] osmo-msc[master]: fix: clear vlr_subscr->msc_conn_ref when the conn is discarded

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 Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Mar 9 16:16:03 UTC 2018


fix: clear vlr_subscr->msc_conn_ref when the conn is discarded

Before this, it was for example possible to crash the MSC by the vty 'show
subscriber' command, which would dereference a potentially stale
vsub->msc_conn_ref pointer.

Related: OS#3050
Change-Id: Ia4105d9f135ba3216ad3c86157be7658b1d568fb
---
M src/libmsc/osmo_msc.c
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/76/7176/2

diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c
index 1478c19..e9a3c5b 100644
--- a/src/libmsc/osmo_msc.c
+++ b/src/libmsc/osmo_msc.c
@@ -229,6 +229,7 @@
 		       vlr_subscr_name(conn->vsub));
 		msc_subscr_cleanup(conn->vsub);
 		vlr_subscr_put(conn->vsub);
+		conn->vsub->msc_conn_ref = NULL;
 		conn->vsub = NULL;
 	} else
 		DEBUGP(DRLL, "Freeing subscriber connection"

-- 
To view, visit https://gerrit.osmocom.org/7176
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia4105d9f135ba3216ad3c86157be7658b1d568fb
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list