path: root/openbsc/src/libmsc
diff options
authorBenoit Bolsee <>2017-07-05 12:34:18 +0200
committerPhilipp Maier <>2017-07-11 00:39:02 +0200
commite1b3bb1629c9259ed4e1dd4eb16a06ca49a9600f (patch)
treedf8eda46ca92029734ae997223ce258201a4b96f /openbsc/src/libmsc
parent2d254cca1021d4b12dbb7651eff862464209bcae (diff)
transaction: reject calls from unidentified subscribers
A valid subscriber is indespensible when allocating a new transaction. Return NULL if no subscriber is supplied. This will cause unidentified subscribers to be rejected. Note: Under normal conditions, the problem does not occour, but it is still possible that a misbehaving MS might trigger the problem by sending a SETUP command before authenticating the subscriber. (unencrypted networks) Change-Id: Ia8739b6e329ab02c0064270d02ad1d6ee245520d
Diffstat (limited to 'openbsc/src/libmsc')
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/transaction.c b/openbsc/src/libmsc/transaction.c
index dba4bed17..4b46e22ae 100644
--- a/openbsc/src/libmsc/transaction.c
+++ b/openbsc/src/libmsc/transaction.c
@@ -70,6 +70,13 @@ struct gsm_trans *trans_alloc(struct gsm_network *net,
DEBUGP(DCC, "subscr=%p, net=%p\n", subscr, net);
+ /* a valid subscriber is indispensable */
+ if (subscr == NULL) {
+ "unable to alloc transaction, invalid subscriber (NULL)\n");
+ return NULL;
+ }
trans = talloc_zero(tall_trans_ctx, struct gsm_trans);
if (!trans)
return NULL;