open5gs/lib
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
..
app Add space to inprove readbility of error 2023-12-21 22:14:24 +09:00
asn1c [ASN.1] Fix buffer overflow (mouse07410/asn1c#134) (#2742) 2023-11-20 21:16:35 +09:00
core [MME] Crash due to a race condition 2024-01-25 23:27:34 +09:00
crypt [CRYPT] Add ogs_kdf_kasme_idle_mobility() 2024-01-16 06:36:44 +09:00
dbi memset input/output structure inside the function 2024-01-22 17:34:59 +09:00
diameter Document Gy interface spec reference 2024-01-25 07:05:33 +09:00
gtp fix mismatch of parameters between prototype and declaration 2024-01-22 17:34:59 +09:00
ipfw [ipfw] Fix memory leak when parsing ipv6 2023-09-27 20:35:33 +09:00
metrics [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
nas [MME] Constify params in mme-context and depending APIs 2024-01-06 07:42:32 +09:00
ngap [Release-17] Upgrade S1AP/NGAP to v17.3.9 2023-02-21 21:48:06 +09:00
pfcp initialize variables before using them 2024-01-22 17:34:59 +09:00
proto lib/proto/conv: Introduce API ogs_ip_to_paa() 2024-01-06 07:44:14 +09:00
s1ap [Release-17] Upgrade S1AP/NGAP to v17.3.9 2023-02-21 21:48:06 +09:00
sbi fix mismatch of parameters between prototype and declaration 2024-01-22 17:34:59 +09:00
sctp [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
tun [ALL] Removing trailing whitespace and tab 2022-09-02 23:38:39 +09:00
meson.build [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00