From a08b8a595a8db2597520f66ac4174213fa593010 Mon Sep 17 00:00:00 2001 From: Neels Janosch Hofmeyr Date: Tue, 17 Jan 2023 21:49:50 +0100 Subject: [PATCH] fix msgb leak for RANAP RAB Ass. Req. Fix leaked msgb introduced by the MGW support recently added, and from there copied to the UPF support added after that. Fixes leaked "RANAP Tx" msgb, one per RAB Assignment that involves an MGW or UPF proxying of user data. Related: SYS#6297 Change-Id: Ie30e880301346ffca72f98f8c467e56d622fb03f --- src/osmo-hnbgw/mgw_fsm.c | 1 + src/osmo-hnbgw/ps_rab_ass_fsm.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c index f09300e..764e9a7 100644 --- a/src/osmo-hnbgw/mgw_fsm.c +++ b/src/osmo-hnbgw/mgw_fsm.c @@ -256,6 +256,7 @@ static void mgw_fsm_assign_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state LOGPFSML(fi, LOGL_DEBUG, "forwarding modified RAB-AssignmentRequest to HNB\n"); rua_tx_dt(map->hnb_ctx, map->is_ps, map->rua_ctx_id, msg->data, msg->len); + msgb_free(msg); } static void mgw_fsm_assign(struct osmo_fsm_inst *fi, uint32_t event, void *data) diff --git a/src/osmo-hnbgw/ps_rab_ass_fsm.c b/src/osmo-hnbgw/ps_rab_ass_fsm.c index b298e45..e676c2c 100644 --- a/src/osmo-hnbgw/ps_rab_ass_fsm.c +++ b/src/osmo-hnbgw/ps_rab_ass_fsm.c @@ -352,6 +352,7 @@ continue_cleanloop: return; } rua_tx_dt(rab_ass->map->hnb_ctx, rab_ass->map->is_ps, rab_ass->map->rua_ctx_id, msg->data, msg->len); + msgb_free(msg); /* The request message has been forwarded. The response will be handled by a new FSM instance. * We are done. */ osmo_fsm_inst_term(rab_ass->fi, OSMO_FSM_TERM_REGULAR, NULL);