lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2026

  • 1 participants
  • 1894 discussions
[XS] Change in osmo-sgsn[master]: Use osmo_select_main_ctx to support talloc context OTC_SELECT
by lynxis lazus 02 Sep '26

02 Sep '26
Attention is currently required from: daniel, laforge, lynxis lazus, pespin. lynxis lazus has uploaded a new patch set (#3) to the change originally created by daniel. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39703?usp=email ) The following approvals got outdated and were removed: Code-Review+1 by laforge, Code-Review+1 by pespin, Verified+1 by Jenkins Builder Change subject: Use osmo_select_main_ctx to support talloc context OTC_SELECT ...................................................................... Use osmo_select_main_ctx to support talloc context OTC_SELECT The libvlr code is using the OTC_SELECT talloc context. Change-Id: I4b26b73af706ce790181085880c6866e7f7e8c65 --- M src/sgsn/sgsn_main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/03/39703/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39703?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I4b26b73af706ce790181085880c6866e7f7e8c65 Gerrit-Change-Number: 39703 Gerrit-PatchSet: 3 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[XL] Change in osmo-sgsn[master]: add libvlr based on MSC commit 7a628a1029ef174328f7e86183f19e54e5d9df8f
by lynxis lazus 02 Sep '26

02 Sep '26
Attention is currently required from: lynxis lazus. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39560?usp=email to look at the new patch set (#7). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: add libvlr based on MSC commit 7a628a1029ef174328f7e86183f19e54e5d9df8f ...................................................................... add libvlr based on MSC commit 7a628a1029ef174328f7e86183f19e54e5d9df8f The VLR and SGSN shares many of the same procedures. Copy the libvlr from osmo-msc to keep the maintaince lower. Further the libvlr code has a much higher quality than the current SGSN code. Change-Id: I221114e00e6f338a75ae0dd7ac285e262b23635d --- M TODO-RELEASE M configure.ac M include/osmocom/Makefile.am A include/osmocom/vlr/Makefile.am A include/osmocom/vlr/vlr.h A include/osmocom/vlr/vlr_sgs.h M src/Makefile.am A src/libvlr/Makefile.am A src/libvlr/vlr.c A src/libvlr/vlr_access_req_fsm.c A src/libvlr/vlr_access_req_fsm.h A src/libvlr/vlr_auth_fsm.c A src/libvlr/vlr_auth_fsm.h A src/libvlr/vlr_core.h A src/libvlr/vlr_logging.c A src/libvlr/vlr_lu_fsm.c A src/libvlr/vlr_lu_fsm.h A src/libvlr/vlr_sgs.c A src/libvlr/vlr_sgs_fsm.c A src/libvlr/vlr_sgs_fsm.h M src/sgsn/Makefile.am M tests/gprs_routing_area/Makefile.am M tests/sgsn/Makefile.am 23 files changed, 6,896 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/60/39560/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39560?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I221114e00e6f338a75ae0dd7ac285e262b23635d Gerrit-Change-Number: 39560 Gerrit-PatchSet: 7 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: osmith <osmith(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[L] Change in osmo-sgsn[master]: Add Gn support to allow MME->SGSN, SGSN->MME cell reselection
by lynxis lazus 02 Sep '26

02 Sep '26
Attention is currently required from: lynxis lazus. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39563?usp=email to look at the new patch set (#8). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: Add Gn support to allow MME->SGSN, SGSN->MME cell reselection ...................................................................... Add Gn support to allow MME->SGSN, SGSN->MME cell reselection The Gn interface allow to transfer the state of MS/UE between SGSNs and SGSN to MME and vice versa. The code won't use the old key material from the old core network component. Instead it will ask the HLR for new material. FIXUP: go again over the code Change-Id: Iffe83b31db2b6e6869fedf2351375184096cff6f --- M include/osmocom/sgsn/gprs_rau_fsm.h M include/osmocom/sgsn/gtp.h M include/osmocom/sgsn/mmctx.h M include/osmocom/sgsn/pdpctx.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_rau_fsm.c M src/sgsn/mmctx.c M src/sgsn/pdpctx.c M src/sgsn/sgsn_libgtp.c 9 files changed, 928 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/63/39563/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39563?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Iffe83b31db2b6e6869fedf2351375184096cff6f Gerrit-Change-Number: 39563 Gerrit-PatchSet: 8 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[XS] Change in osmo-sgsn[master]: gprs_gmm: Set RAT on the VLR object
by lynxis lazus 02 Sep '26

02 Sep '26
Attention is currently required from: lynxis lazus. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-sgsn/+/43470?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: gprs_gmm: Set RAT on the VLR object ...................................................................... gprs_gmm: Set RAT on the VLR object Will be used in GSUP messages. Change-Id: I66270d07371501afc9e6bc00c654d7612543e0ca --- M src/sgsn/gprs_gmm.c 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/70/43470/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/43470?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I66270d07371501afc9e6bc00c654d7612543e0ca Gerrit-Change-Number: 43470 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[S] Change in osmo-msc[master]: libvlr: auth_fsm: split off fsm creation and start of it
by lynxis lazus 02 Sep '26

02 Sep '26
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/43510?usp=email ) Change subject: libvlr: auth_fsm: split off fsm creation and start of it ...................................................................... libvlr: auth_fsm: split off fsm creation and start of it The auth fsm may destroy itself from a chain of fsm events by VLR_AUTH_E_START. Resulting in an use-after-free of the fsm instance. Change-Id: Ibad920676d9d4a8b7de4a820196385738764ffe9 --- M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_auth_fsm.c M src/libvlr/vlr_auth_fsm.h M src/libvlr/vlr_lu_fsm.c 4 files changed, 20 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index 5d2b7f9..f68e5fc 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -363,12 +363,13 @@ if (is_auth_to_be_attempted(par)) { osmo_fsm_inst_state_chg(fi, PR_ARQ_S_WAIT_AUTH, 0, 0); - vsub->auth_fsm = auth_fsm_start(vsub, fi, + vsub->auth_fsm = auth_fsm_create(vsub, fi, PR_ARQ_E_AUTH_RES, PR_ARQ_E_AUTH_NO_INFO, PR_ARQ_E_AUTH_FAILURE, par->is_r99, par->is_utran); + auth_fsm_start(vsub->auth_fsm); } else { _proc_arq_vlr_node2(fi); } diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c index 192e390..7345037 100644 --- a/src/libvlr/vlr_auth_fsm.c +++ b/src/libvlr/vlr_auth_fsm.c @@ -642,7 +642,7 @@ ***********************************************************************/ /* MSC->VLR: Start Procedure Authenticate_VLR (TS 23.012 Ch. 4.1.2.2) */ -struct osmo_fsm_inst *auth_fsm_start(struct vlr_subscr *vsub, +struct osmo_fsm_inst *auth_fsm_create(struct vlr_subscr *vsub, struct osmo_fsm_inst *parent, uint32_t parent_event_success, uint32_t parent_event_no_auth_info, @@ -676,11 +676,17 @@ fi->priv = afp; vsub->auth_fsm = fi; - osmo_fsm_inst_dispatch(fi, VLR_AUTH_E_START, NULL); - return fi; } +int auth_fsm_start(struct osmo_fsm_inst *fi) +{ + if (fi) + return osmo_fsm_inst_dispatch(fi, VLR_AUTH_E_START, NULL); + + return -ENOENT; +} + bool auth_ciph_sec_ctx_is_usable(const struct vlr_subscr *vsub, uint8_t key_seq) { int max_reuse_count = vsub->vlr->cfg.ciph_sec_ctx_max_reuse; diff --git a/src/libvlr/vlr_auth_fsm.h b/src/libvlr/vlr_auth_fsm.h index 7a45a1a..078960b 100644 --- a/src/libvlr/vlr_auth_fsm.h +++ b/src/libvlr/vlr_auth_fsm.h @@ -29,7 +29,7 @@ VLR_AUTH_E_MS_ID_IMSI, }; -struct osmo_fsm_inst *auth_fsm_start(struct vlr_subscr *vsub, +struct osmo_fsm_inst *auth_fsm_create(struct vlr_subscr *vsub, struct osmo_fsm_inst *parent, uint32_t parent_event_success, uint32_t parent_event_no_auth_info, @@ -37,6 +37,8 @@ bool is_r99, bool is_utran); +int auth_fsm_start(struct osmo_fsm_inst *fi); + void vlr_auth_fsm_init(bool is_ps); void vlr_auth_fsm_set_log_subsys(int log_level); bool auth_try_reuse_tuple(struct vlr_subscr *vsub, uint8_t key_seq); diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index d3aaf3a..e97f19d 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -991,17 +991,22 @@ OSMO_ASSERT(vsub); + /* check if we need to do an authentication, if only ciphering, check if ciphering key is available */ if (try_auth(lfp)) { /* Authenticate_VLR */ osmo_fsm_inst_state_chg(fi, VLR_ULA_S_WAIT_AUTH, LU_TIMEOUT_LONG, 0); - vsub->auth_fsm = auth_fsm_start(lfp->vsub, + /* First only create and assign vsub->auth_fsm, because an auth_fsm_start() might run into a failure + * and the fsm will be free'ed. + */ + vsub->auth_fsm = auth_fsm_create(lfp->vsub, fi, VLR_ULA_E_AUTH_SUCCESS, VLR_ULA_E_AUTH_NO_INFO, VLR_ULA_E_AUTH_FAILURE, lfp->is_r99, lfp->is_utran); + auth_fsm_start(vsub->auth_fsm); } else { /* no need for authentication */ vlr_loc_upd_post_auth(fi); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/43510?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ibad920676d9d4a8b7de4a820196385738764ffe9 Gerrit-Change-Number: 43510 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-msc[master]: libvlr: lu_fsm: split off creation and start of the LU FSM
by lynxis lazus 02 Sep '26

02 Sep '26
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/43511?usp=email ) Change subject: libvlr: lu_fsm: split off creation and start of the LU FSM ...................................................................... libvlr: lu_fsm: split off creation and start of the LU FSM Similar to the auth_fsm, ensure the lu_fsm don't run into a use-after-free when the starting event of VLR_AUTH_E_START result in a terminating. Change-Id: Iafce776bf1755951e525b6f7f2ef929dd31c7c9d --- M include/osmocom/vlr/vlr.h M src/libmsc/gsm_04_08.c M src/libvlr/vlr_lu_fsm.c 3 files changed, 21 insertions(+), 4 deletions(-) Approvals: lynxis lazus: Looks good to me, approved pespin: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/vlr/vlr.h b/include/osmocom/vlr/vlr.h index eac99b0..98ce0be 100644 --- a/include/osmocom/vlr/vlr.h +++ b/include/osmocom/vlr/vlr.h @@ -319,6 +319,8 @@ bool is_r99, bool is_utran, bool assign_tmsi); +int vlr_loc_start(struct osmo_fsm_inst *fi); + struct osmo_fsm_inst * vlr_ra_update(struct osmo_fsm_inst *parent, uint32_t parent_event_success, @@ -335,6 +337,8 @@ bool is_r99, bool is_utran, bool assign_tmsi); +int vlr_ra_start(struct osmo_fsm_inst *fi); + void vlr_loc_update_cancel(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause fsm_cause, uint8_t gsm48_cause); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 6f5e7cd..0347f63 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -419,6 +419,7 @@ osmo_gsm48_classmark1_is_r99(&lu->classmark1), is_utran, net->vlr->cfg.assign_tmsi); + vlr_loc_start(lu_fsm); if (!lu_fsm) { LOG_MSC_A(msc_a, LOGL_ERROR, "Can't start LU FSM\n"); msc_a_put(msc_a, MSC_A_USE_LOCATION_UPDATING); diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index e97f19d..c306ff7 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -1767,11 +1767,17 @@ LOGPFSML(fi, LOGL_ERROR, "Authentication & Ciphering is off on UTRAN network. Good luck.\n"); - osmo_fsm_inst_dispatch(fi, VLR_ULA_E_UPDATE_LA, NULL); - return fi; } +int vlr_loc_start(struct osmo_fsm_inst *fi) +{ + if (fi) + return osmo_fsm_inst_dispatch(fi, VLR_ULA_E_UPDATE_LA, NULL); + + return -ENOENT; +} + struct osmo_fsm_inst * vlr_ra_update(struct osmo_fsm_inst *parent, uint32_t parent_event_success, @@ -1825,11 +1831,17 @@ LOGPFSML(fi, LOGL_ERROR, "Authentication & Ciphering is off on UTRAN network. Good luck.\n"); - osmo_fsm_inst_dispatch(fi, VLR_ULA_E_UPDATE_LA, NULL); - return fi; } +int vlr_ra_start(struct osmo_fsm_inst *fi) +{ + if (fi) + return osmo_fsm_inst_dispatch(fi, VLR_ULA_E_UPDATE_LA, NULL); + + return -ENOENT; +} + void vlr_loc_update_cancel(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause fsm_cause, uint8_t gsm48_cause) -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/43511?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Iafce776bf1755951e525b6f7f2ef929dd31c7c9d Gerrit-Change-Number: 43511 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-msc[master]: libvlr: correct utran warning when no auth is required
by lynxis lazus 02 Sep '26

02 Sep '26
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/43508?usp=email ) Change subject: libvlr: correct utran warning when no auth is required ...................................................................... libvlr: correct utran warning when no auth is required UTRAN requires a valid security context, but there is no need to have an authentication every time if there is a valid security context present. Change-Id: Ia4c5b28b9a6aba387b43b7802ab55565a11a4348 --- M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c 2 files changed, 6 insertions(+), 6 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index 53caae5..b1a75fd 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -716,9 +716,9 @@ (is_ciphering_to_be_attempted ? "+Ciph" : " (no Ciph)") : ""); - if (is_utran && !authentication_required) + if (is_utran && (!authentication_required && !is_ciphering_required)) LOGPFSML(fi, LOGL_ERROR, - "Authentication off on UTRAN network. Good luck.\n"); + "Authentication & Ciphering is off on UTRAN network. Good luck.\n"); switch (mi->type) { case GSM_MI_TYPE_IMSI: diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index e9435e3..f286450 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -1752,9 +1752,9 @@ (is_ciphering_to_be_attempted ? "+Ciph" : " (no Ciph)") : ""); - if (is_utran && !authentication_required) + if (is_utran && (!authentication_required && !is_ciphering_required)) LOGPFSML(fi, LOGL_ERROR, - "Authentication off on UTRAN network. Good luck.\n"); + "Authentication & Ciphering is off on UTRAN network. Good luck.\n"); osmo_fsm_inst_dispatch(fi, VLR_ULA_E_UPDATE_LA, NULL); @@ -1810,9 +1810,9 @@ (is_ciphering_to_be_attempted ? "+Ciph" : " (no Ciph)") : ""); - if (is_utran && !authentication_required) + if (is_utran && (!authentication_required && !is_ciphering_required)) LOGPFSML(fi, LOGL_ERROR, - "Authentication off on UTRAN network. Good luck.\n"); + "Authentication & Ciphering is off on UTRAN network. Good luck.\n"); osmo_fsm_inst_dispatch(fi, VLR_ULA_E_UPDATE_LA, NULL); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/43508?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ia4c5b28b9a6aba387b43b7802ab55565a11a4348 Gerrit-Change-Number: 43508 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-msc[master]: libvlr: rename use_count to auth_use_count
by lynxis lazus 02 Sep '26

