patch 'net/mlx5/hws: fix null dereference in rule skip' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:56:34 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.5
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/22/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ae6d577bb656acf23100f28bbeaec6aee8a7b272
Thanks.
Luca Boccassi
---
>From ae6d577bb656acf23100f28bbeaec6aee8a7b272 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 b7517c7d77..286bf941b0 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -28,6 +28,10 @@ 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)) {
DR_LOG(ERR, "Fail to map port ID %d, ignoring", v->port_id);
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:46.755541061 +0000
+++ 0092-net-mlx5-hws-fix-null-dereference-in-rule-skip.patch 2026-02-20 14:55:43.332193244 +0000
@@ -1 +1 @@
-From 131cf206f19a789cd0686c8c2052b60c22581b9a Mon Sep 17 00:00:00 2001
+From ae6d577bb656acf23100f28bbeaec6aee8a7b272 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 131cf206f19a789cd0686c8c2052b60c22581b9a ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index eb06996c90..4f53734eec 100644
+index b7517c7d77..286bf941b0 100644
@@ -25 +26 @@
-@@ -38,6 +38,10 @@ static void mlx5dr_rule_skip(struct mlx5dr_matcher *matcher,
+@@ -28,6 +28,10 @@ static void mlx5dr_rule_skip(struct mlx5dr_matcher *matcher,
More information about the stable
mailing list