From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 47FF4454E9 for ; Tue, 25 Jun 2024 02:01:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4210242708; Tue, 25 Jun 2024 02:01:31 +0200 (CEST) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id E8B9340EDD for ; Tue, 25 Jun 2024 02:01:29 +0200 (CEST) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-421eab59723so37305405e9.3 for ; Mon, 24 Jun 2024 17:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273689; x=1719878489; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bB4c7vXOHwi6zWlDkNCgFtDcT1bOSXlJtAv60vIMdIk=; b=jd85KASRbZ8MAGIEdnP+t0egfih8Xx8mRlNAXxHG1rcDWymp8RQQ4jD9FeVFDCyilZ 2V+ukgzQXX0bag8szrAaCx6v/5eRvBBAa8tWC/bNdQUafEpMI6CggoIH7hzdWaTjvYVL 5/TlKl/XbICFXp8fskvVIEGzZvD0OttEpT9ioX/VM4XurNTBEj4+byxctakfaR+fJ9aP GNZ9lkz6lUYldFMVqTFXtyEqTDIeDLl/XhojLIbel/+kF5/LEXxd09D/igieKMKcv3hD B9j5QfrWYwdmQgpeMjaSmS9eilkZz9ia0wYOeKGHmzO9pSwrx5TbNh87lb/AZpWF3RB0 d95w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273689; x=1719878489; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bB4c7vXOHwi6zWlDkNCgFtDcT1bOSXlJtAv60vIMdIk=; b=IqvK1lN6+cCjvgA/7lQwyMD7adQ0LFfKxS2ayz7Jp3BoX8hfQUX0uH+Ad8CIY5p2gX HPCxbaboZSw8iSn0jSUyaGfc0yg6jYJx8QbNt0drNpSfT0Jd48Z2W2lrNWUvjJMFfOlQ 9cihUeaXzGzXCpvwWF0FcvlqVFbuSzgvvM3cHHMAqmSjHqya65/Oc9NQ39ipjvk9YKn7 r9N1vAXELU9VdIX0fcmiZxMNReH4JBYgXxsF3HdgoeG+mKcie3k5TK09+hwTSxNkng7R 61C6uQkSClQFR3RAumRWMPTm+5PIM7GVGnNbq1pV2oUY2NaRAVypaWBMUivXNE+ce6tS 8fdA== X-Forwarded-Encrypted: i=1; AJvYcCXkGt+cIF3MTj29z4r2xBeXwCMGimIr7lvTKkPbkKNhnFS6H4LuZ2NJie2dlqHjER0HTlyznVPuQdBVIsGiqHg= X-Gm-Message-State: AOJu0Yy8pcBvEcVknsx/KqhmciItR0IDHhe3JKQqTxltagNmtcqAQCTY 1O927hySEucSQ/pb4xjhBvyiwXGNYMekF9VOwa7J4vD/h+NlrFd7 X-Google-Smtp-Source: AGHT+IGlsck2JluovEFkZjPNjBPwkjQQCOJcNrTU+i3TUREsugeyb1oRjaoZt1GDVAN85mindqVe3Q== X-Received: by 2002:a05:600c:3c97:b0:424:8fa1:b2c3 with SMTP id 5b1f17b1804b1-4248fa1b772mr35916115e9.23.1719273689534; Mon, 24 Jun 2024 17:01:29 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247d0b63d4sm191732805e9.3.2024.06.24.17.01.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:01:29 -0700 (PDT) From: luca.boccassi@gmail.com To: Conor Fogarty Cc: Vladimir Medvedkin , dpdk stable Subject: patch 'hash: check name when creating a hash' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:28 +0100 Message-Id: <20240624235907.885628-42-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Acked-by: Vladimir Medvedkin --- 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@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");