patch 'net/ixgbe: fix memory leak in security flows' has been queued to stable release 24.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 20 15:56:39 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/2b9cb983dd83e3b92fc347d232675201a74e9f1a

Thanks.

Luca Boccassi

---
>From 2b9cb983dd83e3b92fc347d232675201a74e9f1a Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov at intel.com>
Date: Fri, 13 Feb 2026 09:10:04 +0000
Subject: [PATCH] net/ixgbe: fix memory leak in security flows

[ upstream commit 590ad6c13b37fccedc5782239feed914ee91403f ]

Currently, security flows are implemented as a special case and do not
go through the normal flow create/destroy infrastructure. However,
because of that, it is impossible to destroy such flows once created.
Fix it by adding a flag to rte_flow indicating that it is a security
flow, so that it can be destroyed later.

Additionally, security flows return pointer to allocated `rte_flow`
struct unconditionally, even though the underlying call to ipsec code
might have failed. Fix that by checking the return value from the filter
function before returning.

Fixes: 9a0752f498d2 ("net/ixgbe: enable inline IPsec")

Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Radu Nicolau <radu.nicolau at intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.h |  2 ++
 drivers/net/ixgbe/ixgbe_flow.c   | 13 ++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 7804b4ca03..c88805132d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -359,6 +359,8 @@ struct ixgbe_l2_tn_info {
 
 struct rte_flow {
 	enum rte_filter_type filter_type;
+	/* security flows are not rte_filter_type */
+	bool is_security;
 	void *rule;
 };
 
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index d093c9f661..3808137837 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -3062,8 +3062,12 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
 
 #ifdef RTE_LIB_SECURITY
 	/* ESP flow not really a flow*/
-	if (ntuple_filter.proto == IPPROTO_ESP)
+	if (ntuple_filter.proto == IPPROTO_ESP) {
+		if (ret != 0)
+			goto out;
+		flow->is_security = true;
 		return flow;
+	}
 #endif
 
 	if (!ret) {
@@ -3352,6 +3356,12 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
 		IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
 	struct ixgbe_rss_conf_ele *rss_filter_ptr;
 
+	/* Special case for SECURITY flows */
+	if (flow->is_security) {
+		ret = 0;
+		goto free;
+	}
+
 	switch (filter_type) {
 	case RTE_ETH_FILTER_NTUPLE:
 		ntuple_filter_ptr = (struct ixgbe_ntuple_filter_ele *)
@@ -3444,6 +3454,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
 		return ret;
 	}
 
+free:
 	TAILQ_FOREACH(ixgbe_flow_mem_ptr, &ixgbe_flow_list, entries) {
 		if (ixgbe_flow_mem_ptr->flow == pmd_flow) {
 			TAILQ_REMOVE(&ixgbe_flow_list,
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-02-20 14:55:46.949094589 +0000
+++ 0097-net-ixgbe-fix-memory-leak-in-security-flows.patch	2026-02-20 14:55:43.348193516 +0000
@@ -1 +1 @@
-From 590ad6c13b37fccedc5782239feed914ee91403f Mon Sep 17 00:00:00 2001
+From 2b9cb983dd83e3b92fc347d232675201a74e9f1a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 590ad6c13b37fccedc5782239feed914ee91403f ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -24,2 +25,2 @@
- drivers/net/intel/ixgbe/ixgbe_ethdev.h |  2 ++
- drivers/net/intel/ixgbe/ixgbe_flow.c   | 13 ++++++++++++-
+ drivers/net/ixgbe/ixgbe_ethdev.h |  2 ++
+ drivers/net/ixgbe/ixgbe_flow.c   | 13 ++++++++++++-
@@ -28,4 +29,4 @@
-diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
-index 5393c81363..5dbd659941 100644
---- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h
-+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
+diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
+index 7804b4ca03..c88805132d 100644
+--- a/drivers/net/ixgbe/ixgbe_ethdev.h
++++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -41,4 +42,4 @@
-diff --git a/drivers/net/intel/ixgbe/ixgbe_flow.c b/drivers/net/intel/ixgbe/ixgbe_flow.c
-index 27d2ba1132..90072e757e 100644
---- a/drivers/net/intel/ixgbe/ixgbe_flow.c
-+++ b/drivers/net/intel/ixgbe/ixgbe_flow.c
+diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
+index d093c9f661..3808137837 100644
+--- a/drivers/net/ixgbe/ixgbe_flow.c
++++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -59 +60 @@
-@@ -3350,6 +3354,12 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
+@@ -3352,6 +3356,12 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
@@ -72 +73 @@
-@@ -3442,6 +3452,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
+@@ -3444,6 +3454,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,


More information about the stable mailing list