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

Shani Peretz shperetz at nvidia.com
Tue Mar 31 08:24:49 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

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

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/f4bea846177d6953275bb881d3e5f3caf225c95d

Thanks.

Shani

---
>From f4bea846177d6953275bb881d3e5f3caf225c95d 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 9ca89a7889..381270088f 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 e70201dffa..998116ef65 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -3059,8 +3059,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) {
@@ -3349,6 +3353,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 *)
@@ -3441,6 +3451,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.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-31 00:32:36.984554820 +0300
+++ 0090-net-ixgbe-fix-memory-leak-in-security-flows.patch	2026-03-31 00:32:29.694262000 +0300
@@ -1 +1 @@
-From 590ad6c13b37fccedc5782239feed914ee91403f Mon Sep 17 00:00:00 2001
+From f4bea846177d6953275bb881d3e5f3caf225c95d 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 9ca89a7889..381270088f 100644
+--- a/drivers/net/ixgbe/ixgbe_ethdev.h
++++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -41,5 +42,5 @@
-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
-@@ -3062,8 +3062,12 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
+diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
+index e70201dffa..998116ef65 100644
+--- a/drivers/net/ixgbe/ixgbe_flow.c
++++ b/drivers/net/ixgbe/ixgbe_flow.c
+@@ -3059,8 +3059,12 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
@@ -59 +60 @@
-@@ -3350,6 +3354,12 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
+@@ -3349,6 +3353,12 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
@@ -72 +73 @@
-@@ -3442,6 +3452,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
+@@ -3441,6 +3451,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,


More information about the stable mailing list