[dpdk-stable] patch 'common/sfc_efx/base: enhance field ID check in field set API' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:17:08 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.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 02/07/21. 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e7fd91ef16c4f092aa5a39a8a871d2054ac53a45

Thanks.

Luca Boccassi

---
>From e7fd91ef16c4f092aa5a39a8a871d2054ac53a45 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov at oktetlabs.ru>
Date: Wed, 6 Jan 2021 13:06:01 +0300
Subject: [PATCH] common/sfc_efx/base: enhance field ID check in field set API

[ upstream commit 5da37ab56e144686e5cc87153c9bd929db7c11b7 ]

A field ID passed to the API may point to a gap in the array
of field descriptors. Turn down such invocations as improper.

Fixes: 370ed675a952 ("common/sfc_efx/base: support setting PPORT in match spec")

Reviewed-by: Andy Moreton <amoreton at xilinx.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Signed-off-by: Ivan Malov <ivan.malov at oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx_mae.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index eb91753ec5..cc5d8cfc4f 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -690,14 +690,20 @@ efx_mae_match_spec_field_set(
 		goto fail2;
 	}
 
+	if (descp->emmd_mask_size == 0) {
+		/* The ID points to a gap in the array of field descriptors. */
+		rc = EINVAL;
+		goto fail3;
+	}
+
 	if (value_size != descp->emmd_value_size) {
 		rc = EINVAL;
-		goto fail3;
+		goto fail4;
 	}
 
 	if (mask_size != descp->emmd_mask_size) {
 		rc = EINVAL;
-		goto fail4;
+		goto fail5;
 	}
 
 	if (descp->emmd_endianness == EFX_MAE_FIELD_BE) {
@@ -741,6 +747,8 @@ efx_mae_match_spec_field_set(
 
 	return (0);
 
+fail5:
+	EFSYS_PROBE(fail5);
 fail4:
 	EFSYS_PROBE(fail4);
 fail3:
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.603278648 +0000
+++ 0142-common-sfc_efx-base-enhance-field-ID-check-in-field-.patch	2021-02-05 11:18:29.026695300 +0000
@@ -1 +1 @@
-From 5da37ab56e144686e5cc87153c9bd929db7c11b7 Mon Sep 17 00:00:00 2001
+From e7fd91ef16c4f092aa5a39a8a871d2054ac53a45 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5da37ab56e144686e5cc87153c9bd929db7c11b7 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list