From d401cf0d31cc1a876f2bfbab0438497d5378512d Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 22 Jan 2026 13:57:05 +0000 Subject: [PATCH] Prevent CU to process UE context release requests from DUs for UEs with outdated or unexpected association ids --- openair2/RRC/NR/rrc_gNB.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 7f41925d26..2263190191 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -2633,6 +2633,16 @@ static void rrc_CU_process_ue_context_release_request(MessageDef *msg_p, sctp_as // if we receive the release request from the target DU (regardless if // successful), we assume it is "genuine" and ask the AMF to release nr_rrc_finalize_ho(UE); + } else { + f1_ue_data_t ue_data = cu_get_f1_ue_data(UE->rrc_ue_id); + if (ue_data.du_assoc_id != assoc_id) { + LOG_W(NR_RRC, + "UE context release request from unexpected DU with assoc_id %d for rrc_ue_id %d with du_assoc_id %d\n", + assoc_id, + UE->rrc_ue_id, + ue_data.du_assoc_id); + return; + } } /* TODO: marshall types correctly */