From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A0982A0613 for ; Wed, 28 Aug 2019 15:42:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 90A951C229; Wed, 28 Aug 2019 15:42:46 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 1261D1C219 for ; Wed, 28 Aug 2019 15:42:45 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81DC36CFC3; Wed, 28 Aug 2019 13:42:44 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-52.ams2.redhat.com [10.36.117.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D8DA45D4; Wed, 28 Aug 2019 13:42:43 +0000 (UTC) From: Kevin Traynor To: Ferruh Yigit Cc: Stephen Hemminger , dpdk stable Date: Wed, 28 Aug 2019 14:41:38 +0100 Message-Id: <20190828134234.20547-2-ktraynor@redhat.com> In-Reply-To: <20190828134234.20547-1-ktraynor@redhat.com> References: <20190828134234.20547-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 28 Aug 2019 13:42:44 +0000 (UTC) Subject: [dpdk-stable] patch 'kni: fix segmented mbuf data overflow' has been queued to LTS release 18.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" 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 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 Acked-by: Stephen Hemminger --- 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@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)