[dpdk-stable] patch 'net/sfc: check ID overflow in action port ID' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 12 15:04:52 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/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/810cbe8ff07bdfebc74287bbbaa0cb6c1e7b2f20

Thanks.

Luca Boccassi

---
>From 810cbe8ff07bdfebc74287bbbaa0cb6c1e7b2f20 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov at oktetlabs.ru>
Date: Thu, 27 May 2021 17:27:22 +0300
Subject: [PATCH] net/sfc: check ID overflow in action port ID

[ upstream commit fb3c4efb65be520082a34c0afb85d492ff093c82 ]

The container in the action configuration is U32,
but the ID is U16, and overflow check is missing.

Fixes: 1fb65e4dae8a ("net/sfc: support flow action port ID in transfer rules")

Signed-off-by: Ivan Malov <ivan.malov at oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton at xilinx.com>
---
 drivers/net/sfc/sfc_mae.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 2f02fcdd19..abeee38a2f 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -2000,6 +2000,9 @@ sfc_mae_rule_parse_action_port_id(struct sfc_adapter *sa,
 	uint16_t port_id;
 	int rc;
 
+	if (conf->id > UINT16_MAX)
+		return EOVERFLOW;
+
 	port_id = (conf->original != 0) ? sas->port_id : conf->id;
 
 	rc = sfc_mae_switch_port_by_ethdev(mae->switch_domain_id,
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-12 13:41:39.613393781 +0100
+++ 0057-net-sfc-check-ID-overflow-in-action-port-ID.patch	2021-07-12 13:41:36.454121861 +0100
@@ -1 +1 @@
-From fb3c4efb65be520082a34c0afb85d492ff093c82 Mon Sep 17 00:00:00 2001
+From 810cbe8ff07bdfebc74287bbbaa0cb6c1e7b2f20 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fb3c4efb65be520082a34c0afb85d492ff093c82 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 33bff275cf..2ea2d63c5c 100644
+index 2f02fcdd19..abeee38a2f 100644
@@ -23 +24 @@
-@@ -2653,6 +2653,9 @@ sfc_mae_rule_parse_action_port_id(struct sfc_adapter *sa,
+@@ -2000,6 +2000,9 @@ sfc_mae_rule_parse_action_port_id(struct sfc_adapter *sa,


More information about the stable mailing list