From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C0F443C60 for ; Thu, 7 Mar 2024 02:34:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 75CD042ECF; Thu, 7 Mar 2024 02:34:11 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 75A6542E64 for ; Thu, 7 Mar 2024 02:34:10 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4130fefef75so1000885e9.2 for ; Wed, 06 Mar 2024 17:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775250; x=1710380050; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gY8mKwMTkMO2iH+S8r1xMa48Q7EU//BVGpoKV6IM29w=; b=WUUCfh92oKZu75rWURhkdZcqMOKuYGTdC5bOvNb6+20RNJY36el9eqjwtS6W3izELI aLrKh8LldErHnbvTyPanjZ1ZHUwbMUVnlkJ7PDacxuvp2pK8XfGWDUv1IsBuu+1mX2Ol z2ZONb5tIpsg54+vhR1mGzcyiOIaGPDllPo03VA9AYknYVt/j9i0gtF4sqvdjmWQZc8/ jjRWxTzdf7kdmjv9m60X6mIDmIwkp1lzxSEk0H1n08FwyCZcdjktU+ra2RAynVqXtohp IoOaan0M8ks97APds7nqShHw25y4nPmdyZ5fh3yH4Ub4uh6VGCfPzafxKdcfPzRpTlj8 GQog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775250; x=1710380050; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gY8mKwMTkMO2iH+S8r1xMa48Q7EU//BVGpoKV6IM29w=; b=oZhDjjrNsyQvE009RnDy8oF1VIMDf8rTJ5I04pHYYoAjzQOOOIqv/lmAP7XmIdmNMZ RMNGVGUHFMGxfa93ycZYBuRSNynaRZVc5fFghh8BFPtfszyv3SwzWOX/+AGWyXcfJC3O yKgrcoMPY/M/HQ01CnRz2iBnw+HvQg+Ue4fpAsVLwFZL/yo686Mwu9oXZ/sdFcsML6CU c5S2LpZNh6UqU94Cj1lkJM51tPuCnyI3KCSiOxDpcHKeJhn42MfNdz30SA6cpxYiNFHM D1GNf+k7VYSxVvuBg0Hakk+RuCosfEDNeAFhcm2zeUrRrlLeMmaQtuHWbNXdLriUaJV/ bg5g== X-Gm-Message-State: AOJu0YxliFO6fZ09Pta/7B2qRMWYUE4N3A5X7ohv3IGTqYbZ5UNRcV1h t0R1lMZm8ZMLCuM0Vb7dFdfAprFAlcvuzhYWQt0bOMxivpku/a8i4NuYClr/ X-Google-Smtp-Source: AGHT+IEiqKiWfTdP8wA0b3x8j/1fm5Q5VDe+r2ox1rDnSBbLcU9XvkqC1383kAmaKOaFx8XBvygWzw== X-Received: by 2002:a05:600c:3b96:b0:413:49a:c3b0 with SMTP id n22-20020a05600c3b9600b00413049ac3b0mr1108842wms.2.1709775250133; Wed, 06 Mar 2024 17:34:10 -0800 (PST) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id p20-20020a05600c359400b0041308e57a28sm865803wmq.23.2024.03.06.17.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:34:09 -0800 (PST) From: luca.boccassi@gmail.com To: Chengwen Feng Cc: dpdk stable Subject: patch 'examples/qos_sched: fix memory leak in args parsing' has been queued to stable release 22.11.5 Date: Thu, 7 Mar 2024 01:30:50 +0000 Message-Id: <20240307013159.1735343-33-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/09/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/7d35dff74ced59654f0a2890895f88702fd926ae Thanks. Luca Boccassi --- >From 7d35dff74ced59654f0a2890895f88702fd926ae Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Fri, 10 Nov 2023 10:01:16 +0000 Subject: [PATCH] examples/qos_sched: fix memory leak in args parsing [ upstream commit db8aee153e43375538667c6f861e981a47574476 ] Should free the memory which allocated by strdup(). Fixes: 035b6a4f4bba ("examples/qos_sched: fix out-of-bounds option parsing") Signed-off-by: Chengwen Feng --- examples/qos_sched/args.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index b2959499ae..bccbbe8207 100644 --- a/examples/qos_sched/args.c +++ b/examples/qos_sched/args.c @@ -141,8 +141,10 @@ app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32 n_tokens = rte_strsplit(string, strnlen(string, 32), tokens, n_vals, separator); - if (n_tokens > MAX_OPT_VALUES) + if (n_tokens > MAX_OPT_VALUES) { + free(string); return -1; + } for (i = 0; i < n_tokens; i++) opt_vals[i] = (uint32_t)atol(tokens[i]); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-07 01:05:37.832470859 +0000 +++ 0033-examples-qos_sched-fix-memory-leak-in-args-parsing.patch 2024-03-07 01:05:34.738938743 +0000 @@ -1 +1 @@ -From db8aee153e43375538667c6f861e981a47574476 Mon Sep 17 00:00:00 2001 +From 7d35dff74ced59654f0a2890895f88702fd926ae Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit db8aee153e43375538667c6f861e981a47574476 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ -index e97273152a..8d61d3e454 100644 +index b2959499ae..bccbbe8207 100644 @@ -20 +21 @@ -@@ -103,8 +103,10 @@ app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32 +@@ -141,8 +141,10 @@ app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32