From b09526c83e4c9787c363dc79ce5d84cf1678853b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 11 Oct 2023 07:28:04 +0200 Subject: [PATCH] Bugfix: fix use-after-free of UE caps --- openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c index c764ece582..2c3a718fff 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -338,9 +338,6 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req) UE->capability = ue_cap; if (ue_cap != NULL) { // store the new UE capabilities, and update the cellGroupConfig - ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, UE->capability); - UE->capability = ue_cap; - LOG_I(NR_MAC, "UE %04x: received capabilities, updating CellGroupConfig\n", UE->rnti); NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon; update_cellGroupConfig(new_CellGroup, UE->uid, UE->capability, &mac->radio_config, scc); }