patch 'net/i40e: fix 32-bit build' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:35:18 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/698e296cd7b31f0dcabdf5332498c0d09a5bf1ab

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 698e296cd7b31f0dcabdf5332498c0d09a5bf1ab Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Fri, 29 Oct 2021 11:37:01 +0100
Subject: [PATCH] net/i40e: fix 32-bit build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit d01201829b88fe823e0b99cd13a65e1711cd8973 ]

Got error with: gcc 11.2.1 "cc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)"

Build error:
In function ‘i40e_flow_parse_fdir_pattern’,
    inlined from ‘i40e_flow_parse_fdir_filter’
    at ../drivers/net/i40e/i40e_flow.c:3274:8:
../drivers/net/i40e/i40e_flow.c:3052:69:
    error: writing 1 byte into a region of size 0
    [-Werror=stringop-overflow=]
 3052 |                         filter->input.flow_ext.flexbytes[j] =
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 3053 |                                 raw_spec->pattern[i];
      |                                 ~~~~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/i40e/i40e_flow.c:25:
  ../drivers/net/i40e/i40e_flow.c:
  In function ‘i40e_flow_parse_fdir_filter’:
  ../drivers/net/i40e/i40e_ethdev.h:638:17:
  note: at offset 16 into destination object ‘flexbytes’ of size 16
  638 |         uint8_t flexbytes[RTE_ETH_FDIR_MAX_FLEXLEN];
      |                 ^~~~~~~~~

Fixing by adding range checks.

Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR")

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/i40e/i40e_flow.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index b43f27d354..3862fb80d4 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2901,6 +2901,9 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 
 			for (i = 0; i < raw_spec->length; i++) {
 				j = i + next_dst_off;
+				if (j >= RTE_ETH_FDIR_MAX_FLEXLEN ||
+						j >= I40E_FDIR_MAX_FLEX_LEN)
+					break;
 				filter->input.flow_ext.flexbytes[j] =
 					raw_spec->pattern[i];
 				filter->input.flow_ext.flex_mask[j] =
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:12.518854015 +0100
+++ 0114-net-i40e-fix-32-bit-build.patch	2021-11-30 16:50:05.930874557 +0100
@@ -1 +1 @@
-From d01201829b88fe823e0b99cd13a65e1711cd8973 Mon Sep 17 00:00:00 2001
+From 698e296cd7b31f0dcabdf5332498c0d09a5bf1ab Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d01201829b88fe823e0b99cd13a65e1711cd8973 ]
+
@@ -33 +34,0 @@
-Cc: stable at dpdk.org
@@ -42 +43 @@
-index 9acaa18751..c9676caab5 100644
+index b43f27d354..3862fb80d4 100644
@@ -45 +46 @@
-@@ -3049,6 +3049,9 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+@@ -2901,6 +2901,9 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,


More information about the stable mailing list