patch 'net/iavf: fix IPsec flow metadata leaks' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:03:32 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.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 12/08/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/062502bdeba88f0e06df72519ebc958c555551d0

Thanks.

Kevin

---
>From 062502bdeba88f0e06df72519ebc958c555551d0 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov at intel.com>
Date: Fri, 23 Oct 2026 10:32:30 +0100
Subject: [PATCH] net/iavf: fix IPsec flow metadata leaks

[ upstream commit a84241f2ca48a2c9579c5bca66ecf6a08e1c16f0 ]

IPsec flow parsing leaves the pattern-match item allocated after
extracting its metadata. It also leaves the parsed flow item allocated
when no metadata output is requested.

Free the pattern-match item after parsing and free the parsed flow item
when it cannot be returned to the caller. Propagate pattern-match failure
and report a parsing error when no flow item was produced.

Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")

Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Radu Nicolau <radu.nicolau at intel.com>
---
 drivers/net/intel/iavf/iavf_ipsec_crypto.c | 31 +++++++++++++++-------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf_ipsec_crypto.c b/drivers/net/intel/iavf/iavf_ipsec_crypto.c
index fcca1627dc..1d35f35b71 100644
--- a/drivers/net/intel/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/intel/iavf/iavf_ipsec_crypto.c
@@ -1962,5 +1962,5 @@ iavf_ipsec_flow_parse(struct iavf_adapter *ad,
 {
 	struct iavf_pattern_match_item *item = NULL;
-	int ret = -1;
+	struct iavf_ipsec_flow_item *fi = NULL;
 
 	if (priority >= 1)
@@ -1968,15 +1968,26 @@ iavf_ipsec_flow_parse(struct iavf_adapter *ad,
 
 	item = iavf_search_pattern_match_item(pattern, array, array_len, error);
-	if (item && item->meta) {
+	if (item == NULL)
+		return -rte_errno;
+
+	if (item->meta != NULL) {
 		uint32_t type = (uint64_t)(item->meta);
-		struct iavf_ipsec_flow_item *fi =
-				iavf_ipsec_flow_item_parse(ad->vf.eth_dev,
-						pattern, actions, type);
-		if (fi && meta) {
-			*meta = fi;
-			ret = 0;
-		}
+
+		fi = iavf_ipsec_flow_item_parse(ad->vf.eth_dev, pattern,
+				actions, type);
 	}
-	return ret;
+	rte_free(item);
+
+	if (fi == NULL)
+		return rte_flow_error_set(error, EINVAL,
+				RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+				"Invalid IPsec flow.");
+
+	if (meta != NULL)
+		*meta = fi;
+	else
+		rte_free(fi);
+
+	return 0;
 }
 
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:47.325717090 +0000
+++ 0286-net-iavf-fix-IPsec-flow-metadata-leaks.patch	2026-12-03 12:52:39.227388011 +0000
@@ -1 +1 @@
-From a84241f2ca48a2c9579c5bca66ecf6a08e1c16f0 Mon Sep 17 00:00:00 2001
+From 062502bdeba88f0e06df72519ebc958c555551d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a84241f2ca48a2c9579c5bca66ecf6a08e1c16f0 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -20,2 +21,2 @@
- drivers/net/intel/iavf/iavf_ipsec_crypto.c | 28 +++++++++++++++-------
- 1 file changed, 20 insertions(+), 8 deletions(-)
+ drivers/net/intel/iavf/iavf_ipsec_crypto.c | 31 +++++++++++++++-------
+ 1 file changed, 21 insertions(+), 10 deletions(-)
@@ -24 +25 @@
-index f7e391a74a..be0a0d0df6 100644
+index fcca1627dc..1d35f35b71 100644
@@ -27,2 +28,2 @@
-@@ -1943,4 +1943,5 @@ iavf_ipsec_flow_parse(struct iavf_adapter *ad,
- 	};
+@@ -1962,5 +1962,5 @@ iavf_ipsec_flow_parse(struct iavf_adapter *ad,
+ {
@@ -29,0 +31 @@
+-	int ret = -1;
@@ -31 +32,0 @@
- 	int ret = -1;
@@ -33 +34,2 @@
-@@ -1954,15 +1955,26 @@ iavf_ipsec_flow_parse(struct iavf_adapter *ad,
+ 	if (priority >= 1)
+@@ -1968,15 +1968,26 @@ iavf_ipsec_flow_parse(struct iavf_adapter *ad,
@@ -41 +42,0 @@
- 		const struct rte_security_session *session = parsed_actions.actions[0]->conf;
@@ -44 +45,2 @@
--				iavf_ipsec_flow_item_parse(ad, pattern, session, type);
+-				iavf_ipsec_flow_item_parse(ad->vf.eth_dev,
+-						pattern, actions, type);
@@ -50 +52,2 @@
-+		fi = iavf_ipsec_flow_item_parse(ad, pattern, session, type);
++		fi = iavf_ipsec_flow_item_parse(ad->vf.eth_dev, pattern,
++				actions, type);



More information about the stable mailing list