patch 'net/ark: fix null dereference on allocation failure' has been queued to stable release 24.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Jun 11 15:20:25 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/1296a5326d86b18ec6b3605e984716eca7a66be1

Thanks.

Luca Boccassi

---
>From 1296a5326d86b18ec6b3605e984716eca7a66be1 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 c029dc46b3..71b6e9b6c2 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -439,6 +439,10 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 					   sizeof(struct ark_adapter),
 					   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,
 		       sizeof(struct ark_adapter));
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-06-11 14:20:04.337748114 +0100
+++ 0076-net-ark-fix-null-dereference-on-allocation-failure.patch	2026-06-11 14:20:01.310748315 +0100
@@ -1 +1 @@
-From 96d9dc38925807aa1e44f385819eeca88ba94ced Mon Sep 17 00:00:00 2001
+From 1296a5326d86b18ec6b3605e984716eca7a66be1 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 c029dc46b3..71b6e9b6c2 100644
@@ -25 +26 @@
-@@ -445,6 +445,10 @@ ark_dev_init(struct rte_eth_dev *dev)
+@@ -439,6 +439,10 @@ eth_ark_dev_init(struct rte_eth_dev *dev)


More information about the stable mailing list