patch 'hash: check name when creating a hash' has been queued to stable release 21.11.8
Kevin Traynor
ktraynor at redhat.com
Fri Aug 23 18:17:41 CEST 2024
Hi,
FYI, your patch has been queued to stable release 21.11.8
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. 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/8a77d04eb381a3096611f750700c776b6df88b18
Thanks.
Kevin
---
>From 8a77d04eb381a3096611f750700c776b6df88b18 Mon Sep 17 00:00:00 2001
From: Conor Fogarty <conor.fogarty at intel.com>
Date: Thu, 6 Jul 2023 16:26:26 +0100
Subject: [PATCH] hash: check name when creating a hash
[ upstream commit 8f36e53317ecf8384461e4f692e46beaaf6c4d2f ]
Add NULL pointer check to params->name, which is later
copied into the hash datastructure. Without this check
the code segfaults on the strlcpy() of a NULL pointer.
Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation")
Signed-off-by: Conor Fogarty <conor.fogarty at intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
---
lib/hash/rte_cuckoo_hash.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index 95c3e6c2f4..abe44cf677 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -173,4 +173,5 @@ rte_hash_create(const struct rte_hash_parameters *params)
if ((params->entries > RTE_HASH_ENTRIES_MAX) ||
(params->entries < RTE_HASH_BUCKET_ENTRIES) ||
+ (params->name == NULL) ||
(params->key_len == 0)) {
rte_errno = EINVAL;
--
2.46.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-23 17:18:10.944432841 +0100
+++ 0033-hash-check-name-when-creating-a-hash.patch 2024-08-23 17:18:09.668429924 +0100
@@ -1 +1 @@
-From 8f36e53317ecf8384461e4f692e46beaaf6c4d2f Mon Sep 17 00:00:00 2001
+From 8a77d04eb381a3096611f750700c776b6df88b18 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f36e53317ecf8384461e4f692e46beaaf6c4d2f ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index b31a3d973e..16c9c4c5c4 100644
+index 95c3e6c2f4..abe44cf677 100644
@@ -23 +24 @@
-@@ -174,4 +174,5 @@ rte_hash_create(const struct rte_hash_parameters *params)
+@@ -173,4 +173,5 @@ rte_hash_create(const struct rte_hash_parameters *params)
More information about the stable
mailing list