patch 'eventdev/timer: reject out-of-range telemetry ID' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 11 15:20:48 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/2bcecb89836e52712bb6fa1d6f44e8d0cc13e1c3
Thanks.
Luca Boccassi
---
>From 2bcecb89836e52712bb6fa1d6f44e8d0cc13e1c3 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Fri, 5 Jun 2026 13:51:05 -0700
Subject: [PATCH] eventdev/timer: reject out-of-range telemetry ID
[ upstream commit bd841c3e2533493fa91e8ba9cf33c637629e4d1d ]
The eventdev timer adapter code was using atoi() to parse numeric
parameters which does not handle out-of-range or extra garbage
on input. Tighten the code to only accept valid numbers.
Fixes: 791dfec24d00 ("eventdev/timer: add telemetry")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
lib/eventdev/rte_event_timer_adapter.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index 4132f71f2d..15fa9622b2 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -1390,16 +1390,15 @@ handle_ta_info(const char *cmd __rte_unused, const char *params,
{
struct rte_event_timer_adapter_info adapter_info;
struct rte_event_timer_adapter *adapter;
- uint16_t adapter_id;
+ unsigned long adapter_id;
int ret;
- if (params == NULL || strlen(params) == 0 || !isdigit(*params))
+ if (params == NULL || strlen(params) == 0 || !isdigit((unsigned char)*params))
return -1;
- adapter_id = atoi(params);
-
+ adapter_id = strtoul(params, NULL, 10);
if (adapters == NULL || adapter_id >= RTE_EVENT_TIMER_ADAPTER_NUM_MAX) {
- EVTIM_LOG_ERR("Invalid timer adapter id %u", adapter_id);
+ EVTIM_LOG_ERR("Invalid timer adapter id %lu", adapter_id);
return -EINVAL;
}
@@ -1407,7 +1406,7 @@ handle_ta_info(const char *cmd __rte_unused, const char *params,
ret = rte_event_timer_adapter_get_info(adapter, &adapter_info);
if (ret < 0) {
- EVTIM_LOG_ERR("Failed to get info for timer adapter id %u", adapter_id);
+ EVTIM_LOG_ERR("Failed to get info for timer adapter id %lu", adapter_id);
return ret;
}
@@ -1436,16 +1435,15 @@ handle_ta_stats(const char *cmd __rte_unused, const char *params,
{
struct rte_event_timer_adapter_stats stats;
struct rte_event_timer_adapter *adapter;
- uint16_t adapter_id;
+ unsigned long adapter_id;
int ret;
- if (params == NULL || strlen(params) == 0 || !isdigit(*params))
+ if (params == NULL || strlen(params) == 0 || !isdigit((unsigned char)*params))
return -1;
- adapter_id = atoi(params);
-
+ adapter_id = strtoul(params, NULL, 10);
if (adapters == NULL || adapter_id >= RTE_EVENT_TIMER_ADAPTER_NUM_MAX) {
- EVTIM_LOG_ERR("Invalid timer adapter id %u", adapter_id);
+ EVTIM_LOG_ERR("Invalid timer adapter id %lu", adapter_id);
return -EINVAL;
}
@@ -1453,7 +1451,7 @@ handle_ta_stats(const char *cmd __rte_unused, const char *params,
ret = rte_event_timer_adapter_stats_get(adapter, &stats);
if (ret < 0) {
- EVTIM_LOG_ERR("Failed to get stats for timer adapter id %u", adapter_id);
+ EVTIM_LOG_ERR("Failed to get stats for timer adapter id %lu", adapter_id);
return ret;
}
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-06-11 14:20:05.210217996 +0100
+++ 0099-eventdev-timer-reject-out-of-range-telemetry-ID.patch 2026-06-11 14:20:01.342749093 +0100
@@ -1 +1 @@
-From bd841c3e2533493fa91e8ba9cf33c637629e4d1d Mon Sep 17 00:00:00 2001
+From 2bcecb89836e52712bb6fa1d6f44e8d0cc13e1c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd841c3e2533493fa91e8ba9cf33c637629e4d1d ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index af98b1d9f6..e3640a3bf8 100644
+index 4132f71f2d..15fa9622b2 100644
@@ -23 +24 @@
-@@ -1402,16 +1402,15 @@ handle_ta_info(const char *cmd __rte_unused, const char *params,
+@@ -1390,16 +1390,15 @@ handle_ta_info(const char *cmd __rte_unused, const char *params,
@@ -44 +45 @@
-@@ -1419,7 +1418,7 @@ handle_ta_info(const char *cmd __rte_unused, const char *params,
+@@ -1407,7 +1406,7 @@ handle_ta_info(const char *cmd __rte_unused, const char *params,
@@ -53 +54 @@
-@@ -1448,16 +1447,15 @@ handle_ta_stats(const char *cmd __rte_unused, const char *params,
+@@ -1436,16 +1435,15 @@ handle_ta_stats(const char *cmd __rte_unused, const char *params,
@@ -74 +75 @@
-@@ -1465,7 +1463,7 @@ handle_ta_stats(const char *cmd __rte_unused, const char *params,
+@@ -1453,7 +1451,7 @@ handle_ta_stats(const char *cmd __rte_unused, const char *params,
More information about the stable
mailing list