Osmocom Mobile Switching Centre
Go to file
Neels Hofmeyr 3117b701c8 A5/n Ciph: request Classmark Update if missing
When the VLR requests a Ciphering Mode with vlr_ops.set_ciph_mode(), and if we
need a ciph algo flag from a Classmark information that is not yet known
(usually CM 2 during LU), send a BSSMAP Classmark Request to get it.

To manage the intermission of the Classmark Request, add
- msc_classmark_request_then_cipher_mode_cmd(),
- state SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE,
- event SUBSCR_CONN_E_CLASSMARK_UPDATE.

From state AUTH_CIPH, switch to state WAIT_CLASSMARK_UPDATE. Once the BSSMAP
Classmark Response, is received, switch back to SUBSCR_CONN_S_AUTH_CIPH and
re-initiate Ciphering Mode.

To be able to re-enter the Ciphering Mode algo decision, factor it out into
msc_geran_set_cipher_mode().

Rationale:

In the following commit, essentially we stopped supporting A5/3 ciphering:

commit 71330720b6
"MSC: Intersect configured A5 algorithms with MS-supported ones"
Change-Id: Id124923ee52a357cb7d3e04d33f585214774f3a3

A5/3 was no longer supported because from that commit on, we strictly checked
the MS-supported ciphers, but we did not have Classmark 2 available during
Location Updating.

This patch changes that: when Classmark 2 is missing, actively request it by a
BSSMAP Classmark Request; continue Ciphering only after the Response. Always
request missing Classmark, even if a lesser cipher were configured available.

If the Classmark Update response fails to come in, cause an attach failure.
Instead, we could attempt to use a lesser cipher that is also enabled. That is
left as a future feature, should that become relevant. I think it's unlikely.

Technically, we could now end up requesting a Classmark Updating both during LU
(vlr_lu_fsm) and CM Service/Paging Response (proc_arq_fsm), but in practice the
only time we lack a Classmark is: during Location Updating with A5/3 enabled.
A5/1 support is indicated in CM1 which is always available, and A5/3 support is
indicated in CM2, which is always available during CM Service Request as well
as Paging Response. So this patch has practical relevance only for Location
Updating. For networks that permit only A5/3, this patch fixes Location
Updating. For networks that support A5/3 and A5/1, so far we always used A5/1
during LU, and after this patch we request CM2 and likely use A5/3 instead.

In msc_vlr_test_gsm_ciph, verify that requesting Classmark 2 for A5/3 works
during LU. Also verify that the lack of a Classmark Response results in attach
failure.

In msc_vlr_test_gsm_ciph, a hacky unit test fakes a situation where a CM2 is
missing during proc_arq_fsm and proves that that code path works, even though
the practical relevance is currently zero. It would only become interesting if
ciphering algorithms A5/4 and higher became relevant, because support of those
would be indicated in Classmark 3, which would always require a Classmark
Request.

Related: OS#3043
Depends: I4a2e1d3923e33912579c4180aa1ff8e8f5abb7e7 (libosmocore)
Change-Id: I73c7cb6a86624695bd9c0f59abb72e2fdc655131
2018-09-17 02:08:07 +02:00
contrib Install systemd services with autotools 2018-09-10 16:10:06 +02:00
debian Install sample cfg file to /etc/osmocom 2018-09-12 18:49:29 +02:00
doc Install sample cfg file to /etc/osmocom 2018-09-12 18:49:29 +02:00
include A5/n Ciph: request Classmark Update if missing 2018-09-17 02:08:07 +02:00
m4 move openbsc/* to repos root 2017-07-12 23:17:10 +00:00
src A5/n Ciph: request Classmark Update if missing 2018-09-17 02:08:07 +02:00
tests A5/n Ciph: request Classmark Update if missing 2018-09-17 02:08:07 +02:00
.gitignore Remove local libgsupclient; Use libosmo-gsup-client from osmo-hlr 2018-08-05 11:20:21 +02:00
.gitreview update .gitreview to new repo url 2017-08-08 17:26:28 +02:00
.mailmap add .mailmap file for mapping git author name/mail in shortlog 2016-08-08 17:40:28 +00:00
AUTHORS move openbsc/* to repos root 2017-07-12 23:17:10 +00:00
COPYING move openbsc/* to repos root 2017-07-12 23:17:10 +00:00
Makefile.am Install systemd services with autotools 2018-09-10 16:10:06 +02:00
README rewrite README 2017-09-06 16:33:41 +02:00
README.vty-tests Remove obsolete ./configure option 2017-11-29 14:24:54 +00:00
configure.ac Install systemd services with autotools 2018-09-10 16:10:06 +02:00
git-version-gen git-version-gen: Don't check for .git directory 2018-07-24 18:05:46 +02:00
osmoappdesc.py doc/examples: add detailed cs7 config examples 2017-09-07 03:10:36 +02:00

README

About OsmoMSC
=============

OsmoMSC originated from the OpenBSC project, which started as a minimalistic
all-in-one implementation of the GSM Network. In 2017, OpenBSC had reached
maturity and diversity (including M3UA SIGTRAN and 3G support in the form of
IuCS and IuPS interfaces) that naturally lead to a separation of the all-in-one
approach to fully independent separate programs as in typical GSM networks.

OsmoMSC was one of the parts split off from the old openbsc.git. Before, it was
the libmsc part of the old OsmoNITB. Since a true A interface and IuCS for 3G
support is available, OsmoMSC exists only as a separate standalone entity.

OsmoMSC exposes
- GSUP towards OsmoHLR (or a MAP proxy);
- A over IP towards a BSC (e.g. OsmoBSC);
- IuCS towards an RNC or HNB-GW (e.g. OsmoHNBGW) for 3G voice;
- MNCC (Mobile Network Call Control derived from GSM TS 04.07);
- SMPP 3.4 (Short Message Peer-to-Peer);
- The Osmocom typical telnet VTY and CTRL interfaces.

Find OsmoMSC issue tracker and wiki online at
https://osmocom.org/projects/osmomsc
https://osmocom.org/projects/osmomsc/wiki