patch 'net/ice/base: fix out-of-bounds accesses in DDP and NVM code' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:03:35 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/ec1dc4f5af29b5d151898ec1401030f0132f703a

Thanks.

Kevin

---
>From ec1dc4f5af29b5d151898ec1401030f0132f703a Mon Sep 17 00:00:00 2001
From: Janardhanan Arumugam <janardhanan.arumugam at intel.com>
Date: Thu, 22 Oct 2026 16:51:59 +0000
Subject: [PATCH] net/ice/base: fix out-of-bounds accesses in DDP and NVM code

[ upstream commit 3c54e976d0ad020de1e0ca462713515775332a41 ]

The following bounds checks are missing or can overflow:
- segment offset and size checks in DDP package verification
  can wrap around
- buffer range check of a signed DDP segment can wrap around
- package count reported by firmware is not limited to the size
  of the response buffer
- NVM access functions zero more than the size of the output buffer

Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module")
Fixes: f035feb47458 ("net/ice/base: support NVM access commands")
Fixes: c4afa96e4de1 ("net/ice/base: check DDP package compatibility")
Fixes: ed3066a3b1b0 ("net/ice/base: refactor DDP code")

Signed-off-by: Janardhanan Arumugam <janardhanan.arumugam at intel.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 drivers/net/intel/ice/base/ice_ddp.c | 19 ++++++++++++-------
 drivers/net/intel/ice/base/ice_nvm.c |  4 ++--
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/net/intel/ice/base/ice_ddp.c b/drivers/net/intel/ice/base/ice_ddp.c
index ae80d93656..072d1beb83 100644
--- a/drivers/net/intel/ice/base/ice_ddp.c
+++ b/drivers/net/intel/ice/base/ice_ddp.c
@@ -520,5 +520,5 @@ ice_download_pkg_config_seg(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr,
 	buf_count = LE32_TO_CPU(bufs->buf_count);
 
-	if (start >= buf_count || start + count > buf_count)
+	if (start >= buf_count || count > buf_count - start)
 		return ICE_DDP_PKG_ERR;
 
@@ -844,4 +844,5 @@ enum ice_ddp_state ice_get_pkg_info(struct ice_hw *hw)
 	u16 size;
 	u32 i;
+	u32 pkg_count;
 
 	size = ice_struct_size(pkg_info, pkg_info, ICE_PKG_CNT);
@@ -855,5 +856,6 @@ enum ice_ddp_state ice_get_pkg_info(struct ice_hw *hw)
 	}
 
-	for (i = 0; i < LE32_TO_CPU(pkg_info->count); i++) {
+	pkg_count = min(LE32_TO_CPU(pkg_info->count), (u32)ICE_PKG_CNT);
+	for (i = 0; i < pkg_count; i++) {
 #define ICE_PKG_FLAG_COUNT	4
 		char flags[ICE_PKG_FLAG_COUNT + 1] = { 0 };
@@ -967,4 +969,5 @@ enum ice_ddp_state ice_verify_pkg(struct ice_pkg_hdr *pkg, u32 len)
 {
 	u32 seg_count;
+	u32 off;
 	u32 i;
 
@@ -989,9 +992,10 @@ enum ice_ddp_state ice_verify_pkg(struct ice_pkg_hdr *pkg, u32 len)
 	/* all segments must fit within length */
 	for (i = 0; i < seg_count; i++) {
-		u32 off = LE32_TO_CPU(pkg->seg_offset[i]);
 		struct ice_generic_seg_hdr *seg;
 
+		off = LE32_TO_CPU(pkg->seg_offset[i]);
+
 		/* segment header must fit */
-		if (len < off + sizeof(*seg))
+		if (len < off || len - off < sizeof(*seg))
 			return ICE_DDP_PKG_INVALID_FILE;
 
@@ -999,5 +1003,5 @@ enum ice_ddp_state ice_verify_pkg(struct ice_pkg_hdr *pkg, u32 len)
 
 		/* segment body must fit */
-		if (len < off + LE32_TO_CPU(seg->seg_size))
+		if (len < off || len - off < LE32_TO_CPU(seg->seg_size))
 			return ICE_DDP_PKG_INVALID_FILE;
 	}
@@ -1060,5 +1064,5 @@ ice_chk_pkg_compat(struct ice_hw *hw, struct ice_pkg_hdr *ospkg,
 	enum ice_ddp_state state;
 	u16 size;
-	u32 i;
+	u32 i, pkg_count;
 
 	/* Check package version compatibility */
@@ -1088,5 +1092,6 @@ ice_chk_pkg_compat(struct ice_hw *hw, struct ice_pkg_hdr *ospkg,
 	}
 
-	for (i = 0; i < LE32_TO_CPU(pkg->count); i++) {
+	pkg_count = min(LE32_TO_CPU(pkg->count), (u32)ICE_PKG_CNT);
+	for (i = 0; i < pkg_count; i++) {
 		/* loop till we find the NVM package */
 		if (!pkg->pkg_info[i].is_in_nvm)
diff --git a/drivers/net/intel/ice/base/ice_nvm.c b/drivers/net/intel/ice/base/ice_nvm.c
index 56c6c96a95..19aa150541 100644
--- a/drivers/net/intel/ice/base/ice_nvm.c
+++ b/drivers/net/intel/ice/base/ice_nvm.c
@@ -1228,5 +1228,5 @@ ice_nvm_access_get_features(struct ice_nvm_access_cmd *cmd,
 
 	/* Initialize the data buffer to zeros */
-	ice_memset(data, 0, cmd->data_size, ICE_NONDMA_MEM);
+	ice_memset(data, 0, sizeof(union ice_nvm_access_data), ICE_NONDMA_MEM);
 
 	/* Fill in the features data */
@@ -1343,5 +1343,5 @@ ice_nvm_access_read(struct ice_hw *hw, struct ice_nvm_access_cmd *cmd,
 
 	/* Always initialize the output data, even on failure */
-	ice_memset(data, 0, cmd->data_size, ICE_NONDMA_MEM);
+	ice_memset(data, 0, sizeof(union ice_nvm_access_data), ICE_NONDMA_MEM);
 
 	/* Make sure this is a valid read/write access request */
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:47.412980226 +0000
+++ 0289-net-ice-base-fix-out-of-bounds-accesses-in-DDP-and-N.patch	2026-12-03 12:52:39.230938734 +0000
@@ -1 +1 @@
-From 3c54e976d0ad020de1e0ca462713515775332a41 Mon Sep 17 00:00:00 2001
+From ec1dc4f5af29b5d151898ec1401030f0132f703a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c54e976d0ad020de1e0ca462713515775332a41 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list