-
Notifications
You must be signed in to change notification settings - Fork 56
fix: add missing return statements after error responses #56
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
base: main
Are you sure you want to change the base?
Conversation
Problem:
When PFD data was not found, UDR returned 404 but continued executing
and wrote 'null' to the response body after the ProblemDetails JSON.
This created invalid JSON like '{...}null', causing NEF to fail parsing
with 'invalid character n after top-level value' and return 500.
Solution:
Add return statements after error responses in the following functions:
- GetApplicationDataIndividualPfdFromDBProcedure
- PutApplicationDataIndividualPfdToDBProcedure
- PolicyDataBdtDataGetProcedure
- PolicyDataSubsToNotifySubsIdDeleteProcedure
- PolicyDataSubsToNotifySubsIdPutProcedure
- PolicyDataUesUeIdAmDataGetProcedure
- PolicyDataUesUeIdOperatorSpecificDataGetProcedure
- PolicyDataUesUeIdOperatorSpecificDataPatchProcedure (2 locations)
Fixes: free5gc/free5gc#753
|
@roundspring2003 Please help to check it |
|
Hi @Alonza0314, Regarding the fixed issue #753 (NEF incorrectly returning 500), I'd like to respectfully request a re-evaluation for a potential CVE assignment. While I appreciate @solar224's perspective viewing it as a logic bug, I believe it has measurable security implications: These characteristics align with established vulnerability patterns. Assigning a CVE would: I'm happy to provide any additional technical description required for the process. Thank you for your consideration. |
|
@solar224 , There are still some places that should have been returned that were missed. For example: QueryAmfContext3gppProcedure (amf3_gpp_access_registration_document.go). Please help check other files. |
|
Hi @zfei10990-cmd, I can help proceed with reporting this via a GitHub Security Advisory. ### Impact
What kind of vulnerability is it, and who may be impacted?
### Patches
Has the issue been patched? If so, which versions should users upgrade to?
### Workarounds
Are there any recommended mitigations or workarounds without upgrading?
### References
Any relevant links, such as the fixing commit, pull request, or related discussions.Additionally, for the Credits section of the advisory, would it be okay if I list you as the reporter of this issue? Thanks in advance for your help. |
|
Hi @Alonza0314, Impact Patches Workarounds References Regarding the Credits, yes, it would be perfectly fine to list me (zfei10990-cmd) as the reporter. Thank you for asking. |
|
@zfei10990-cmd |
@Alonza0314
[Bugs] NEF incorrectly returns 500 for missing PFD data (UDR 404) in Nnef_PfdManagement GET request (JSON parse error: invalid character 'n')
Problem:
When PFD data was not found, UDR returned 404 but continued executing and wrote 'null' to the response body after the ProblemDetails JSON. This created invalid JSON like '{...}null', causing NEF to fail parsing with 'invalid character n after top-level value' and return 500.
Solution:
Add return statements after error responses in the following functions:
Fixes: free5gc/free5gc#753