[dpdk-stable] patch 'kni: fix segmented mbuf data overflow' has been queued to LTS release 18.11.3

Kevin Traynor ktraynor at redhat.com
Wed Aug 28 15:41:38 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.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 09/04/19. 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/8f00090d03437ad9583389f9782032d65e90eacc

Thanks.

Kevin Traynor

---
>From 8f00090d03437ad9583389f9782032d65e90eacc Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Thu, 11 Jul 2019 13:35:07 +0100
Subject: [PATCH] kni: fix segmented mbuf data overflow

[ upstream commit 60d7debe922b14dcda96766fabbe7ad3f012800c ]

'kni_net_rx_lo_fifo()' can get segmented buffers, using 'pkt_len' for
that case will be wrong and some values can cause buffer overflow
in destination mbuf data.

Fixes: d89a58dfe90b ("kni: support chained mbufs")

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
 kernel/linux/kni/kni_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 96dc93949..432d56a19 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -441,5 +441,5 @@ kni_net_rx_lo_fifo(struct kni_dev *kni)
 		for (i = 0; i < num; i++) {
 			kva = pa2kva(kni->pa[i]);
-			len = kva->pkt_len;
+			len = kva->data_len;
 			data_kva = kva2data_kva(kva);
 			kni->va[i] = pa2va(kni->pa[i], kva);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-08-28 14:32:31.898824263 +0100
+++ 0003-kni-fix-segmented-mbuf-data-overflow.patch	2019-08-28 14:32:31.580958720 +0100
@@ -1 +1 @@
-From 60d7debe922b14dcda96766fabbe7ad3f012800c Mon Sep 17 00:00:00 2001
+From 8f00090d03437ad9583389f9782032d65e90eacc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60d7debe922b14dcda96766fabbe7ad3f012800c ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index a736407e6..7bd3a9f1e 100644
+index 96dc93949..432d56a19 100644
@@ -23 +24 @@
-@@ -439,5 +439,5 @@ kni_net_rx_lo_fifo(struct kni_dev *kni)
+@@ -441,5 +441,5 @@ kni_net_rx_lo_fifo(struct kni_dev *kni)


More information about the stable mailing list