open5gs/src
Sukchan Lee 3886891833 [MME] Crash due to a race condition
A race condition can occur in the following situations.
In conclusion, we can use this situation to determine
whether or not the UE Context has been removed and avoiding a crash.

For example, suppose a UE Context is removed in the followings.

1. Attach Request
2. Authentication-Information-Request
3. Authentication-Information-Answer
4. Authentication Request
5. Authentication Response(MAC Failed)
6. Authentication Reject
7. UEContextReleaseCommand
8. UEContextReleaseComplete

The MME then sends a Purge-UE-request to the HSS and deletes
the UE context as soon as it receives a Purge-UE-Answer.

Suppose an Attach Request is received from the same UE
between Purge-UE-Request/Answer, then the MME and HSS start
the Authentication-Information-Request/Answer process.

This can lead to the following situations.

1. Purge-UE-Request
2. Attach Request
3. Authentication-Information-Request
4. Purge-UE-Answer
5. [UE Context Removed]
6. Authentication-Information-Answer

Since the UE Context has already been deleted
when the Authentication-Information-Answer is received,
it cannot be processed properly.

Therefore, mme_ue_cycle() is used to check
whether the UE Context has been deleted and
decide whether to process or
ignore the Authentication-Information-Answer as shown below.
2024-01-25 23:27:34 +09:00
..
amf [AMF/MME] Fixed M-TMSI pool release (#2307) 2024-01-21 11:58:43 +09:00
ausf [NRF] Fixed crash due to invalid PATCH body (#2735) 2023-11-25 22:03:28 +09:00
bsf [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
hss fix mismatch of parameters between prototype and declaration 2024-01-22 17:34:59 +09:00
mme [MME] Crash due to a race condition 2024-01-25 23:27:34 +09:00
nrf [NRF] crash after sending invalid message (#2808) 2023-12-23 09:55:19 +09:00
nssf [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
pcf memset input/output structure inside the function 2024-01-22 17:34:59 +09:00
pcrf Document Gx interface spec references 2024-01-25 07:05:33 +09:00
scp fix mismatch of parameters between prototype and declaration 2024-01-22 17:34:59 +09:00
sepp fix mismatch of parameters between prototype and declaration 2024-01-22 17:34:59 +09:00
sgwc [core] Fix a couple of warnings when using C++ compiler or more strict settings 2024-01-09 17:50:22 +09:00
sgwu [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
smf Document Gy interface spec reference 2024-01-25 07:05:33 +09:00
udm Introduce ability for multiple SDM_Subscriptions 2024-01-21 13:16:21 +09:00
udr [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
upf [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
main.c Fixed dynamic-stack-buffer-overflow (#2578, #2577) 2023-09-05 21:58:05 +09:00
meson.build [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00