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 05C0EA0540 for ; Thu, 7 Jul 2022 09:58:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 018D1406B4; Thu, 7 Jul 2022 09:58:23 +0200 (CEST) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 06050406B4 for ; Thu, 7 Jul 2022 09:58:22 +0200 (CEST) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id A5F0641017 for ; Thu, 7 Jul 2022 07:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180701; bh=/r8L/+imko4lUK2TvnsewdujN5shBPCcdiqtUBHC8Dk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Zu21pEq85lU+ajZ/ECjlkD/461O6vraZeG+iSB+aJ9YihA5iluRos4XXW+ljx7nB/ nDVY70YV0AfBPw5iqRceadY9d8P+6phmuBm+P8nHY/T5htdzDvsf+N4WVj9AU9HUVJ VY4OONsF++O9UOD7zDlp1vXsChWPcKGSbqY8RtCXlnxvMCAwNiMd9OboCC8PYGRvQ+ g/4i0s1J+0WG9JpMXLnowfSo4gBNJVl+SK+OTlwrbc1jw8PSJYOh5IYHjWtH/jCPH/ fo/ohJg4k5lvX6XJvcCj1XfZJdrN/jPCDcVqi2h6IPpJ4sNUjx06pqMDrtNgLzC8jW r4N8xLFFxgcSg== Received: by mail-ed1-f69.google.com with SMTP id j6-20020a05640211c600b0043a8ea2c138so2729353edw.2 for ; Thu, 07 Jul 2022 00:58:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/r8L/+imko4lUK2TvnsewdujN5shBPCcdiqtUBHC8Dk=; b=a/8P7+LWzfmOMPzrFxg1u04zPnZHEoyHHTuIMlM/v6Da6GYWdDJiNZLuIC/H9+/eno xlM/ZAnt5xhfzKqrKD2JFzllZ1iNeaZ1KKevz1J+4td/fW8kx66GkwEkbxhYE80IbTl9 CqZXcHwJjLOmndV1Zmm62qGKFAdXSP78dFnMe3nBxwMT9WPke/crKtDTreMNMGezyVX4 z826zx0svvm/See+6KQ4MdYYYLcuBsYRVg2I4BUnapPfzt7v4xDPz9E/6YLM9HqgkVCe pzTz5zWJ0CIICOKIuNnswap8xC611+ZlHo45wkLzIE0wLdk1o8BYEifXuWvBKMPY/0iO Aqjw== X-Gm-Message-State: AJIora9gI79Rp1r6s7kmGZNvowYiPSODmQcZQQFoMo0SZk8pPvnFKkRk mZ9K3yPJXUiik5JEm7sMrYGjOfXjrmxP0KKqxGj2/0esj+rsZThPCjwEJThy5LUaom1WdQB99Z7 6uwtz048e/CsReNq5pSj5c42I X-Received: by 2002:a05:6402:268c:b0:43a:7a08:bb67 with SMTP id w12-20020a056402268c00b0043a7a08bb67mr17358899edd.358.1657180701273; Thu, 07 Jul 2022 00:58:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s39AVQ01nssdM0tky1+j7ZJ0Yg8xphC4AQ51Mu6UjARjXqwP9wCMC6nacOIYsJnAf6EPSt4w== X-Received: by 2002:a05:6402:268c:b0:43a:7a08:bb67 with SMTP id w12-20020a056402268c00b0043a7a08bb67mr17358884edd.358.1657180701091; Thu, 07 Jul 2022 00:58:21 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id kv10-20020a17090778ca00b006f3ef214ddesm547277ejc.68.2022.07.07.00.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:58:20 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Naga Harish K S V Cc: Jay Jayatheerthan , dpdk stable Subject: patch 'eventdev/eth_tx: fix adapter creation' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:55 +0200 Message-Id: <20220707075522.194223-60-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.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 19.11.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/ad8183f3cb3b2c1e0a386f16a2305e3a209c9790 Thanks. Christian Ehrhardt --- >From ad8183f3cb3b2c1e0a386f16a2305e3a209c9790 Mon Sep 17 00:00:00 2001 From: Naga Harish K S V Date: Thu, 16 Jun 2022 10:44:58 +0530 Subject: [PATCH] eventdev/eth_tx: fix adapter creation [ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ] During adapter create, memory is allocated for storing event port configuration which is freed during adapter free. The following error is seen during free "EAL: Error: Invalid memory" The service data pointer storage for txa_service_data_array is allocated during adapter create with incorrect size which is less than the required size. Initialization of this memory causes buffer overflow and result in metadata overwrite of event port config memory allocated above and results in the above error message during free. Allocating the correct size of memory for txa_service_data_array prevents overwriting other memory areas like event port config memory. Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") Signed-off-by: Naga Harish K S V Acked-by: Jay Jayatheerthan --- lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c index 38bc79c51b..cab4bd0811 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -223,7 +223,7 @@ txa_service_data_init(void) if (txa_service_data_array == NULL) { txa_service_data_array = txa_memzone_array_get("txa_service_data_array", - sizeof(int), + sizeof(*txa_service_data_array), RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE); if (txa_service_data_array == NULL) return -ENOMEM; -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:13.682328126 +0200 +++ 0060-eventdev-eth_tx-fix-adapter-creation.patch 2022-07-07 09:54:10.965824617 +0200 @@ -1 +1 @@ -From 3d6e9dd493784d077b9a214a0937331fa05f8abf Mon Sep 17 00:00:00 2001 +From ad8183f3cb3b2c1e0a386f16a2305e3a209c9790 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ] + @@ -22 +23,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ - lib/eventdev/rte_event_eth_tx_adapter.c | 2 +- + lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +- @@ -30,5 +31,5 @@ -diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c -index 1b304f0a73..c700fb7b1f 100644 ---- a/lib/eventdev/rte_event_eth_tx_adapter.c -+++ b/lib/eventdev/rte_event_eth_tx_adapter.c -@@ -224,7 +224,7 @@ txa_service_data_init(void) +diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +index 38bc79c51b..cab4bd0811 100644 +--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c ++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +@@ -223,7 +223,7 @@ txa_service_data_init(void)