02 Sep '26
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/43509?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: libvlr: rename use_count to auth_use_count ...................................................................... libvlr: rename use_count to auth_use_count In preparation to handle use_count for ciphering and auth differently. Change-Id: I20d1b0a6403743c890010e17a63d25d006f471d5 --- M include/osmocom/vlr/vlr.h M src/libmsc/msc_vty.c M src/libvlr/vlr_auth_fsm.c M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_tests.c 8 files changed, 30 insertions(+), 30 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/vlr/vlr.h b/include/osmocom/vlr/vlr.h index d0db4c0..9fe2642 100644 --- a/include/osmocom/vlr/vlr.h +++ b/include/osmocom/vlr/vlr.h @@ -82,7 +82,7 @@ }; struct vlr_auth_tuple { - int use_count; + int auth_use_count; int key_seq; struct osmo_auth_vector vec; }; diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 6fe9bba..ef5c91e 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -1078,7 +1078,7 @@ if (vsub->last_tuple) { struct vlr_auth_tuple *t = vsub->last_tuple; MSC_VTY_DUMP(vty, offset, "A3A8 last tuple (used %d times): %s", - t->use_count, VTY_NEWLINE); + t->auth_use_count, VTY_NEWLINE); MSC_VTY_DUMP(vty, offset + 2, "seq # : %d%s", t->key_seq, VTY_NEWLINE); MSC_VTY_DUMP(vty, offset + 2, "RAND : %s%s", diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c index 76858aa..176ef22 100644 --- a/src/libvlr/vlr_auth_fsm.c +++ b/src/libvlr/vlr_auth_fsm.c @@ -77,7 +77,7 @@ /* Always use either vlr_subscr_get_auth_tuple() or vlr_subscr_has_auth_tuple() * instead, to ensure proper use count. - * Return an auth tuple with the lowest use_count among the auth tuples. If + * Return an auth tuple with the lowest auth_use_count among the auth tuples. If * max_reuse_count >= 0, return NULL if all available auth tuples have a use * count > max_reuse_count. If max_reuse_count is negative, return a currently * least used auth tuple without enforcing a maximum use count. If there are @@ -109,11 +109,11 @@ if (vsub->auth_tuples[idx].key_seq == VLR_KEY_SEQ_INVAL) continue; - if (!at || vsub->auth_tuples[idx].use_count < at->use_count) + if (!at || vsub->auth_tuples[idx].auth_use_count < at->auth_use_count) at = &vsub->auth_tuples[idx]; } - if (!at || (max_reuse_count >= 0 && at->use_count > max_reuse_count)) + if (!at || (max_reuse_count >= 0 && at->auth_use_count > max_reuse_count)) return NULL; return at; @@ -127,7 +127,7 @@ max_reuse_count); if (!at) return NULL; - at->use_count++; + at->auth_use_count++; return at; } @@ -323,7 +323,7 @@ use_umts_aka = vlr_use_umts_aka(&at->vec, afp->is_r99); LOGPFSM(fi, "got auth tuple: use_count=%d key_seq=%d" " -- will use %s AKA (is_r99=%s, at->vec.auth_types=0x%x)\n", - at->use_count, at->key_seq, + at->auth_use_count, at->key_seq, use_umts_aka ? "UMTS" : "GSM", afp->is_r99 ? "yes" : "no", at->vec.auth_types); /* Transmit auth req to subscriber */ @@ -688,10 +688,10 @@ if (!at) return false; - if ((max_reuse_count >= 0) && (at->use_count > max_reuse_count)) + if ((max_reuse_count >= 0) && (at->auth_use_count > max_reuse_count)) return false; if (at->key_seq != key_seq) return false; - at->use_count++; + at->auth_use_count++; return true; } diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c index 98708a4..a3be7b6 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c @@ -144,7 +144,7 @@ vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); OSMO_ASSERT(vsub->last_tuple); - VERBOSE_ASSERT(vsub->last_tuple->use_count, == expected_use_count, "%d"); + VERBOSE_ASSERT(vsub->last_tuple->auth_use_count, == expected_use_count, "%d"); vlr_subscr_put(vsub, __func__); BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req," @@ -189,7 +189,7 @@ vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); OSMO_ASSERT(vsub->last_tuple); - VERBOSE_ASSERT(vsub->last_tuple->use_count, == expected_use_count, "%d"); + VERBOSE_ASSERT(vsub->last_tuple->auth_use_count, == expected_use_count, "%d"); vlr_subscr_put(vsub, __func__); BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req," diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index f9fe60b..4f0be71 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -203,7 +203,7 @@ - Now the auth tuple has use_count == 1 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 1 + vsub->last_tuple->auth_use_count == 1 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -321,7 +321,7 @@ - Now the auth tuple has use_count == 2, as much as is allowed. DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 2 + vsub->last_tuple->auth_use_count == 2 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -723,7 +723,7 @@ - Now the auth tuple has use_count == 1 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 1 + vsub->last_tuple->auth_use_count == 1 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -847,7 +847,7 @@ - Now the auth tuple has use_count == 2, as much as is allowed. DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 2 + vsub->last_tuple->auth_use_count == 2 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -1245,7 +1245,7 @@ - Now the auth tuple has use_count == 1 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 1 + vsub->last_tuple->auth_use_count == 1 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -1363,7 +1363,7 @@ - Now the auth tuple has use_count == 2 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 2 + vsub->last_tuple->auth_use_count == 2 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -1481,7 +1481,7 @@ - Now the auth tuple has use_count == 3 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 3 + vsub->last_tuple->auth_use_count == 3 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -1871,7 +1871,7 @@ - Now the auth tuple has use_count == 1 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 1 + vsub->last_tuple->auth_use_count == 1 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -1995,7 +1995,7 @@ - Now the auth tuple has use_count == 2 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 2 + vsub->last_tuple->auth_use_count == 2 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -2119,7 +2119,7 @@ - Now the auth tuple has use_count == 3 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 3 + vsub->last_tuple->auth_use_count == 3 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -2505,7 +2505,7 @@ - Now the auth tuple has use_count == 1, as much as is allowed. DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 1 + vsub->last_tuple->auth_use_count == 1 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) @@ -2907,7 +2907,7 @@ - Now the auth tuple has use_count == 1, as much as is allowed. DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + _test_auth_reuse: now used by 2 (attached,_test_auth_reuse) - vsub->last_tuple->use_count == 1 + vsub->last_tuple->auth_use_count == 1 DVLR VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - _test_auth_reuse: now used by 1 (attached) diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.c b/tests/msc_vlr/msc_vlr_test_hlr_reject.c index 6cdadcb..bcb5882 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.c +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.c @@ -138,7 +138,7 @@ vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); OSMO_ASSERT(vsub->last_tuple); - VERBOSE_ASSERT(vsub->last_tuple->use_count, == 1, "%d"); + VERBOSE_ASSERT(vsub->last_tuple->auth_use_count, == 1, "%d"); /* no need to look at all auth tuples, the ongoing test would take an * unexpected course if there were more. */ vlr_subscr_put(vsub, __func__); @@ -227,7 +227,7 @@ vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); OSMO_ASSERT(vsub->last_tuple); - VERBOSE_ASSERT(vsub->last_tuple->use_count, == 1, "%d"); + VERBOSE_ASSERT(vsub->last_tuple->auth_use_count, == 1, "%d"); /* no need to look at all auth tuples, the ongoing test would take an * unexpected course if there were more. */ vlr_subscr_put(vsub, __func__); @@ -352,7 +352,7 @@ vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); OSMO_ASSERT(vsub->last_tuple); - VERBOSE_ASSERT(vsub->last_tuple->use_count, == 1, "%d"); + VERBOSE_ASSERT(vsub->last_tuple->auth_use_count, == 1, "%d"); /* no need to look at all auth tuples, the ongoing test would take an * unexpected course if there were more. */ vlr_subscr_put(vsub, __func__); diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.err b/tests/msc_vlr/msc_vlr_test_hlr_reject.err index abb4c03..8a1ee5c 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.err @@ -362,7 +362,7 @@ - Now one auth tuple is available, but used. DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 + test_hlr_rej_auth_info_net_fail_reuse_tuples: now used by 2 (attached,test_hlr_rej_auth_info_net_fail_reuse_tuples) - vsub->last_tuple->use_count == 1 + vsub->last_tuple->auth_use_count == 1 DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 - test_hlr_rej_auth_info_net_fail_reuse_tuples: now used by 1 (attached) @@ -691,7 +691,7 @@ - Now one auth tuple is available, but used. DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 + test_hlr_rej_auth_info_net_fail_no_reuse_tuples: now used by 2 (attached,test_hlr_rej_auth_info_net_fail_no_reuse_tuples) - vsub->last_tuple->use_count == 1 + vsub->last_tuple->auth_use_count == 1 DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 - test_hlr_rej_auth_info_net_fail_no_reuse_tuples: now used by 1 (attached) @@ -958,7 +958,7 @@ - Now one auth tuple is available, but used. DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 + test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples: now used by 2 (attached,test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples) - vsub->last_tuple->use_count == 1 + vsub->last_tuple->auth_use_count == 1 DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 - test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples: now used by 1 (attached) diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index a2f3c85..c609381 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -999,7 +999,7 @@ bool ok = true; btw("sending %s Auth Request for %s: tuple use_count=%d key_seq=%d auth_types=0x%x and...", send_autn? "UMTS" : "GSM", msc_a->c.fi->id, - at->use_count, at->key_seq, at->vec.auth_types); + at->auth_use_count, at->key_seq, at->vec.auth_types); hex = osmo_hexdump_nospc((void*)&at->vec.rand, sizeof(at->vec.rand)); btw("...rand=%s", hex); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/43509?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I20d1b0a6403743c890010e17a63d25d006f471d5 Gerrit-Change-Number: 43509 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-msc[master]: libvlr: allow to use the same key slot for multiple ciphering commands
by lynxis lazus 02 Sep '26

