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

Xn Handover - AMF crash fix #306

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

JayaramRCDAC
Copy link
Contributor

Issue:
Xn Handover failure due to AMF crashing when the gNodeB provides an incorrect PDU Session ID in the NG Path Switch Request.

Troubleshoot:
The crash was traced to the absence of a proper check for the PDU Session ID in the SendUpdateSmContextXnHandover function, causing the AMF to crash when receiving an incorrect or invalid PDU Session ID from the gNodeB.

Fix:
The issue has been resolved by adding a nil check in the SendUpdateSmContextXnHandover function.

Supporting Data:
Xn-Handover-AMF-Crash-PCAP-Logs.zip

@thakurajayL thakurajayL self-assigned this Sep 23, 2024
// Check if the smContext is nil to prevent nil pointer dereference
if smContext == nil {
return nil, nil, nil, fmt.Errorf("smContext is nil")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the outcome of the Xn handover after this fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before this fix, if the PDU session ID was invalid, the AMF would crash. However, after this fix, the AMF properly sends a Path Switch Request Failure to the gNodeB. You can verify this by checking the AMF logs and PCAPs.

amf_logs_Xn_Handover_Invalid_PDU_Session_ID.zip

@thakurajayL thakurajayL merged commit ab78eb3 into omec-project:master Sep 27, 2024
9 checks passed
mbilal92 pushed a commit to mbilal92/amf that referenced this pull request Sep 27, 2024
…#306)

Signed-off-by: Jayaram R <[email protected]>
Co-authored-by: Ajay Lotan Thakur <[email protected]>
Signed-off-by: Bilal Saleem <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants