Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong KSI in Registration update #725

Open
gstaa opened this issue Aug 19, 2024 · 0 comments
Open

Wrong KSI in Registration update #725

gstaa opened this issue Aug 19, 2024 · 0 comments

Comments

@gstaa
Copy link

gstaa commented Aug 19, 2024

UERANSIM sends Registration update which is not handled as update by open5gs AMF due to wrong KSI. Such an update is handled as an initial registration (NAS message container is omitted).

Bug:

UE sends registration update with KSI set to 7 (no key is available).

Expected behavior:

UE shall use existing security context (provided by Security mode command) for sending registration update (set KSI to 1).

UE logs:

UERANSIM v3.2.6
[2024-08-19 10:24:04.077] [nas] [info] UE switches to state [MM-DEREGISTERED/PLMN-SEARCH]
[2024-08-19 10:24:04.078] [rrc] [debug] New signal detected for cell[1], total [1] cells in coverage
[2024-08-19 10:24:04.081] [nas] [info] Selected plmn[001/01]
[2024-08-19 10:24:04.081] [rrc] [info] Selected cell plmn[001/01] tac[1] category[SUITABLE]
[2024-08-19 10:24:04.081] [nas] [info] UE switches to state [MM-DEREGISTERED/PS]
[2024-08-19 10:24:04.081] [nas] [info] UE switches to state [MM-DEREGISTERED/NORMAL-SERVICE]
[2024-08-19 10:24:04.081] [nas] [debug] Initial registration required due to [MM-DEREG-NORMAL-SERVICE]
[2024-08-19 10:24:04.081] [nas] [debug] UAC access attempt is allowed for identity[0], category[MO_sig]
[2024-08-19 10:24:04.082] [nas] [debug] Sending Initial Registration
[2024-08-19 10:24:04.082] [nas] [info] UE switches to state [MM-REGISTER-INITIATED]
[2024-08-19 10:24:04.082] [rrc] [debug] Sending RRC Setup Request
[2024-08-19 10:24:04.083] [rrc] [info] RRC connection established
[2024-08-19 10:24:04.083] [rrc] [info] UE switches to state [RRC-CONNECTED]
[2024-08-19 10:24:04.083] [nas] [info] UE switches to state [CM-CONNECTED]
[2024-08-19 10:24:04.108] [nas] [debug] Authentication Request received
[2024-08-19 10:24:04.108] [nas] [debug] Sending Authentication Failure due to SQN out of range
[2024-08-19 10:24:04.116] [nas] [debug] Authentication Request received
[2024-08-19 10:24:04.124] [nas] [debug] Security Mode Command received
[2024-08-19 10:24:04.124] [nas] [debug] Selected integrity[2] ciphering[0]
[2024-08-19 10:24:04.152] [nas] [debug] Registration accept received
[2024-08-19 10:24:04.152] [nas] [info] UE switches to state [MM-REGISTERED/NORMAL-SERVICE]
[2024-08-19 10:24:04.152] [nas] [debug] Sending Registration Complete
[2024-08-19 10:24:04.152] [nas] [info] Initial Registration is successful
[2024-08-19 10:24:04.153] [nas] [debug] Sending PDU Session Establishment Request
[2024-08-19 10:24:04.153] [nas] [debug] UAC access attempt is allowed for identity[0], category[MO_sig]
[2024-08-19 10:24:04.153] [nas] [debug] ### src/ue/nas/sm/resource.cpp - deleting sessions from configuration
[2024-08-19 10:24:04.360] [nas] [debug] Configuration Update Command received
[2024-08-19 10:24:04.393] [nas] [debug] PDU Session Establishment Accept received
[2024-08-19 10:24:04.393] [nas] [info] PDU Session establishment is successful PSI[1]
[2024-08-19 10:24:04.412] [app] [info] Connection setup for PDU session[1] is successful, TUN interface[uesimtun0, 10.45.0.2] is up.
[2024-08-19 10:24:27.011] [rrc] [debug] RRC Release received
[2024-08-19 10:24:27.011] [nas] [info] UE switches to state [CM-IDLE]
[2024-08-19 10:24:31.104] [nas] [debug] NAS timer[3512] expired [1]
[2024-08-19 10:24:31.104] [nas] [debug] Mobility registration updating required due to [T3512-EXPIRY]
[2024-08-19 10:24:31.104] [nas] [debug] UAC access attempt is allowed for identity[0], category[MO_sig]
[2024-08-19 10:24:31.104] [nas] [debug] Sending Periodic Registration with update cause [T3512-EXPIRY]
[2024-08-19 10:24:31.104] [nas] [info] UE switches to state [MM-REGISTER-INITIATED]
[2024-08-19 10:24:31.104] [rrc] [debug] Sending RRC Setup Request
[2024-08-19 10:24:31.105] [rrc] [info] RRC connection established
[2024-08-19 10:24:31.105] [rrc] [info] UE switches to state [RRC-CONNECTED]
[2024-08-19 10:24:31.105] [nas] [info] UE switches to state [CM-CONNECTED]
[2024-08-19 10:24:31.123] [nas] [debug] Authentication Request received
[2024-08-19 10:24:31.130] [nas] [debug] Security Mode Command received
[2024-08-19 10:24:31.130] [nas] [debug] Selected integrity[2] ciphering[0]
[2024-08-19 10:24:31.145] [nas] [debug] Registration accept received
[2024-08-19 10:24:31.145] [nas] [info] UE switches to state [MM-REGISTERED/NORMAL-SERVICE]
[2024-08-19 10:24:31.145] [nas] [info] Periodic Registration is successful
[2024-08-19 10:24:31.348] [nas] [debug] Configuration Update Command received

gNB logs:

UERANSIM v3.2.6
[2024-08-19 10:23:56.349] [sctp] [info] Trying to establish SCTP connection... (10.15.199.100:38412)
[2024-08-19 10:23:56.362] [sctp] [info] SCTP connection established (10.15.199.100:38412)
[2024-08-19 10:23:56.362] [sctp] [debug] SCTP association setup ascId[240]
[2024-08-19 10:23:56.362] [ngap] [debug] Sending NG Setup Request
[2024-08-19 10:23:56.363] [ngap] [debug] NG Setup Response received
[2024-08-19 10:23:56.363] [ngap] [info] NG Setup procedure is successful
[2024-08-19 10:24:04.078] [rrc] [debug] UE[1] new signal detected
[2024-08-19 10:24:04.082] [rrc] [info] RRC Setup for UE[1]
[2024-08-19 10:24:04.084] [ngap] [debug] Initial NAS message received from UE[1]
[2024-08-19 10:24:04.151] [ngap] [debug] Initial Context Setup Request received
[2024-08-19 10:24:04.392] [ngap] [info] PDU session resource(s) setup for UE[1] count[1]
[2024-08-19 10:24:26.998] [ngap] [debug] Sending UE Context release request (NG-RAN node initiated)
[2024-08-19 10:24:27.011] [ngap] [debug] UE Context Release Command received
[2024-08-19 10:24:27.011] [rrc] [info] Releasing RRC connection for UE[1]
[2024-08-19 10:24:31.104] [rrc] [info] RRC Setup for UE[1]
[2024-08-19 10:24:31.105] [ngap] [debug] Initial NAS message received from UE[1]
[2024-08-19 10:24:31.144] [ngap] [debug] Initial Context Setup Request received

Trace:
UERANSIM_WrongKSI_RegUpdate.zip

Just for info: Service request is always sent with proper KSI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant