Skip to content

fix(udm): validate SDM subscription IDs - #95

Open
arccat-114 wants to merge 2 commits into
free5gc:mainfrom
arccat-114:fix/subscription-id-validation
Open

fix(udm): validate SDM subscription IDs#95
arccat-114 wants to merge 2 commits into
free5gc:mainfrom
arccat-114:fix/subscription-id-validation

Conversation

@arccat-114

@arccat-114 arccat-114 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

What this changes

  • validate SDM subscription IDs before they reach the processor
  • validate UE subscription IDs against the positive decimal format generated by UDR
  • validate shared-data subscription IDs as bounded URI-safe opaque path segments
  • reject malformed values with a generic 400 response
  • add regression coverage for malformed IDs, including oversized input and $ne

The free5GC UDR currently generates UE SDM subscription IDs as positive decimal integers, while shared-data subscription IDs are treated as opaque values returned by the upstream service. Validating each path according to its source keeps crafted values from reaching downstream processing and avoids exposing internal errors.

Related issue: free5gc/free5gc#1133 (GHSA-f72w-jgfw-hhm9)

Validation

  • go test ./...
  • go vet ./...
  • git diff --check

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.

1 participant