summaryrefslogtreecommitdiffstats
path: root/msc
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-06-25 17:44:57 +0200
committerStefan Sperling <ssperling@sysmocom.de>2018-06-25 17:51:30 +0200
commit04fc4bcc18bd2aa9d81f63576134c0ccbd1a6a0b (patch)
treeb5a4ae8005298f746cde223666d00b968d7f4867 /msc
parentb0ad3d8490421c7b60b7070c652c06980a2e31b4 (diff)
check for osmo-msc crash upon overlong IMSI
Overlong IMSIs used to trigger an assertion failure in osmo-msc. This problem has been fixed but there was no test for it yet. A lazy way of testing for this problem is to send an overlong IMSI from an existing test which already verifies related behaviour and would fail if the MSC crashed: TC_lu_by_tmsi_noauth_unknown However, osmo-msc currently accepts overlong IMSIs and silently truncates them, so this change as-is currently breaks this test. But I would argue that osmo-msc's current behaviour is unreasonable anyway and have proposed a patch to change it: https://gerrit.osmocom.org/#/c/osmo-msc/+/9739/ With that patch applied to osmo-msc, this test keeps passing. Change-Id: I2c472bee76086f6c84ec684d2e58b3351ebc3147 Depends: I785c994f41a646d8d83d3d82f5a9ae6b572eb641 Related: OS#2864 Related: g#9739
Diffstat (limited to 'msc')
-rw-r--r--msc/MSC_Tests.ttcn3
1 files changed, 3 insertions, 0 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index dc5303e..dc3ad1e 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -807,6 +807,8 @@ testcase TC_lu_by_imei() runs on MTC_CT {
/* Test LU by TMSI with unknown TMSI, expect (and answer) ID REQ. */
private function f_tc_lu_tmsi_noauth_unknown(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
+ /* We piggyback a test for an MSC crash on overlong IMSI (OS#2864) onto this test. */
+ var hexstring overlong_imsi := '012345789ABCDEF0123456789ABCDEF'H;
f_init_handler(pars);
var PDU_ML3_MS_NW l3_lu := f_build_lu_tmsi('01020304'O); /* FIXME: Random */
@@ -823,6 +825,7 @@ private function f_tc_lu_tmsi_noauth_unknown(charstring id, BSC_ConnHdlrPars par
/* Wait for + respond to ID REQ (IMSI) */
BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_ID_Req('001'B)));
+ BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_MM_ID_Rsp_IMSI(overlong_imsi))); /* test for OS#2864 */
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_MM_ID_Rsp_IMSI(g_pars.imsi)));
/* Expect MSC to do UpdateLocation to HLR; respond to it */