patch 'net/ark: fix null dereference on allocation failure' has been queued to stable release 25.11.3
Kevin Traynor
ktraynor at redhat.com
Thu Jul 23 19:15:50 CEST 2026
Hi,
FYI, your patch has been queued to stable release 25.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/27/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/d38687e9825449a49ff99460300503fa6f7cb914
Thanks.
Kevin
---
>From d38687e9825449a49ff99460300503fa6f7cb914 Mon Sep 17 00:00:00 2001
From: Denis Sergeev <denserg.edu at gmail.com>
Date: Wed, 3 Jun 2026 19:32:15 +0300
Subject: [PATCH] net/ark: fix null dereference on allocation failure
[ upstream commit 96d9dc38925807aa1e44f385819eeca88ba94ced ]
rte_zmalloc_socket() can return NULL when memory is exhausted.
The result is passed directly to memcpy() without a NULL check,
leading to undefined behavior. Add a NULL check consistent with
the existing check for mac_addrs allocation in the same function.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: bf73ee28f47b ("net/ark: support single function with multiple port")
Signed-off-by: Denis Sergeev <denserg.edu at gmail.com>
---
drivers/net/ark/ark_ethdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 8b25ed948f..ee3d19fccc 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -446,4 +446,8 @@ ark_dev_init(struct rte_eth_dev *dev)
RTE_CACHE_LINE_SIZE,
rte_socket_id());
+ if (eth_dev->data->dev_private == NULL) {
+ ARK_PMD_LOG(ERR, "Memory allocation for dev_private failed\n");
+ goto error;
+ }
memcpy(eth_dev->data->dev_private, ark,
--
2.55.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-23 17:58:01.152461035 +0100
+++ 0087-net-ark-fix-null-dereference-on-allocation-failure.patch 2026-07-23 17:57:58.713507977 +0100
@@ -1 +1 @@
-From 96d9dc38925807aa1e44f385819eeca88ba94ced Mon Sep 17 00:00:00 2001
+From d38687e9825449a49ff99460300503fa6f7cb914 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 96d9dc38925807aa1e44f385819eeca88ba94ced ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index d6e34021ce..9272e271e6 100644
+index 8b25ed948f..ee3d19fccc 100644
More information about the stable
mailing list