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 230BDA0C41 for ; Tue, 30 Nov 2021 17:43:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 128D141142; Tue, 30 Nov 2021 17:43:30 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 24027410F7 for ; Tue, 30 Nov 2021 17:43:28 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (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-1.canonical.com (Postfix) with ESMTPS id D80BD3F044 for ; Tue, 30 Nov 2021 16:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290607; bh=CVR0R+j1NxJQfWpk6a0Fq5AnCBUl+xDtNGt13B7oZAA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Tc+TCCa1hfU5B2eqESpaxURzFMAQVXZyeYIGQBXawslWsTeZRMGntYY4ElHe0b5YZ bnq5Lk0RXIFoBnyu+7nUZUSm0jM/jxvV5mpRvHbGW3oW7thAwcnzTL2MBYCFWKscWb X1wrw2rhmqtybFW0PFvKwcVQFn+FJu7hJeLlR7uYp926yEegH/Mx/Eq1Wu57aMWsNr +TVbFghahVtroQD0AYq6CoD3suMAUkdNFd2ZjW8MN9as+aq6FAUCX53SraehbGvYKH W/4HjChaRyf/3A/V/uvkcMo100HgJwaH1EWfKrXw0XltoL6U8WJ0EsDOcSdhDgxMqc in6+s30N5Lzuw== Received: by mail-ed1-f70.google.com with SMTP id v22-20020a50a456000000b003e7cbfe3dfeso17455289edb.11 for ; Tue, 30 Nov 2021 08:43:27 -0800 (PST) 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=CVR0R+j1NxJQfWpk6a0Fq5AnCBUl+xDtNGt13B7oZAA=; b=DB4I5zvnzhU16phCAxemo2V5OH4XfahHxIsl8czotXjKWF/8BfJypcn6WKcbH9fbwx UKvFur/MZ/31x28hdYocVuHEwku756tiQevshUQz4kctVz0ieU77e8swxXIB0MMOAefG PnOPJbEvHaGmcW+bkikjNbOiCGqDG46Jm+3lcMbrVbgykUmsUvY9CUA3cof8MpIGlnDb zVhU+LiZfZVnrklZs+9Jj7eCZtLlFKp9YhnBB5uuSMgAPeIbTIlBmyl7Y+Mpr8gL4SYX zDIksz3kmGr0JHehmr+xekODKTB3Efw2Na13XRdNIHA1+rOazCa5G/vfadz7bwIzBJoL C+pw== X-Gm-Message-State: AOAM533ZLx2A6GWWUopPOCHN49m6Knu447IKcDR5syUAzN9WZw00/o9b 2A/1g1ZFsriKfq6KVAD/wCIDbyOMFM0lrOC3ivO+DyjEq+T7bhybAKTptjDo9ETgIDm6Fb0vmtZ h9luB1w9aqA9PWpv6njGNkZca X-Received: by 2002:a05:6402:124e:: with SMTP id l14mr169633edw.74.1638290607492; Tue, 30 Nov 2021 08:43:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbjYiB22iRSqZtQg46/CV7isLf3x2jGfFCP79MIHSQqa7KIwXx6TXGKQMTSasH8HANnZeWww== X-Received: by 2002:a05:6402:124e:: with SMTP id l14mr169618edw.74.1638290607360; Tue, 30 Nov 2021 08:43:27 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id kx3sm9157364ejc.112.2021.11.30.08.43.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:43:26 -0800 (PST) From: christian.ehrhardt@canonical.com To: Naga Harish K S V Cc: Jay Jayatheerthan , David Marchand , dpdk stable Subject: patch 'eventdev/eth_tx: fix queue delete logic' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:35:45 +0100 Message-Id: <20211130163605.2460997-141-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-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.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/91f6ce93be36b0ce3e7eaee0afb194c4b9474320 Thanks. Christian Ehrhardt --- >From 91f6ce93be36b0ce3e7eaee0afb194c4b9474320 Mon Sep 17 00:00:00 2001 From: Naga Harish K S V Date: Tue, 9 Nov 2021 01:33:33 -0600 Subject: [PATCH] eventdev/eth_tx: fix queue delete logic [ upstream commit 741b499e6421ff93542d17c57f536b9d8e9bb443 ] This patch fixes heap-use-after-free reported by ASan. The application can use the queue_id as `-1` to delete all the queues of the eth_device that are added to tx_adapter instance. In above case, the queue_del API is trying to use number of queues from adapter level instead of eth_device queues. When there are queues added from multiple eth devices, it will result in heap-use-after-free as reported by ASAN. This patch fixes the queue_del API to use correct number of queues. Bugzilla ID: 869 Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") Signed-off-by: Naga Harish K S V Acked-by: Jay Jayatheerthan Tested-by: David Marchand --- 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 88abd45d17..e4dbae7bc5 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -817,7 +817,7 @@ txa_service_queue_del(uint8_t id, uint16_t i, q, nb_queues; int ret = 0; - nb_queues = txa->nb_queues; + nb_queues = txa->txa_ethdev[port_id].nb_queues; if (nb_queues == 0) return 0; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:14.051103723 +0100 +++ 0141-eventdev-eth_tx-fix-queue-delete-logic.patch 2021-11-30 16:50:05.986874968 +0100 @@ -1 +1 @@ -From 741b499e6421ff93542d17c57f536b9d8e9bb443 Mon Sep 17 00:00:00 2001 +From 91f6ce93be36b0ce3e7eaee0afb194c4b9474320 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 741b499e6421ff93542d17c57f536b9d8e9bb443 ] + @@ -21 +22,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 da55d2c2dc..c17f33f098 100644 ---- a/lib/eventdev/rte_event_eth_tx_adapter.c -+++ b/lib/eventdev/rte_event_eth_tx_adapter.c -@@ -864,7 +864,7 @@ txa_service_queue_del(uint8_t id, +diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +index 88abd45d17..e4dbae7bc5 100644 +--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c ++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +@@ -817,7 +817,7 @@ txa_service_queue_del(uint8_t id,