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] Handle null eNB context #5084

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

ulaskozat
Copy link
Contributor

@ulaskozat ulaskozat commented Feb 22, 2021

Summary

Added null pointer check for eNB reference that is fetched using the association ID provided for the NAS UL message. Normally, NAS messages from UEs should not come to the MME without an eNB association. However, we see the following crash dump that indicates that we are in such a situation and leading to segfault:

(lldb) bt
* thread #1, name = 'mme', stop reason = signal SIGSEGV
  * frame #0: 0x00005565327c7fdd mme`s1ap_mme_handle_uplink_nas_transport(state=0x000060f00000b4f0, assoc_id=3380, stream=<unavailable>, pdu=0x00007fb5d92bcd10) at s1ap_mme_nas_procedures.c:325
    frame #1: 0x00005565327c59f6 mme`s1ap_mme_handle_message(state=<unavailable>, assoc_id=3380, stream=<unavailable>, pdu=0x00007fb5d92bcd10) at s1ap_mme_handlers.c:205
    frame #2: 0x0000556532776420 mme`handle_message(loop=<unavailable>, reader=<unavailable>, arg=<unavailable>) at s1ap_mme.c:141
    frame #3: 0x00007fb5ec46e7be libczmq.so.4

where line 325 in s1ap_mme_nas_procedures.c is with enb_ref is set as NULL:

s1ap_mme_remove_stale_ue_context(enb_ue_s1ap_id, enb_ref->enb_id);

Test Plan

Integ tests.

Additional Information

  • This change is backwards-breaking

Signed-off-by: Ulas Kozat <kozat@fb.com>
@ulaskozat ulaskozat added component: agw Access gateway-related issue apply-v1.4 Needs to be applied to v1.4 release branch as well labels Feb 22, 2021
@ssanadhya ssanadhya linked an issue Feb 22, 2021 that may be closed by this pull request
@ulaskozat ulaskozat merged commit 7529b20 into magma:master Feb 23, 2021
@themarwhal themarwhal added the backported-v1.4 Has been backported to v1.4 release branch label Feb 23, 2021
themarwhal pushed a commit that referenced this pull request Feb 23, 2021
Signed-off-by: Ulas Kozat <kozat@fb.com>
chandra-77 pushed a commit to chandra-77/magma that referenced this pull request Mar 30, 2021
Signed-off-by: Ulas Kozat <kozat@fb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apply-v1.4 Needs to be applied to v1.4 release branch as well backported-v1.4 Has been backported to v1.4 release branch component: agw Access gateway-related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MME: segfault: s1ap_mme_handle_uplink_nas_transport()
3 participants