From 04027b9265210665684164db8d28611b5eedf19e Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 24 May 2024 16:50:39 +0200 Subject: [PATCH] nrUE NAS: minor changes in get_allowed_nssai() This function was very wrong, now it's just wrong. (It does not sanitize the input properly. Some bad input may have unexpected effects on the nrUE.) It needs a serious rewrite. I just wanted to "fix" it so that it processes correctly some correct input data. --- openair3/NAS/NR_UE/nr_nas_msg_sim.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openair3/NAS/NR_UE/nr_nas_msg_sim.c b/openair3/NAS/NR_UE/nr_nas_msg_sim.c index 3155d82234..db747610ee 100644 --- a/openair3/NAS/NR_UE/nr_nas_msg_sim.c +++ b/openair3/NAS/NR_UE/nr_nas_msg_sim.c @@ -1157,11 +1157,13 @@ static void get_allowed_nssai(nr_nas_msg_snssai_t nssai[8], const uint8_t *pdu_b case 0x15: // allowed NSSAI length = *pdu_buffer++; parse_allowed_nssai(nssai, pdu_buffer, length); + pdu_buffer += length; break; default: - LOG_W(NAS, "This NAS IEI is not handled when extracting list of allowed NSSAI\n"); - pdu_buffer = end; + LOG_W(NAS, "This NAS IEI (0x%2.2x) is not handled when extracting list of allowed NSSAI\n", type); + length = *pdu_buffer++; + pdu_buffer += length; break; } }