[dpdk-stable] patch 'net/i40e: fix use after free in FDIR release' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 12 15:04:18 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

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/14/21. 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/5f70ea4e97394bac64f00630ca66125025f39eb8

Thanks.

Luca Boccassi

---
>From 5f70ea4e97394bac64f00630ca66125025f39eb8 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu at intel.com>
Date: Fri, 4 Jun 2021 10:02:01 +0800
Subject: [PATCH] net/i40e: fix use after free in FDIR release

[ upstream commit 4b5b8ce8ffe57c611ccee438dea67b612021cfba ]

The original code use a heap pointer after it is freed.

Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")

Signed-off-by: Dapeng Yu <dapengx.yu at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index ab924e8538..a447cfdd92 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -300,11 +300,11 @@ i40e_fdir_teardown(struct i40e_pf *pf)
 	if (err)
 		PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off");
 
-	i40e_dev_rx_queue_release(pf->fdir.rxq);
 	rte_eth_dma_zone_free(dev, "fdir_rx_ring", pf->fdir.rxq->queue_id);
+	i40e_dev_rx_queue_release(pf->fdir.rxq);
 	pf->fdir.rxq = NULL;
-	i40e_dev_tx_queue_release(pf->fdir.txq);
 	rte_eth_dma_zone_free(dev, "fdir_tx_ring", pf->fdir.txq->queue_id);
+	i40e_dev_tx_queue_release(pf->fdir.txq);
 	pf->fdir.txq = NULL;
 	i40e_vsi_release(vsi);
 	pf->fdir.fdir_vsi = NULL;
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-12 13:41:38.019285281 +0100
+++ 0023-net-i40e-fix-use-after-free-in-FDIR-release.patch	2021-07-12 13:41:36.274118111 +0100
@@ -1 +1 @@
-From 4b5b8ce8ffe57c611ccee438dea67b612021cfba Mon Sep 17 00:00:00 2001
+From 5f70ea4e97394bac64f00630ca66125025f39eb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4b5b8ce8ffe57c611ccee438dea67b612021cfba ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index 3c7cf1ba90..20658816ee 100644
+index ab924e8538..a447cfdd92 100644
@@ -21 +22 @@
-@@ -301,11 +301,11 @@ i40e_fdir_teardown(struct i40e_pf *pf)
+@@ -300,11 +300,11 @@ i40e_fdir_teardown(struct i40e_pf *pf)


More information about the stable mailing list