patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ivan Malov <>
Cc:, Andrew Rybchenko <>,
	Andy Moreton <>
Subject: [dpdk-stable] [PATCH] net/sfc: check for ID overflow in action PORT ID
Date: Thu, 27 May 2021 17:27:22 +0300
Message-ID: <> (raw)

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 <>
Reviewed-by: Andrew Rybchenko <>
Reviewed-by: Andy Moreton <>
 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 a2c0aa143..9b7163e82 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -2563,6 +2563,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,

             reply	other threads:[~2021-05-27 14:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 14:27 Ivan Malov [this message]
2021-07-07 10:02 ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone