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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JayaramRCDAC
Copy link

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
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

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