patch 'net/enetfec: fix out-of-bounds access in UIO mapping' has been queued to stable release 22.11.11
    luca.boccassi at gmail.com 
    luca.boccassi at gmail.com
       
    Mon Oct 27 17:19:38 CET 2025
    
    
  
Hi,
FYI, your patch has been queued to stable release 22.11.11
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/25. 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/059f9f130cb425d9186563ce7e5142ed0554ec56
Thanks.
Luca Boccassi
---
>From 059f9f130cb425d9186563ce7e5142ed0554ec56 Mon Sep 17 00:00:00 2001
From: Vanshika Shukla <vanshika.shukla at nxp.com>
Date: Mon, 6 Oct 2025 13:34:01 +0530
Subject: [PATCH] net/enetfec: fix out-of-bounds access in UIO mapping
[ upstream commit 22b0837bd93a777b8ca7fcf234985175e456a4f5 ]
NXP internal Coverity flagged a potential out-of-bounds
access due to invalid mapping size. This patch adds a check to
ensure the mapping size is within valid bounds before proceeding
with memory mapping.
Fixes: b84fdd39638b ("net/enetfec: support UIO")
Signed-off-by: Vanshika Shukla <vanshika.shukla at nxp.com>
Acked-by: Sachin Saxena <sachin.saxena at nxp.com>
---
 drivers/net/enetfec/enet_uio.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c
index f41e314745..786e7b6a0e 100644
--- a/drivers/net/enetfec/enet_uio.c
+++ b/drivers/net/enetfec/enet_uio.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2021,2024 NXP
+ * Copyright 2021,2024-2025 NXP
  */
 
 #include <stdbool.h>
@@ -142,6 +142,10 @@ uio_map_mem(int uio_device_fd, int uio_device_id,
 	}
 	/* Read mapping size and physical address expressed in hexa(base 16) */
 	uio_map_size = strtol(uio_map_size_str, NULL, 16);
+	if (uio_map_size <= 0 || uio_map_size > INT_MAX) {
+		ENETFEC_PMD_ERR("Invalid mapping size: %u.", uio_map_size);
+		return NULL;
+	}
 	uio_map_p_addr = strtol(uio_map_p_addr_str, NULL, 16);
 
 	if (uio_map_id == 0) {
-- 
2.47.3
---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-10-27 15:54:36.999662087 +0000
+++ 0060-net-enetfec-fix-out-of-bounds-access-in-UIO-mapping.patch	2025-10-27 15:54:34.839950653 +0000
@@ -1 +1 @@
-From 22b0837bd93a777b8ca7fcf234985175e456a4f5 Mon Sep 17 00:00:00 2001
+From 059f9f130cb425d9186563ce7e5142ed0554ec56 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 22b0837bd93a777b8ca7fcf234985175e456a4f5 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 23cb4e7e93..f32d5e1b1e 100644
+index f41e314745..786e7b6a0e 100644
    
    
More information about the stable
mailing list