Find a file
Sukchan Lee 731ecc4e1b smf: Prevent crash when Diameter session context is lost and recover gracefully
In long-running deployments, a mismatch can occur between SMF’s stored
Gx/Gy/S6b Session-Id and the freeDiameter session table, typically after
peer reconnection, watchdog timeout, or internal cleanup. In such cases
`fd_sess_fromsid_msg()` may return `new != 0`, indicating that the
Diameter stack created a new session instance instead of retrieving the
existing one.

Previously, this condition triggered `ogs_assert(new == 0)` which caused
a fatal crash of the SMF (and potentially SGWC), interrupting normal
operation.

This patch replaces the assertion with a graceful recovery path:
- Log an error indicating that the Diameter session has been lost
- Free the pending request message and stored Session-Id
- Return early to trigger PDU session release handling by the upper layer
- Avoid process termination and maintain service continuity

This significantly improves robustness in long-running and fault-tolerant
deployments with commercial-grade operational requirements.

Issues: #4195
2025-12-06 11:15:50 +09:00
.github Update cifuzz 2025-02-04 21:09:20 +09:00
configs [HR] Implement handling of UE-initiated PDU Session Modification (#2194) 2025-06-30 10:07:06 +09:00
debian Release v2.7.6 2025-07-19 10:32:41 +09:00
docker Replaced deprecated libidn11-dev with libidn-dev across the project. 2025-01-19 12:21:51 +09:00
docs [AMF] API to add or remove PLMNs Dynamically (#4186) 2025-12-03 21:32:59 +09:00
lib SMF/MME: Add bitrate upper-bound validation for S1AP/NGAP to prevent crash 2025-12-05 21:25:28 +09:00
misc [MME/AMF] Fixed problem in MacOSX machine 2024-09-04 22:00:29 +09:00
src smf: Prevent crash when Diameter session context is lost and recover gracefully 2025-12-06 11:15:50 +09:00
subprojects Tested on FreeBSD-14.1-STABLE (#3350) 2024-08-03 21:45:52 +09:00
tests amf: Preserve RAN-UE association across asynchronous SBI responses 2025-11-26 17:17:16 +09:00
vagrant Tested on FreeBSD-14.1-STABLE (#3350) 2024-08-03 21:45:52 +09:00
webui Changed mongodb default url from localhost to 127.0.0.1 as specified in https://mongoosejs.com/docs/connections.html. This fix incompatibility issues between webui and nodejs 18+ versions. 2025-10-03 23:38:12 +09:00
.clang-tidy [MISC] Add support for static code analysis 2022-07-01 21:38:47 +09:00
.dockerignore [build] Use local sources to build applications (#1583) 2022-06-19 18:18:09 +09:00
.editorconfig editorconfig: new file (#2746) 2023-11-27 22:21:35 +09:00
.gitignore .gitignore: Add install/ dir 2023-10-10 08:03:25 +09:00
LICENSE Change LICENSE to GNU AGPL v3.0 2017-12-18 10:35:54 +09:00
meson.build Release v2.7.6 2025-07-19 10:32:41 +09:00
meson_options.txt [Fuzzing] oss-fuzz support for fuzzing (#2283) 2023-05-05 17:20:11 +09:00
README.md update document 2024-08-24 19:18:55 +09:00

Open5GS logo

Getting Started

Please follow the documentation at open5gs.org!

Sponsors

If you find Open5GS useful for work, please consider supporting this Open Source project by Becoming a sponsor. To manage the funding transactions transparently, you can donate through OpenCollective.

Special Sponsor

special sponsor mobi

sponsors

Community

  • Problem with Open5GS can be filed as issues in this repository.
  • Other topics related to this project are happening on the discussions.
  • Voice and text chat are available in Open5GS's Discord workspace. Use this link to get started.

Contributing

If you're contributing through a pull request to Open5GS project on GitHub, please read the Contributor License Agreement in advance.

License

Support

Technical support and customized services for Open5GS are provided by NewPlane at support@newplane.io.