Skip to content

Commit

Permalink
[MME] Follow-up on open5gs#2916
Browse files Browse the repository at this point in the history
When there is no MME-UE Context, going to cleanup without setting
s6a_message could cause a segmentation fault.

We fixed the problem by moving the location of setting s6a_message
to before cleanup.
  • Loading branch information
acetcom committed Feb 8, 2024
1 parent 290df46 commit 94bd68a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mme/mme-sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ void mme_state_operational(ogs_fsm_t *s, mme_event_t *e)
break;

case MME_EVENT_S6A_MESSAGE:
s6a_message = e->s6a_message;
ogs_assert(s6a_message);

/*
* A race condition can occur in the following situations.
* In conclusion, we can use this situation to determine
Expand Down Expand Up @@ -563,9 +566,6 @@ void mme_state_operational(ogs_fsm_t *s, mme_event_t *e)
goto cleanup;
}

s6a_message = e->s6a_message;
ogs_assert(s6a_message);

switch (s6a_message->cmd_code) {
case OGS_DIAM_S6A_CMD_CODE_AUTHENTICATION_INFORMATION:
ogs_debug("OGS_DIAM_S6A_CMD_CODE_AUTHENTICATION_INFORMATION");
Expand Down

0 comments on commit 94bd68a

Please sign in to comment.