From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 437F61B4FA for ; Fri, 23 Nov 2018 11:27:22 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6E05583F4C; Fri, 23 Nov 2018 10:27:21 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED2DB6A6B2; Fri, 23 Nov 2018 10:27:19 +0000 (UTC) From: Kevin Traynor To: Li Han Cc: Konstantin Ananyev , dpdk stable Date: Fri, 23 Nov 2018 10:26:05 +0000 Message-Id: <20181123102713.17309-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 23 Nov 2018 10:27:21 +0000 (UTC) Subject: [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 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: , X-List-Received-Date: Fri, 23 Nov 2018 10:27:22 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 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/29/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. Kevin Traynor --- >>From 362b57a19d3d606c23dd4ce198d608e34351b22f Mon Sep 17 00:00:00 2001 From: Li Han 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 Acked-by: Konstantin Ananyev --- 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 197acf8d8..d7980a304 100644 --- a/lib/librte_ip_frag/ip_frag_common.h +++ b/lib/librte_ip_frag/ip_frag_common.h @@ -70,8 +70,9 @@ 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++) -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-23 10:22:54.282066154 +0000 +++ 0001-ip_frag-fix-overflow-in-key-comparison.patch 2018-11-23 10:22:54.000000000 +0000 @@ -1,8 +1,10 @@ -From 8721e07478c6edc9565645047742f79c654cfd1b Mon Sep 17 00:00:00 2001 +From 362b57a19d3d606c23dd4ce198d608e34351b22f Mon Sep 17 00:00:00 2001 From: Li Han 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 197acf8d8..d7980a304 100644 --- a/lib/librte_ip_frag/ip_frag_common.h +++ b/lib/librte_ip_frag/ip_frag_common.h -@@ -76,8 +76,9 @@ ip_frag_key_invalidate(struct ip_frag_key * key) +@@ -70,8 +70,9 @@ ip_frag_key_invalidate(struct ip_frag_key * key) /* compare two keys */ -static inline int