| Title | Linux Foundation Projects Magma 5G v1.9.0 Denial of Service |
|---|
| Description | AMF doesn't clear up the contexts when a gNB is restarted or association is terminated. As a result certain context stays and the RAN_UE_NGAP_ID gets blocked and can not be re used. Context stays in memory. NGAP Context and AMF Context becomes out of sync. UEContextRelease or De Register is also not able to clear the context.
A bad denial of service issue which requires the service restart for the specific customers.
To Reproduce
Start Magma Core with 5G support enabled and default configuration
Complete the Registration as per mentioned in Issue 2, Skip NGSetup in Issue 2 for this case.
Restart the gNB without restarting the AMF
Send the same Initial UE Message again with the same RAN_UE_NGAP_ID in previous step
Observe error: "This ue context already exists gnb_ue_ngap_id X" and "Failed to insert UE context"
Send any subsequent Initial UE Message with RAN_UE_NGAP_ID=X
Observe error: "Initial UE Message- Duplicate GNB_UE_NGAP_ID. Ignoring the message"
The RAN_UE_NGAP_ID=2 is now permanently blocked from registering until AMF restart or context has been cleared somehow
Expected behavior
AMF should clear and remove all context in case gNB is crashed or gNB is disconnected. But Magma 5G doesn't clear the context and it potentially lead to Denial of Service. |
|---|
| Source | ⚠️ https://github.com/magma/magma/issues/16019 |
|---|
| User | shovon0203 (UID 96191) |
|---|
| Submission | 07/15/2026 06:58 (2 months ago) |
|---|
| Moderation | 08/29/2026 20:44 (2 months later) |
|---|
| Status | Accepted |
|---|
| VulDB entry | 397068 [Linux Foundation Magma 1.9.0 gNB Termination tasks/ngap/ngap_amf.c denial of service] |
|---|
| Points | 20 |
|---|