From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 0DB0EF94 for ; Mon, 29 Oct 2018 13:54:17 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id w5-v6so8575110wrt.2 for ; Mon, 29 Oct 2018 05:54:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KzqZOVwtZPfq8WrO6rhi8o0x4evB4m3UoD4SM/C3nxc=; b=SwJKcDdEWzDSrcR+V2CtOMtqbZeKAvgvfpSXM/aHxg+Um0l2acW/fut6AY2c5Qw77Y LG8Y6elsiBn57xJz9Emvblqh+R6k/0mu3r93MVGgqtIT5CIr+0CfCD6uJ7GkQSeCzSOs aMRGRZSC9TVVMGgH8sJBLt/sSQVMW6Fm410FcpWX/g+mblWe+GHJSeWrpgcZxSNF34zB DNqPlCDh/cCgbdZKc0YMo8gFlqKTYZpXy1zeZq9+kqhwmwMi4ixAYI0yPIge1lV2fEFA o0BO1FsIw7AQqWNu3Xi8ojtoXBf9XjjRqr+rbHPlW2NQXdBX7QfOB1Ts6YQZvbGIuNGU Lq7w== X-Gm-Message-State: AGRZ1gICvQ65IHOOIYP+JD3UcydSYSu4L43cQ+m2J2hjwyW5CcSltwAF 0eHSlUb5Ejtu8skuGq6Pvtg= X-Google-Smtp-Source: AJdET5fttWGlub9Tz8IrrwNnGrQO1lP9OnvDvWeAQqJwuc/+EKHbNnBKhqpQxKoKSe+mtRw5qB3J+g== X-Received: by 2002:a5d:54d2:: with SMTP id x18-v6mr13554265wrv.325.1540817656717; Mon, 29 Oct 2018 05:54:16 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id m2-v6sm18858115wrj.80.2018.10.29.05.54.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Oct 2018 05:54:15 -0700 (PDT) From: Luca Boccassi To: Li Han Cc: Konstantin Ananyev , dpdk stable Date: Mon, 29 Oct 2018 12:53:27 +0000 Message-Id: <20181029125329.17729-18-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181029125329.17729-1-bluca@debian.org> References: <20181015115144.27626-1-bluca@debian.org> <20181029125329.17729-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to LTS release 16.11.9 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: Mon, 29 Oct 2018 12:54:17 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/31/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. Luca Boccassi --- >>From 70279544fa63fa39d374b71446b253b492af66c5 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 835e4f93f..ffba1b49b 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.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-10-29 12:48:14.825564651 +0000 +++ 0018-ip_frag-fix-overflow-in-key-comparison.patch 2018-10-29 12:48:14.474417981 +0000 @@ -1,8 +1,10 @@ -From 8721e07478c6edc9565645047742f79c654cfd1b Mon Sep 17 00:00:00 2001 +From 70279544fa63fa39d374b71446b253b492af66c5 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 835e4f93f..ffba1b49b 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 */