Hello community, here is the log from the commit of package osmo-msc for openSUSE:Factory checked in at 2020-01-10 17:49:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/osmo-msc (Old) and /work/SRC/openSUSE:Factory/.osmo-msc.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "osmo-msc" Fri Jan 10 17:49:18 2020 rev:4 rq:762582 version:1.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/osmo-msc/osmo-msc.changes 2020-01-09 22:50:18.498700684 +0100 +++ /work/SRC/openSUSE:Factory/.osmo-msc.new.6675/osmo-msc.changes 2020-01-10 17:49:20.786137103 +0100 @@ -1,0 +2,9 @@ +Thu Jan 9 22:16:22 UTC 2020 - Martin Hauke <[email protected]> + +- Update to new upstream release 1.6.1 + Bugfix release: + * libmsc/gsm_04_08.c: fix: verify MI before calling + vlr_subscr_rx_id_resp() + * vlr.c: fix condition to check MSISDN presence + +------------------------------------------------------------------- Old: ---- osmo-msc-1.6.0.tar.xz New: ---- osmo-msc-1.6.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ osmo-msc.spec ++++++ --- /var/tmp/diff_new_pack.VpGOEw/_old 2020-01-10 17:49:21.690136942 +0100 +++ /var/tmp/diff_new_pack.VpGOEw/_new 2020-01-10 17:49:21.694136941 +0100 @@ -20,7 +20,7 @@ %define with_iu 1 %define _lto_cflags %{nil} Name: osmo-msc -Version: 1.6.0 +Version: 1.6.1 Release: 0 Summary: Osmocom's MSC for 2G and 3G circuit-switched mobile networks License: AGPL-3.0-or-later AND GPL-2.0-only ++++++ _service ++++++ --- /var/tmp/diff_new_pack.VpGOEw/_old 2020-01-10 17:49:21.714136937 +0100 +++ /var/tmp/diff_new_pack.VpGOEw/_new 2020-01-10 17:49:21.714136937 +0100 @@ -2,8 +2,8 @@ <service name="tar_scm" mode="disabled"> <param name="scm">git</param> <param name="url">git://git.osmocom.org/osmo-msc</param> - <param name="parent-tag">1.6.0</param> - <param name="versionformat">1.6.0</param> + <param name="parent-tag">1.6.1</param> + <param name="versionformat">1.6.1</param> </service> <service name="recompress" mode="disabled"> <param name="file">*.tar</param> ++++++ osmo-msc-1.6.0.tar.xz -> osmo-msc-1.6.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-msc-1.6.0/debian/changelog new/osmo-msc-1.6.1/debian/changelog --- old/osmo-msc-1.6.0/debian/changelog 2020-01-03 18:51:37.000000000 +0100 +++ new/osmo-msc-1.6.1/debian/changelog 2020-01-09 12:29:08.000000000 +0100 @@ -1,3 +1,14 @@ +osmo-msc (1.6.1) unstable; urgency=medium + + [ Vadim Yanitskiy ] + * libmsc/gsm_04_08.c: fix: verify MI before calling vlr_subscr_rx_id_resp() + + [ Neels Hofmeyr ] + * vlr_gsup_rx: fix uninitialized rc + * vlr.c: fix condition to check MSISDN presence + + -- Pau Espin Pedrol <[email protected]> Thu, 09 Jan 2020 12:29:08 +0100 + osmo-msc (1.6.0) unstable; urgency=medium [ Philipp Maier ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-msc-1.6.0/include/osmocom/msc/msc_a.h new/osmo-msc-1.6.1/include/osmocom/msc/msc_a.h --- old/osmo-msc-1.6.0/include/osmocom/msc/msc_a.h 2020-01-03 18:51:37.000000000 +0100 +++ new/osmo-msc-1.6.1/include/osmocom/msc/msc_a.h 2020-01-09 12:29:08.000000000 +0100 @@ -99,6 +99,9 @@ /* After Ciphering Mode Complete on GERAN, this reflects the chosen ciphering algorithm and key */ struct geran_encr geran_encr; + /* Type of MI requested in MM Identity Request */ + uint8_t mm_id_req_type; + /* N(SD) expected in the received frame, per flow (TS 24.007 11.2.3.2.3.2.2) */ uint8_t n_sd_next[4]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-msc-1.6.0/src/libmsc/gsm_04_08.c new/osmo-msc-1.6.1/src/libmsc/gsm_04_08.c --- old/osmo-msc-1.6.0/src/libmsc/gsm_04_08.c 2020-01-03 18:51:37.000000000 +0100 +++ new/osmo-msc-1.6.1/src/libmsc/gsm_04_08.c 2020-01-09 12:29:08.000000000 +0100 @@ -182,6 +182,7 @@ struct gsm48_hdr *gh = msgb_l3(msg); uint8_t *mi = gh->data+1; uint8_t mi_len = gh->data[0]; + uint8_t mi_type; struct vlr_subscr *vsub = msc_a_vsub(msc_a); if (!vsub) { @@ -190,6 +191,28 @@ return -EINVAL; } + /* There muct be at least one octet with MI type */ + if (!mi_len) { + LOGP(DMM, LOGL_NOTICE, "MM Identity Response contains " + "malformed Mobile Identity\n"); + return -EINVAL; + } + + /* Make sure we got what we expected */ + mi_type = mi[0] & GSM_MI_TYPE_MASK; + if (mi_type == GSM_MI_TYPE_NONE) { + LOGP(DMM, LOGL_NOTICE, "MM Identity Response contains no identity, " + "perhaps the MS has no Mobile Identity type %s?\n", + gsm48_mi_type_name(msc_a->mm_id_req_type)); + return -EINVAL; + } else if (mi_type != msc_a->mm_id_req_type) { + LOGP(DMM, LOGL_NOTICE, "MM Identity Response contains unexpected " + "Mobile Identity type %s (extected %s)\n", + gsm48_mi_type_name(mi_type), + gsm48_mi_type_name(msc_a->mm_id_req_type)); + return -EINVAL; + } + DEBUGP(DMM, "IDENTITY RESPONSE: MI=%s\n", osmo_mi_name(mi, mi_len)); osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_IDENTITY, gh->data); @@ -1182,8 +1205,17 @@ tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); mi = TLVP_GET(&tp, GSM48_IE_MOBILE_ID); + /* IMEI(SV) is optional for this message */ if (!mi) return 0; + if (!mi->len) + return -EINVAL; + if ((mi->val[0] & GSM_MI_TYPE_MASK) != GSM_MI_TYPE_IMEISV) { + LOGP(DMM, LOGL_ERROR, "RR Ciphering Mode Complete contains " + "unexpected Mobile Identity type %s\n", + gsm48_mi_type_name(mi->val[0] & GSM_MI_TYPE_MASK)); + return -EINVAL; + } LOG_MSC_A(msc_a, LOGL_DEBUG, "RR Ciphering Mode Complete contains Mobile Identity: %s\n", osmo_mi_name(mi->val, mi->len)); @@ -1287,6 +1319,10 @@ static int msc_vlr_tx_id_req(void *msc_conn_ref, uint8_t mi_type) { struct msc_a *msc_a = msc_conn_ref; + + /* Store requested MI type, so we can check the response */ + msc_a->mm_id_req_type = mi_type; + return mm_tx_identity_req(msc_a, mi_type); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-msc-1.6.0/src/libvlr/vlr.c new/osmo-msc-1.6.1/src/libvlr/vlr.c --- old/osmo-msc-1.6.0/src/libvlr/vlr.c 2020-01-03 18:51:37.000000000 +0100 +++ new/osmo-msc-1.6.1/src/libvlr/vlr.c 2020-01-09 12:29:08.000000000 +0100 @@ -784,7 +784,7 @@ unsigned idx; int rc; - if (gsup_msg->msisdn_enc) {//FIXME: vlr_subscr_set_msisdn()? + if (gsup_msg->msisdn_enc_len) {//FIXME: vlr_subscr_set_msisdn()? gsm48_decode_bcd_number2(vsub->msisdn, sizeof(vsub->msisdn), gsup_msg->msisdn_enc, gsup_msg->msisdn_enc_len, 0); @@ -1069,7 +1069,7 @@ { struct vlr_instance *vlr = data; struct vlr_subscr *vsub; - int rc; + int rc = 0; vsub = vlr_subscr_find_by_imsi(vlr, gsup->imsi, __func__); if (!vsub) {
