[dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to LTS release 17.11.5

Yongseok Koh yskoh at mellanox.com
Fri Nov 30 00:11:16 CET 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/01/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Yongseok

---
>From 2a4584dd9495b6213312930b29f6d2996771a8ce Mon Sep 17 00:00:00 2001
From: Li Han <han.li1 at zte.com.cn>
Date: Wed, 1 Aug 2018 22:01:03 -0400
Subject: [PATCH] ip_frag: fix overflow in key comparison

[ upstream commit 8721e07478c6edc9565645047742f79c654cfd1b ]

in struct ip_frag_key,src_dst[] type is uint64_t.
but "val" which to store the calc restult ,type is uint32_t.
we may lost high 32 bit key. and function return value is int,
but it won't return < 0.

Signed-off-by: Li Han <han.li1 at zte.com.cn>
Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
---
 lib/librte_ip_frag/ip_frag_common.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ip_frag/ip_frag_common.h b/lib/librte_ip_frag/ip_frag_common.h
index 9f5619651..472185f6b 100644
--- a/lib/librte_ip_frag/ip_frag_common.h
+++ b/lib/librte_ip_frag/ip_frag_common.h
@@ -98,10 +98,11 @@ ip_frag_key_invalidate(struct ip_frag_key * key)
 }
 
 /* compare two keys */
-static inline int
+static inline uint64_t
 ip_frag_key_cmp(const struct ip_frag_key * k1, const struct ip_frag_key * k2)
 {
-	uint32_t i, val;
+	uint32_t i;
+	uint64_t val;
 	val = k1->id ^ k2->id;
 	for (i = 0; i < k1->key_len; i++)
 		val |= k1->src_dst[i] ^ k2->src_dst[i];
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-29 15:01:48.843449420 -0800
+++ 0082-ip_frag-fix-overflow-in-key-comparison.patch	2018-11-29 15:01:45.226961000 -0800
@@ -1,8 +1,10 @@
-From 8721e07478c6edc9565645047742f79c654cfd1b Mon Sep 17 00:00:00 2001
+From 2a4584dd9495b6213312930b29f6d2996771a8ce Mon Sep 17 00:00:00 2001
 From: Li Han <han.li1 at zte.com.cn>
 Date: Wed, 1 Aug 2018 22:01:03 -0400
 Subject: [PATCH] ip_frag: fix overflow in key comparison
 
+[ upstream commit 8721e07478c6edc9565645047742f79c654cfd1b ]
+
 in struct ip_frag_key,src_dst[] type is uint64_t.
 but "val" which to store the calc restult ,type is uint32_t.
 we may lost high 32 bit key. and function return value is int,
@@ -15,10 +17,10 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_ip_frag/ip_frag_common.h b/lib/librte_ip_frag/ip_frag_common.h
-index 0fdcc7d0f..0f62e2e16 100644
+index 9f5619651..472185f6b 100644
 --- a/lib/librte_ip_frag/ip_frag_common.h
 +++ b/lib/librte_ip_frag/ip_frag_common.h
-@@ -75,10 +75,11 @@ ip_frag_key_invalidate(struct ip_frag_key * key)
+@@ -98,10 +98,11 @@ ip_frag_key_invalidate(struct ip_frag_key * key)
  }
  
  /* compare two keys */


More information about the stable mailing list