free5GC UDM DataChangeNotification Procedure Panic Due to Nil Pointer Dereference
Description
Free5GC is an open-source Linux Foundation project for 5th generation (5G) mobile core networks. Versions prior to 1.4.2 are vulnerable to procedure panic caused by Nil Pointer Dereference in the /sdm-subscriptions endpoint. A remote attacker can cause the UDM service to panic and crash by sending a crafted POST request to the /sdm-subscriptions endpoint with a malformed URL path containing path traversal sequences (../) and a large JSON payload. The DataChangeNotificationProcedure function in notifier.go attempts to access a nil pointer without proper validation, causing a complete service crash with "runtime error: invalid memory address or nil pointer dereference". Exploitation would result in UDM functionality disruption until recovery by restart. This issue has been fixed in version 1.4.2.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/free5gc/udmGo | < 1.4.2 | 1.4.2 |
Affected products
1Patches
165d7070f4bfdMerge pull request #78 from wiwi878/fix/udm/sdm-notify-204-nil-guard
2 files changed · +39 −2
internal/sbi/api_httpcallback.go+28 −1 modified@@ -9,6 +9,7 @@ import ( "github.com/free5gc/openapi/models" "github.com/free5gc/udm/internal/logger" "github.com/free5gc/util/metrics/sbi" + "github.com/free5gc/util/validator" ) func (s *Server) getHttpCallBackRoutes() []Route { @@ -23,7 +24,7 @@ func (s *Server) getHttpCallBackRoutes() []Route { { "DataChangeNotificationToNF", http.MethodPost, - "/sdm-subscriptions", + "/:supi/sdm-subscriptions", s.HandleDataChangeNotificationToNF, }, } @@ -59,7 +60,33 @@ func (s *Server) HandleDataChangeNotificationToNF(c *gin.Context) { return } + // TS 29.503 6.1.6.2.21 + if len(dataChangeNotify.NotifyItems) == 0 { + problemDetail := models.ProblemDetails{ + Title: "Missing or invalid parameter", + Status: http.StatusBadRequest, + Detail: "Mandatory IE NotifyItems is missing or invalid", + Cause: "MANDATORY_IE_MISSING", + } + logger.CallbackLog.Warnln("Mandatory IE NotifyItems is missing or invalid") + c.Set(sbi.IN_PB_DETAILS_CTX_STR, http.StatusText(int(problemDetail.Status))) + c.JSON(int(problemDetail.Status), problemDetail) + return + } + supi := c.Params.ByName("supi") + if !validator.IsValidSupi(supi) { + problemDetail := models.ProblemDetails{ + Title: "Invalid Supi format", + Status: http.StatusBadRequest, + Detail: "The Supi format is invalid", + Cause: "MANDATORY_IE_INCORRECT", + } + logger.UecmLog.Warnf("Registration Reject: Invalid Supi format [%s]", supi) + c.Set(sbi.IN_PB_DETAILS_CTX_STR, http.StatusText(int(problemDetail.Status))) + c.JSON(int(problemDetail.Status), problemDetail) + return + } logger.CallbackLog.Infof("Handle DataChangeNotificationToNF")
internal/sbi/processor/notifier.go+11 −1 modified@@ -1,6 +1,8 @@ package processor import ( + "net/http" + "github.com/gin-gonic/gin" "github.com/free5gc/openapi" @@ -22,7 +24,11 @@ func (p *Processor) DataChangeNotificationProcedure(c *gin.Context, return } - ue, _ := p.Context().UdmUeFindBySupi(supi) + ue, ok := p.Context().UdmUeFindBySupi(supi) + if !ok { + c.Status(http.StatusNoContent) + return + } clientAPI := p.Consumer().GetSDMClient("DataChangeNotification") @@ -48,6 +54,10 @@ func (p *Processor) DataChangeNotificationProcedure(c *gin.Context, } } } + if problemDetails == nil { + c.Status(http.StatusNoContent) + return + } c.Set(sbi.IN_PB_DETAILS_CTX_STR, problemDetails.Cause) c.JSON(int(problemDetails.Status), problemDetails) }
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- github.com/advisories/GHSA-7g27-v5wj-jr75ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-33064ghsaADVISORY
- github.com/free5gc/free5gc/issues/781ghsax_refsource_MISCWEB
- github.com/free5gc/free5gc/security/advisories/GHSA-7g27-v5wj-jr75ghsax_refsource_CONFIRMWEB
- github.com/free5gc/udm/commit/65d7070f4bfd016864cbbaefbd506bbc85d2fa92ghsax_refsource_MISCWEB
- github.com/free5gc/udm/pull/78ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.