Skip to content

fix: UDR panic/crash paths for #919 #920 #922 #923 - #60

Merged
Alonza0314 merged 1 commit into
free5gc:mainfrom
Zach1113:fix/UDR-panic-and-crash-fix
Apr 7, 2026
Merged

Alonza0314 merged 1 commit into
free5gc:mainfrom
Zach1113:fix/UDR-panic-and-crash-fix

Conversation

@Zach1113

Copy link
Copy Markdown
Contributor

Remove AMF Subscription Panic: free5gc/free5gc#919, free5gc/free5gc#920

File: internal/sbi/processor/event_amf_subscription_info_document.go

Problem:

  • The code continued execution even when UE state or subsId was missing.
  • It then asserted/dereferenced nil values, causing panic.

Fix:

  • Return immediately after USER_NOT_FOUND.
  • Return immediately after SUBSCRIPTION_NOT_FOUND.
  • Guard the map value with eeSub == nil check before reading AmfSubscriptionInfos.

Provisioned Data Panic: free5gc/free5gc#922

File: internal/sbi/processor/provisioned_data_document.go

Problem:

  • provisionedDataSets.SmData is a pointer and was not initialized before assigning IndividualSmSubsData.
  • Also, DNN rewrite loop modified a range-copy, so updates were not persisted.

Fix:

  • Initialize SmData when nil before writing into it.
  • Iterate by index (for i := range tmp) and update tmp[i] directly.

On-Data-Change Callback Crash: free5gc/free5gc#923

File: internal/sbi/processor/callback.go

Problem:

  • DataChangeNotify pointer inside request struct was never initialized before field writes.
  • Panic recovery used Fatalf, which terminates the process.

Fix:

  • Build request with initialized DataChangeNotify object.
  • Change recover logging from Fatalf to Errorf.

@roundspring2003

Copy link
Copy Markdown
Contributor

@Alonza0314 Test All pass

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.

3 participants