patch 'net/ice: fix DDP filename leak' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:05:24 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/32e79464173a5ee19e5b3a1f1f4a0e0c1374788f

Thanks.

Kevin

---
>From 32e79464173a5ee19e5b3a1f1f4a0e0c1374788f Mon Sep 17 00:00:00 2001
From: Anurag Mandal <anurag.mandal at intel.com>
Date: Mon, 2 Nov 2026 08:10:33 +0000
Subject: [PATCH] net/ice: fix DDP filename leak

[ upstream commit d4ebefe56f81a2a5d08c31077356ca59bc2f3658 ]

The DDP package filename given with the ddp_pkg_file devarg is
duplicated with strdup() during devargs parsing, but only freed on
close. It leaks when ice_dev_init() fails at or after devargs
parsing, and when the devarg is given more than once.

Free the previous string before storing a new one, and free it on all
init error paths.

Fixes: 9dd6dd1db834 ("net/ice: add option to choose DDP package file")
Fixes: 603beeb970b5 ("net/ice: add safe mode devarg")
Fixes: f9cf4f864150 ("net/ice: support device initialization")

Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/intel/ice/ice_ethdev.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 7cf5ca65a6..ac7b86e719 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -772,4 +772,5 @@ handle_ddp_filename_arg(__rte_unused const char *key, const char *value, void *n
 		return -1;
 	}
+	free((void *)(uintptr_t)*filename);
 	*filename = strdup(value);
 	return 0;
@@ -2663,5 +2664,6 @@ ice_dev_init(struct rte_eth_dev *dev)
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to parse devargs");
-		return -EINVAL;
+		ret = -EINVAL;
+		goto err_free_devargs;
 	}
 
@@ -2671,5 +2673,6 @@ ice_dev_init(struct rte_eth_dev *dev)
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to initialize HW");
-		return -EINVAL;
+		ret = -EINVAL;
+		goto err_free_devargs;
 	}
 
@@ -2822,4 +2825,7 @@ err_init_fw:
 #endif
 	ice_deinit_hw(hw);
+err_free_devargs:
+	free((void *)(uintptr_t)ad->devargs.ddp_filename);
+	ad->devargs.ddp_filename = NULL;
 
 	return ret;
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:50.448212351 +0000
+++ 0398-net-ice-fix-DDP-filename-leak.patch	2026-12-03 12:52:39.304938793 +0000
@@ -1 +1 @@
-From d4ebefe56f81a2a5d08c31077356ca59bc2f3658 Mon Sep 17 00:00:00 2001
+From 32e79464173a5ee19e5b3a1f1f4a0e0c1374788f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d4ebefe56f81a2a5d08c31077356ca59bc2f3658 ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -22,2 +23,2 @@
- drivers/net/intel/ice/ice_ethdev.c | 15 +++++++++++----
- 1 file changed, 11 insertions(+), 4 deletions(-)
+ drivers/net/intel/ice/ice_ethdev.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
@@ -26 +27 @@
-index 4abc0c3544..d8d2b818d8 100644
+index 7cf5ca65a6..ac7b86e719 100644
@@ -29,7 +30 @@
-@@ -801,9 +801,10 @@ static int
- handle_ddp_filename_arg(__rte_unused const char *key, const char *value, void *name_args)
- {
--	const char **filename = name_args;
-+	char **filename = name_args;
- 	if (strlen(value) >= ICE_MAX_PKG_FILENAME_SIZE) {
- 		PMD_DRV_LOG(ERR, "The DDP package filename is too long : '%s'", value);
+@@ -772,4 +772,5 @@ handle_ddp_filename_arg(__rte_unused const char *key, const char *value, void *n
@@ -38 +33 @@
-+	free(*filename);
++	free((void *)(uintptr_t)*filename);
@@ -41 +36 @@
-@@ -2739,5 +2740,6 @@ ice_dev_init(struct rte_eth_dev *dev)
+@@ -2663,5 +2664,6 @@ ice_dev_init(struct rte_eth_dev *dev)
@@ -49 +44 @@
-@@ -2747,5 +2749,6 @@ ice_dev_init(struct rte_eth_dev *dev)
+@@ -2671,5 +2673,6 @@ ice_dev_init(struct rte_eth_dev *dev)
@@ -57,9 +52 @@
-@@ -2762,5 +2765,6 @@ ice_dev_init(struct rte_eth_dev *dev)
- 			     ad->devargs.rl_burst_size);
- 		ice_deinit_hw(hw);
--		return -EINVAL;
-+		ret = -EINVAL;
-+		goto err_free_devargs;
- 	}
- 
-@@ -2913,4 +2917,7 @@ err_init_fw:
+@@ -2822,4 +2825,7 @@ err_init_fw:
@@ -69 +56 @@
-+	free(RTE_CAST_PTR(void *, ad->devargs.ddp_filename));
++	free((void *)(uintptr_t)ad->devargs.ddp_filename);



More information about the stable mailing list