aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@wtl.be>2017-07-05 12:34:18 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-27 03:52:45 +0200
commit79a8961ada312d245ed177b31f9da0deb76e106a (patch)
treed27790e33c5686ae0cc2ecfdadd7a8c24b1e29e4 /src
parente3dbd5d33a75ea363f4c64bb926b961349055df1 (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 'src')
-rw-r--r--src/libmsc/transaction.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c
index 7289a8f11..28e0914a8 100644
--- a/src/libmsc/transaction.c
+++ b/src/libmsc/transaction.c
@@ -88,6 +88,13 @@ struct gsm_trans *trans_alloc(struct gsm_network *net,
DEBUGP(DCC, "subscr=%p, net=%p\n", vsub, net);
+ /* a valid subscriber is indispensable */
+ if (vsub == NULL) {
+ LOGP(DCC, LOGL_NOTICE,
+ "unable to alloc transaction, invalid subscriber (NULL)\n");
+ return NULL;
+ }
+
trans = talloc_zero(tall_trans_ctx, struct gsm_trans);
if (!trans)
return NULL;