patch 'net/mlx5/hws: fix null dereference in rule skip' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 26 14:10:01 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.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 03/02/26. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8953eace5c6d6eb2f73e31ae7a4de4d1f5dcabcc

Thanks.

Kevin

---
>From 8953eace5c6d6eb2f73e31ae7a4de4d1f5dcabcc Mon Sep 17 00:00:00 2001
From: Shani Peretz <shperetz at nvidia.com>
Date: Wed, 21 Jan 2026 10:18:22 +0200
Subject: [PATCH] net/mlx5/hws: fix null dereference in rule skip

[ upstream commit 131cf206f19a789cd0686c8c2052b60c22581b9a ]

When using template API with a represented_port pattern item that
has no spec, mlx5dr_rule_skip() dereferences a NULL pointer when
accessing v->port_id.

Now validating the spec before accessing port_id.

Fixes: 405242c52dd5 ("net/mlx5/hws: add rule object")

Signed-off-by: Shani Peretz <shperetz at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_rule.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index eb06996c90..4f53734eec 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -39,4 +39,8 @@ static void mlx5dr_rule_skip(struct mlx5dr_matcher *matcher,
 	if (mt->item_flags & MLX5_FLOW_ITEM_REPRESENTED_PORT) {
 		v = items[mt->vport_item_id].spec;
+		if (unlikely(!v)) {
+			DR_LOG(NOTICE, "Fail to get vport item, ignoring");
+			return;
+		}
 		vport = flow_hw_conv_port_id(matcher->tbl->ctx, v->port_id);
 		if (unlikely(!vport)) {
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-02-26 10:16:51.709506310 +0000
+++ 0119-net-mlx5-hws-fix-null-dereference-in-rule-skip.patch	2026-02-26 10:16:47.150460107 +0000
@@ -1 +1 @@
-From 131cf206f19a789cd0686c8c2052b60c22581b9a Mon Sep 17 00:00:00 2001
+From 8953eace5c6d6eb2f73e31ae7a4de4d1f5dcabcc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 131cf206f19a789cd0686c8c2052b60c22581b9a ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list