57 Commits (6bea1814c9cebc35639f7ba0027750e370aada4d)

Author SHA1 Message Date
Pedro Alvarez 983ba4a3ab Strating to change prints in the HSS. 6 years ago
yagoda 94ec379f68 Small commit to test changes in prints. 6 years ago
Pedro Alvarez 8dc029cc47 Merging next into NAS cleanup. 6 years ago
Zhe Huang 8b526e1c20 Fix SQN incrementation arithmetic (#212)
* Fix SQN incrementation arithmetic

Current implementation of increment_sqn function increments the 48 bits
SQN directly by 1 which is incorrect according to 3GPP TS 33.102 version
11.5.1 Annex C. This bug causes commercial UEs to report AUTHENTICATION
FAILURE EMM cause #21 "synch failure" when SQN is out of sync.

According to 3GPP TS 33.102 version 11.5.1 Annex C, 48 bits SQN consists
of 43 bits SEQ and 5 bits IND parts where SEQ are incremented during
generation of authentication vector or resync procedure. A
new IND value is also assigned when an authentication vector is
generated. However, resync procedure will use the same IND value.

This patch implements the increment_sqn function according to 3GPP TS
33.102 version 11.5.1 Annex C. A new function increment_seq_after_resync
is added to handle the special case of SQN arithmetic during SQN
resynchronization.

This patch is tested with two comercial UEs (Oneplus One and Oneplus 3T).

* Fix the maximum value of SEQ value to be 2^43-1

The SEQ value is 43 bits long and previous maximum value has a typo (one
extra F) which allows SEQ value to be 2^47-1. This patch corrects the typo.
6 years ago
Zhe Huang cd1fb0d81e Set AMF to all zeros during resync (#213)
During the resync procedure, the security_milenage_f1_star generates a
MAC_S value that does not match the MAC_S value reported in AUTS. This
posts a security risk.

According to 3GPP TS 33.102 version 11.5.1 section 6.3.3, the AMF used
to calculate MAC-S assumes a dummy value of all zeros so that it does
not need to be transmitted in the clear in the re-synch message.

This patch corrects this problem. MAC_S reported by AUTS matches the
MAC_S calculated using f1_star function after the fix.
6 years ago
Pedro Alvarez 4313fb1e72 Making sure M-TMSI is in host order in other small bug fixes. 6 years ago
Pedro Alvarez 66757573c1 Making sure that QCI helper comments in user_dg.csv stay when file is overwritten. 7 years ago
Pedro Alvarez 66db3deeb4 Starting to add Bearer QoS parameter to create session request. 7 years ago
Pedro Alvarez f9e3d3a1f7 Added mechanisms to read and write QCI from/to user_db.csv. 7 years ago
Pedro Alvarez f301bb6373 Merging next into op_vs_opc and resolving conflicts. 7 years ago
Pedro Alvarez ad1d32333b Fixing up user_db.csv comments and default values. 7 years ago
Pedro Alvarez 8df7a1b1af Change some debug prints. 7 years ago
Pedro Alvarez 6a32b5b047 Starting to separate the increment of SQN into a seperate function. 7 years ago
Pedro Alvarez b9c50a93a8 Fixed bug in writing OPc into user_db.csv. 7 years ago
Pedro Alvarez bd39d8bac2 Fixed bug in getting OPc. Removed debug print. Fixed test12345. UE is still having re-synch issues. 7 years ago
Pedro Alvarez e9c3b4c8ce Added OPc suport on EPC. 7 years ago
Pedro Alvarez 0d61011d13 Changing user_db.csv to allow users to choose OP/OPc. 7 years ago
Pedro Alvarez a839817790 Starting to add OPc option to HSS. 7 years ago
Pedro Alvarez f87f659874 Whitespaces and comment fixes. 7 years ago
Andre Puschmann 319f473363 fix remaining printf warnings 7 years ago
David Rupprecht 06d4559294 Change include path absolut to project dir 7 years ago
Andre Puschmann ded550b793 remove unneeded boost includes 7 years ago
Pedro Alvarez f4f8f746da Merging changes from epc branch into guti_attach branch. 7 years ago
Pedro Alvarez 094e4a6f8e Merge branch 'next' into epc 7 years ago
David Rupprecht 52e7082aee Small bug fixes, debug print. MAC f1_star does not work 7 years ago
David Rupprecht 5db5399b2f Added HSS sync support (not tested) 7 years ago
David Rupprecht 9f3d14cfab Increment sqn 7 years ago
David Rupprecht 9f5affb6c7 Clean up file 7 years ago
David Rupprecht 5666d3021d Write sqn and user context back to db file 7 years ago
David Rupprecht 7476b2f896 Beautiful IMSI output 7 years ago
David Rupprecht 1aced47d6a Making the SQN readable from the csv database file 7 years ago
Pedro Alvarez 628ccec07f Removed boost::mutex from EPC 7 years ago
David Rupprecht 9f4e8c0632 Fixed MAC failure due to wrong size and xor debug prints 7 years ago
David Rupprecht ab2fe19704 Add more debug logging into hss 7 years ago
David Rupprecht b1cabf8117 Made MCC and MNC in HSS configurable (not tested) 7 years ago
Pedro Alvarez 9dc0d9bac9 Merge branch 'epc_fixes' into epc 7 years ago
Andre Puschmann b04d49abd3 fix logging 7 years ago
Pedro Alvarez 75f14e57f4 Merge branch 'epc_fixes' into epc 7 years ago
Andre Puschmann 0d5c110246 specify flags when opening UE db 7 years ago
Andre Puschmann 1efc4e678a print error msg when UE DB wasn't found 7 years ago
Pedro Alvarez cbc1e24e7e Cleaning up logging and printing. 7 years ago
Pedro Alvarez a8f268c55b Added cleanup functionality to the hss. 7 years ago
Pedro Alvarez 9a0b883296 Added XOR support the the HSS. 7 years ago
Pedro Alvarez aef328d68b Added the ability to the HSS to be configured through a .csv. 7 years ago
Pedro Alvarez eba3837ab4 Changing the logging a bit. 7 years ago
Pedro Alvarez 468b0f2581 Fixed some issues with the MME and HSS logging. 7 years ago
Pedro Alvarez bb85525ad2 Fixed bug on network authentication. 7 years ago
Pedro Alvarez 5d4f0b3dfb deleting debug code 7 years ago
Pedro Alvarez 473e252168 Generating AUTN correctly. UE considers the network valid now. Starting to handle authentication response. 7 years ago
Pedro Alvarez 25aa394086 Adding some debug code. 7 years ago