[dpdk-stable] patch 'app/testpmd: fix copy of raw flow item' has been queued to stable release 18.02.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 15 15:46:12 CEST 2018


Hi,

FYI, your patch has been queued to stable release 18.02.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/16/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 2671260c07e98cb089ec4aef4de90029cabfd1a1 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang at intel.com>
Date: Mon, 7 May 2018 17:50:44 +0800
Subject: [PATCH] app/testpmd: fix copy of raw flow item

[ upstream commit 67af7ecc52ec0abdec3e9d5b35dcd4dc78b595ce ]

When calculate memory size of an RTE_FLOW_ITEM_TYPE_RAW 's mask
mask->length is not the real size of binary pattern, it should take
spec->length, or memory size will be over counted (0xffff) and invalid
memory be access during following memcpy.

Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")

Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
---
 app/test-pmd/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 2058e6ec8..a8e511f5f 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1015,7 +1015,8 @@ flow_item_spec_copy(void *buf, const struct rte_flow_item *item,
 		src.raw = item_spec;
 		dst.raw = buf;
 		size = offsetof(struct rte_flow_item_raw, pattern) +
-			src.raw->length * sizeof(*src.raw->pattern);
+			((const struct rte_flow_item_raw *)item->spec)->
+			length * sizeof(*src.raw->pattern);
 		if (dst.raw)
 			memcpy(dst.raw, src.raw, size);
 		break;
-- 
2.14.2



More information about the stable mailing list