[MERGED] libosmocore[master]: auth_milenage: fix check against too large ind

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Mar 16 09:40:22 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: auth_milenage: fix check against too large ind
......................................................................


auth_milenage: fix check against too large ind

To ensure that the IND index appended to SEQ does not affect the SEQ, the check
should read '>= seq_1', not '>'.

Change-Id: Ib1251159eee02aa07fae1b429ffec2e4604bf6a8
---
M src/gsm/auth_milenage.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gsm/auth_milenage.c b/src/gsm/auth_milenage.c
index f151c5e..c1331b5 100644
--- a/src/gsm/auth_milenage.c
+++ b/src/gsm/auth_milenage.c
@@ -94,7 +94,7 @@
 	ind_mask = ~(seq_1 - 1);
 
 	/* the ind index must not affect the SEQ part */
-	if (aud->u.umts.ind > seq_1)
+	if (aud->u.umts.ind >= seq_1)
 		return -3;
 
 	/* keep the incremented SQN local until gsm_milenage() succeeded. */

-- 
To view, visit https://gerrit.osmocom.org/2092
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1251159eee02aa07fae1b429ffec2e4604bf6a8
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list