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

[lte][agw]Bug fix for missing ue context at spgw #4141

Merged

Conversation

pruthvihebbani
Copy link
Contributor

@pruthvihebbani pruthvihebbani commented Dec 21, 2020

Signed-off-by: Pruthvi Hebbani pruthvi.hebbani@radisys.com

[lte][agw]Bug fix for missing ue context at spgw

Summary

Issue description:
a. There are 2 UEs which are in the process of attach say UE1 and UE2. UE1 has sent out initial context setup request message and waiting for response. UE2 has performed GUTI attach. As part of GUTI attach, identification procedure is done and MME has sent out authentication request message to UE and waiting for authentication response.
b. ICS timer expires for UE1 and implicit detach is triggered. MME sends delete session request message to spgw and the UE context at spgw gets deleted. In the mean time ICS response message is received from UE1. At mme, there is no check to see that the ICS timer has already expired and implicit detach has been triggered for this UE. Due to this mme sends modify bearer request message to spgw. Before spgw triggers delete session rsp message to mme (in response to delete session req sent by mme) it receives modify bearer request message. As the ue context at spgw is deleted, spgw sends modify bearer rsp with cause “CONTEXT NOT FOUND”. But this message does not contain mme s11 teid. Mme s11 teid is included only in the successful case.
c. Mme receives modify bearer rsp message with mme s11 teid value 0 and fetches the context of UE2 instead of UE1. This is because when mme performs identification procedure for UE2 it inserts mme s11 teid into the hashtable even though the value of mme s11 teid is 0. Mme s11 teid gets allocated during create session procedure which is not yet done for UE2
d. Mme triggers bearer deactivation procedure for UE2 (instead of UE1) as the context at spgw is not available
e. Since authentication procedure is not yet completed for UE2, security context is not yet available for this UE. When mme tries to build erab release command message it crashes as there is no null check on the security context. This fix is done PR #4067

This PR has the following fixes:

  1. Do not process initial context rsp message if ICS timer is not running
  2. Include mme s11 teid in modify bearer rsp message for failure cases
  3. Insert mme s11 teid into hashlist only if it has valid value.
  4. Set ue_context_p->mme_teid_s11 to 0 only if the hash table entry is successfully removed.

Test Plan

  • Verified s1 sim sanity

Signed-off-by: Pruthvi Hebbani <pruthvi.hebbani@radisys.com>
Signed-off-by: Pruthvi Hebbani <pruthvi.hebbani@radisys.com>
Copy link
Contributor

@ulaskozat ulaskozat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ulaskozat ulaskozat merged commit c575e3d into magma:master Dec 21, 2020
@magmabot magmabot added the component: agw Access gateway-related issue label Dec 22, 2020
@uri200
Copy link
Contributor

uri200 commented Dec 23, 2020

this seems to have fixed this issue
#3625

@ulaskozat ulaskozat added the apply-v1.3 Needs to be applied to v1.3 release branch as well label Jan 8, 2021
ssanadhya pushed a commit that referenced this pull request Jan 8, 2021
* Bug fix for missing ue context at spgw

Signed-off-by: Pruthvi Hebbani <pruthvi.hebbani@radisys.com>
@ssanadhya ssanadhya added the backported-v1.3 Has been backported to v1.3 release branch label Jan 8, 2021
pshelar added a commit to pshelar/magma that referenced this pull request Jan 9, 2021
pshelar added a commit to pshelar/magma that referenced this pull request Jan 9, 2021
This reverts commit d356a00.

Signed-off-by: Pravin B Shelar <pbshelar@fb.com>
ssanadhya pushed a commit that referenced this pull request Jan 9, 2021
)

This reverts commit d356a00.

Signed-off-by: Pravin B Shelar <pbshelar@fb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apply-v1.3 Needs to be applied to v1.3 release branch as well backported-v1.3 Has been backported to v1.3 release branch component: agw Access gateway-related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants