[dpdk-stable] patch 'net/netvsc: fix stale value after free' has been queued to LTS release 18.11.11

Kevin Traynor ktraynor at redhat.com
Thu Nov 5 13:39:11 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.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 11/10/20. 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/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/510aa52a7861e0c6e6853efb40c2f42e7b85466f

Thanks.

Kevin.

---
>From 510aa52a7861e0c6e6853efb40c2f42e7b85466f Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Mon, 10 Aug 2020 19:33:13 -0700
Subject: [PATCH] net/netvsc: fix stale value after free

[ upstream commit 0caf5621a4cdaadb40c7686d86bf58dd841057d3 ]

chim_index could potentially be used in other hn_txdesc when re-allocated.
Mark it as invalid to prevent stale value being used.

Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")

Signed-off-by: Long Li <longli at microsoft.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/netvsc/hn_rxtx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 5d580f6f7f..cc8bb7ed95 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -388,6 +388,8 @@ hn_nvs_send_completed(struct rte_eth_dev *dev, uint16_t queue_id,
 	}
 
-	if (txd->chim_index != NVS_CHIM_IDX_INVALID)
+	if (txd->chim_index != NVS_CHIM_IDX_INVALID) {
 		hn_chim_free(hv, txd->chim_index);
+		txd->chim_index = NVS_CHIM_IDX_INVALID;
+	}
 
 	rte_pktmbuf_free(txd->m);
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-05 12:38:54.349028952 +0000
+++ 0004-net-netvsc-fix-stale-value-after-free.patch	2020-11-05 12:38:54.146895947 +0000
@@ -1 +1 @@
-From 0caf5621a4cdaadb40c7686d86bf58dd841057d3 Mon Sep 17 00:00:00 2001
+From 510aa52a7861e0c6e6853efb40c2f42e7b85466f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0caf5621a4cdaadb40c7686d86bf58dd841057d3 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index c8c4ee10c8..a388ff2588 100644
+index 5d580f6f7f..cc8bb7ed95 100644
@@ -22 +23 @@
-@@ -420,6 +420,8 @@ hn_nvs_send_completed(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -388,6 +388,8 @@ hn_nvs_send_completed(struct rte_eth_dev *dev, uint16_t queue_id,



More information about the stable mailing list