02 Sep '26
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/43480?usp=email ) Change subject: libvlr: allow to use the same key slot for multiple ciphering commands ...................................................................... libvlr: allow to use the same key slot for multiple ciphering commands An established security context can be used multiple times. In difference to re-use of the same auth tuple, which is a serious security flaw, re-using a security context is completely fine as long the context is not used forever. Change-Id: I5c628ef4b43f7c22f62d1405cbe1f717a7918548 --- M include/osmocom/vlr/vlr.h M src/libmsc/msc_vty.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_auth_fsm.c M src/libvlr/vlr_auth_fsm.h M src/libvlr/vlr_lu_fsm.c M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_tests.c 8 files changed, 55 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmocom/vlr/vlr.h b/include/osmocom/vlr/vlr.h index 9fe2642..eac99b0 100644 --- a/include/osmocom/vlr/vlr.h +++ b/include/osmocom/vlr/vlr.h @@ -83,6 +83,7 @@ struct vlr_auth_tuple { int auth_use_count; + int ciph_use_count; int key_seq; struct osmo_auth_vector vec; }; @@ -282,6 +283,8 @@ bool check_imei_rqd; int auth_tuple_max_reuse_count; bool auth_reuse_old_sets_on_error; + /* how often a security context / cksq is re-used before a new auth tuple is used */ + int ciph_sec_ctx_max_reuse; bool parq_retrieve_imsi; bool is_ps; uint8_t nri_bitlen; diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index ef5c91e..a5de12f 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -532,7 +532,9 @@ "Configure authentication tuple re-use\n" "0 to use each auth tuple at most once (default), >0 to limit re-use, -1 to re-use infinitely (vulnerable!).\n") { - gsmnet->vlr->cfg.auth_tuple_max_reuse_count = atoi(argv[0]); + int count = atoi(argv[0]); + gsmnet->vlr->cfg.auth_tuple_max_reuse_count = count; + gsmnet->vlr->cfg.ciph_sec_ctx_max_reuse = count; return CMD_SUCCESS; } diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index b1a75fd..5d2b7f9 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -322,6 +322,11 @@ return; } + if (!auth_ciph_sec_ctx_use(vsub, par->key_seq)) { + LOGPFSML(fi, LOGL_ERROR, "Cannot start ciphering, auth tuple not available, even when it should!\n"); + proc_arq_fsm_done(fi, GSM48_REJECT_NETWORK_FAILURE); + } + if (vlr_set_ciph_mode(vsub->vlr, fi, par->msc_conn_ref, vsub->sec_ctx, vsub->vlr->cfg.retrieve_imeisv_ciphered)) { @@ -341,7 +346,7 @@ * are defined in 3GPP TS 33.102 */ /* For now we use a default value passed in to vlr_lu_fsm(). */ return par->authentication_required || - (par->is_ciphering_to_be_attempted && !auth_try_reuse_tuple(par->vsub, par->key_seq)); + (par->is_ciphering_to_be_attempted && !auth_ciph_sec_ctx_is_usable(par->vsub, par->key_seq)); } /* after the IMSI is known */ @@ -458,6 +463,9 @@ switch (event) { case PR_ARQ_E_AUTH_RES: /* Node 2 */ + OSMO_ASSERT(par->vsub); + OSMO_ASSERT(par->vsub->last_tuple); + par->key_seq = par->vsub->last_tuple->key_seq; _proc_arq_vlr_node2(fi); return; diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c index 176ef22..192e390 100644 --- a/src/libvlr/vlr_auth_fsm.c +++ b/src/libvlr/vlr_auth_fsm.c @@ -681,6 +681,36 @@ return fi; } +bool auth_ciph_sec_ctx_is_usable(const struct vlr_subscr *vsub, uint8_t key_seq) +{ + int max_reuse_count = vsub->vlr->cfg.ciph_sec_ctx_max_reuse; + struct vlr_auth_tuple *at = vsub->last_tuple; + + if (key_seq == 0x7) /* No key available */ + return false; + if (!at) + return false; + if ((max_reuse_count >= 0) && (at->ciph_use_count > max_reuse_count)) + return false; + if (at->key_seq != key_seq) + return false; + + return true; +} + +bool auth_ciph_sec_ctx_use(struct vlr_subscr *vsub, uint8_t key_seq) +{ + struct vlr_auth_tuple *at = vsub->last_tuple; + + if (!auth_ciph_sec_ctx_is_usable(vsub, key_seq)) + return false; + + OSMO_ASSERT(at); + at->ciph_use_count++; + + return true; +} + bool auth_try_reuse_tuple(struct vlr_subscr *vsub, uint8_t key_seq) { int max_reuse_count = vsub->vlr->cfg.auth_tuple_max_reuse_count; diff --git a/src/libvlr/vlr_auth_fsm.h b/src/libvlr/vlr_auth_fsm.h index 1cb25b6..7a45a1a 100644 --- a/src/libvlr/vlr_auth_fsm.h +++ b/src/libvlr/vlr_auth_fsm.h @@ -40,3 +40,5 @@ void vlr_auth_fsm_init(bool is_ps); void vlr_auth_fsm_set_log_subsys(int log_level); bool auth_try_reuse_tuple(struct vlr_subscr *vsub, uint8_t key_seq); +bool auth_ciph_sec_ctx_is_usable(const struct vlr_subscr *vsub, uint8_t key_seq); +bool auth_ciph_sec_ctx_use(struct vlr_subscr *vsub, uint8_t key_seq); diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index f286450..d3aaf3a 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -964,6 +964,12 @@ return; } + if (!auth_ciph_sec_ctx_use(vsub, vsub->last_tuple->key_seq)) { + LOGPFSML(fi, LOGL_ERROR, "Cannot start ciphering, auth tuple not available, even when it should!\n"); + lu_fsm_failure(fi, GSM48_REJECT_NETWORK_FAILURE); + return; + } + if (vlr_set_ciph_mode(vsub->vlr, fi, lfp->msc_conn_ref, vsub->sec_ctx, vsub->vlr->cfg.retrieve_imeisv_ciphered)) { diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c index a3be7b6..a75f4fc 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c @@ -38,6 +38,7 @@ net->authentication_required = true; net->vlr->cfg.assign_tmsi = true; net->vlr->cfg.auth_tuple_max_reuse_count = set_max_reuse_count; + net->vlr->cfg.ciph_sec_ctx_max_reuse = set_max_reuse_count; net->vlr->cfg.auth_reuse_old_sets_on_error = false; rx_from_ran = via_ran; diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index c609381..008edfe 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -679,6 +679,7 @@ net->vlr->cfg.retrieve_imeisv_early = false; net->vlr->cfg.retrieve_imeisv_ciphered = false; net->vlr->cfg.auth_tuple_max_reuse_count = 0; + net->vlr->cfg.ciph_sec_ctx_max_reuse = 0; net->vlr->cfg.auth_reuse_old_sets_on_error = false; rx_from_ran = OSMO_RAT_GERAN_A; -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/43480?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5c628ef4b43f7c22f62d1405cbe1f717a7918548 Gerrit-Change-Number: 43480 Gerrit-PatchSet: 5 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-msc[master]: libvlr: lu_fsm: split off creation and start of the LU FSM
by lynxis lazus 02 Sep '26

02 Sep '26
lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-msc/+/43511?usp=email ) Change subject: libvlr: lu_fsm: split off creation and start of the LU FSM ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/43511?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Iafce776bf1755951e525b6f7f2ef929dd31c7c9d Gerrit-Change-Number: 43511 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 02 Sep 2026 18:47:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • ...
  • 190
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.