aligungr / UERANSIM

Open source 5G UE and RAN (gNodeB) implementation.
GNU General Public License v3.0
760 stars 315 forks source link

Security Mode Command integrity check failed #532

Open avakash-malaviya opened 2 years ago

avakash-malaviya commented 2 years ago

Trying roaming scenario and configured similar Ki and OPC value in Core side.If i change imsi value to "315010000000003" its working fine (same as PLMN mcc and mnc)

[2022-06-23 10:25:18.574] [nas] [info] UE switches to state [MM-DEREGISTERED/PS] [2022-06-23 10:25:18.574] [nas] [info] Performing local release of NAS connection [2022-06-23 10:25:18.574] [nas] [info] UE switches to state [MM-DEREGISTERED/ATTEMPTING-REGISTRATION] [2022-06-23 10:25:18.574] [rrc] [info] UE switches to state [RRC-IDLE] [2022-06-23 10:25:18.575] [nas] [info] UE switches to state [CM-IDLE] [2022-06-23 10:25:28.584] [nas] [debug] NAS timer[3511] expired [1] [2022-06-23 10:25:28.584] [nas] [debug] Initial registration required due to [T3511-EXPIRY-IN-ATT-REG] [2022-06-23 10:25:28.584] [nas] [debug] UAC access attempt is allowed for identity[0], category[MO_sig] [2022-06-23 10:25:28.584] [nas] [debug] Sending Initial Registration [2022-06-23 10:25:28.584] [nas] [debug] Deleting NAS security context [2022-06-23 10:25:28.584] [nas] [info] UE switches to state [MM-REGISTER-INITIATED] [2022-06-23 10:25:28.584] [rrc] [debug] Sending RRC Setup Request [2022-06-23 10:25:28.586] [rrc] [info] RRC connection established [2022-06-23 10:25:28.586] [rrc] [info] UE switches to state [RRC-CONNECTED] [2022-06-23 10:25:28.586] [nas] [info] UE switches to state [CM-CONNECTED] [2022-06-23 10:25:28.925] [nas] [debug] Authentication Request received [2022-06-23 10:25:28.935] [nas] [debug] Security Mode Command received [2022-06-23 10:25:28.935] [nas] [error] Security Mode Command integrity check failed [2022-06-23 10:25:28.935] [nas] [error] Rejecting Security Mode Command with cause [SEC_MODE_REJECTED_UNSPECIFIED]

avakash-malaviya commented 2 years ago

IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 digits)

supi: 'imsi-317011000000003'

Mobile Country Code value of HPLMN

mcc: '315'

Mobile Network Code value of HPLMN (2 or 3 digits)

mnc: '010'

Permanent subscription key

key: '8baf473f2f8fd09487cccbd7097c6862'

Operator code (OP or OPC) of the UE

op: '8e27b6af0e692e750f32667a3b14605d'

This value specifies the OP type and it can be either 'OP' or 'OPC'

opType: 'OPC'

Authentication Management Field (AMF) value

amf: '8000'

IMEI number of the device. It is used if no SUPI is provided

imei: '208930000000003'

IMEISV number of the device. It is used if no SUPI and IMEI is provided

imeiSv: '4370816125816151'

List of gNB IP addresses for Radio Link Simulation

gnbSearchList:

UAC Access Identities Configuration

uacAic: mps: false mcs: false

UAC Access Control Class

uacAcc: normalClass: 0 class11: false class12: false class13: false class14: false class15: false

Initial PDU sessions to be established

sessions:

Configured NSSAI for this UE by HPLMN

configured-nssai:

Default Configured NSSAI for this UE

default-nssai:

Supported integrity algorithms by this UE

integrity: IA1: true IA2: true IA3: true

Supported encryption algorithms by this UE

ciphering: EA1: true EA2: true EA3: true

Integrity protection maximum data rate for user plane

integrityMaxRate: uplink: 'full' downlink: 'full'