patch 'power: fix off-by-one in uncore env bounds check' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 11 15:20:49 CEST 2026
Hi,
FYI, your patch has been queued to stable release 24.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 06/13/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/123098efaf2775f5b731cc483e93671c3b4f16e7
Thanks.
Luca Boccassi
---
>From 123098efaf2775f5b731cc483e93671c3b4f16e7 Mon Sep 17 00:00:00 2001
From: Denis Sergeev <denserg.edu at gmail.com>
Date: Wed, 3 Jun 2026 07:21:53 +0300
Subject: [PATCH] power: fix off-by-one in uncore env bounds check
[ upstream commit f9c164dec1285e27c7b4a69491bffa499eb460ad ]
The condition in rte_power_set_uncore_env() uses '<=' instead of '<'
when comparing the env argument against the size of uncore_env_str[].
Since RTE_DIM(uncore_env_str) equals 4 and valid indices are 0..3,
a caller passing env=4 bypasses the guard and causes an out-of-bounds
read of uncore_env_str[4] at two sites within the same block.
Fix by replacing '<=' with '<', consistent with the correct pattern
already used in rte_power_uncore_init() in the same file.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: ac1edcb6621a ("power: refactor uncore power management API")
Signed-off-by: Denis Sergeev <denserg.edu at gmail.com>
---
lib/power/rte_power_uncore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/power/rte_power_uncore.c b/lib/power/rte_power_uncore.c
index 741e067932..51a4c62d1b 100644
--- a/lib/power/rte_power_uncore.c
+++ b/lib/power/rte_power_uncore.c
@@ -64,7 +64,7 @@ rte_power_set_uncore_env(enum rte_uncore_power_mgmt_env env)
*/
env = RTE_UNCORE_PM_ENV_INTEL_UNCORE;
- if (env <= RTE_DIM(uncore_env_str)) {
+ if (env < RTE_DIM(uncore_env_str)) {
RTE_TAILQ_FOREACH(ops, &uncore_ops_list, next)
if (strncmp(ops->name, uncore_env_str[env],
RTE_POWER_UNCORE_DRIVER_NAMESZ) == 0) {
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-06-11 14:20:05.248281301 +0100
+++ 0100-power-fix-off-by-one-in-uncore-env-bounds-check.patch 2026-06-11 14:20:01.342749093 +0100
@@ -1 +1 @@
-From f9c164dec1285e27c7b4a69491bffa499eb460ad Mon Sep 17 00:00:00 2001
+From 123098efaf2775f5b731cc483e93671c3b4f16e7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f9c164dec1285e27c7b4a69491bffa499eb460ad ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 25bdb113c5..b50e09a2ad 100644
+index 741e067932..51a4c62d1b 100644
@@ -29 +30 @@
-@@ -67,7 +67,7 @@ rte_power_set_uncore_env(enum rte_uncore_power_mgmt_env env)
+@@ -64,7 +64,7 @@ rte_power_set_uncore_env(enum rte_uncore_power_mgmt_env env)
More information about the stable
mailing list