patch 'hash: check name when creating a hash' has been queued to stable release 22.11.6
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Jun 25 01:58:28 CEST 2024
Hi,
FYI, your patch has been queued to stable release 22.11.6
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/27/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a28f53ce9a26ccb18f747b8388f821c615e1d2a9
Thanks.
Luca Boccassi
---
>From a28f53ce9a26ccb18f747b8388f821c615e1d2a9 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 a08b5dd875..13c8337519 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -166,6 +166,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
/* Check for valid parameters */
if ((params->entries > RTE_HASH_ENTRIES_MAX) ||
(params->entries < RTE_HASH_BUCKET_ENTRIES) ||
+ (params->name == NULL) ||
(params->key_len == 0)) {
rte_errno = EINVAL;
RTE_LOG(ERR, HASH, "rte_hash_create has invalid parameters\n");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.110038637 +0100
+++ 0042-hash-check-name-when-creating-a-hash.patch 2024-06-25 00:22:13.165185241 +0100
@@ -1 +1 @@
-From 8f36e53317ecf8384461e4f692e46beaaf6c4d2f Mon Sep 17 00:00:00 2001
+From a28f53ce9a26ccb18f747b8388f821c615e1d2a9 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 a08b5dd875..13c8337519 100644
@@ -23 +24 @@
-@@ -173,6 +173,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
+@@ -166,6 +166,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
@@ -30 +31 @@
- HASH_LOG(ERR, "%s has invalid parameters", __func__);
+ RTE_LOG(ERR, HASH, "rte_hash_create has invalid parameters\n");
More information about the stable
mailing list