open5gs/src
gstaa 060acee5df
[AMF] Fix Nudm_SDM_Get for re-registration (#2751)
Bug:

In case that AMF does not have subscription data for the UE,
PDU session remains unreleased after implicit de-registeration.

The exact test case:
- UE registered (integrity protection applied)
- UE deregistered (Nudm_SDM_Unsubscribe, Nudm_UECM_Registration (purgeFlag))
- UE registered, PDU session activated

    UE data are still stored in AMF. So if integrity protected applies,
    the steps 4 - 14 [ETSI TS 123 502 V16.7.0](https://www.etsi.org/deliver/etsi_ts/123500_123599/123502/16.07.00_60/ts_123502v160700p.pdf) are skipped.
    Only AM Policy Association Establishment is performed.
- UE is moved out of radio coverage, 2 x (4 min + Timer t3512) expires

Result: UE is implicitly de-registered, PDU session is not released

The steps of implicit de-registeration:
  1. Implicit Timer Expiration
  2. UDM_SDM_Unsubscribe
  3. UDM_UECM_Deregistration
  4. PDU session release request
  5. PDUSessionResourceReleaseCommand + PDU session release command
  6. PDUSessionResourceReleaseResponse
  7. AM_Policy_Association_Termination

So PDU session release is performed after the confirmation of
UDM_UECM_Deregistration.
Since there is no UDM_SDM subscription, the UDM steps are skipped
and PDU session is not released.

Fix:

If the AMF does not have subscription data for the UE which registers,
the AMF registers with the UDM using Nudm_UECM_Registration and
retrieves subscription data with Nudm_SDM_Get.

[ETSI TS 123 502 V16.7.0](https://www.etsi.org/deliver/etsi_ts/123500_123599/123502/16.07.00_60/ts_123502v160700p.pdf), 4.2.2.2.2 General Registration, 14a-c:
> If the AMF does not have subscription data for the UE, the AMF retrieves the Access and Mobility Subscription data, SMF
> Selection Subscription data, UE context in SMF data and LCS mobile origination using Nudm_SDM_Get.
2023-11-27 22:19:29 +09:00
..
amf [AMF] Fix Nudm_SDM_Get for re-registration (#2751) 2023-11-27 22:19:29 +09:00
ausf [NRF] Fixed crash due to invalid PATCH body (#2735) 2023-11-25 22:03:28 +09:00
bsf [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
hss [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
mme [AMF/MME] Fixed crash when receiving invalid packet (#2737) (#2755) 2023-11-27 22:16:11 +09:00
nrf [NRF] Fixed crash due to invalid PATCH body (#2735) 2023-11-25 22:03:28 +09:00
nssf [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
pcf [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
pcrf [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
scp [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
sepp [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
sgwc [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
sgwu [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
smf [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
udm [NRF] Fixed crash due to invalid PATCH body (#2735) 2023-11-25 22:03:28 +09:00
udr [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
upf [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
main.c Fixed dynamic-stack-buffer-overflow (#2578, #2577) 2023-09-05 21:58:05 +09:00
meson.build [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00