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 CC23945610 for ; Fri, 12 Jul 2024 12:51:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2C2A402E5; Fri, 12 Jul 2024 12:51:14 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2050.outbound.protection.outlook.com [40.107.237.50]) by mails.dpdk.org (Postfix) with ESMTP id E01F840261 for ; Fri, 12 Jul 2024 12:51:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WUbfZx2zz1eYXSpcnuZAF4Pi0lEXixvNNDRrqMq8fTz0jfvuRRY+LsoNwU8FJYQU1ebzXduyFZzqlcYkF1oSne+mvScLPaMciAxB8xu0ADCbfYEHxsntk/YqzlFTKnNuWLrq3/SolcuBVbYKsTga+rYvwQN9SevESsa8cGWeU9bXNyJdtNrOtY17sKppodtmXDxwxXR5PBrx5EW5R/C3lNsQNtoEdAAw044Jj86wY55aDnimfQjP/FLM5pMHVHEHhrzy0AVbYi8NEdcaJBSbd/DJhGB60v0esbFmJxa+NOrRw31pw8wjbqDRbfATKaV30U6MFwwBYqzPvbmsUeXvdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vRrESDKk3f6tfNeNQGrYqCf1R7i0gq6K/mzc/I5SJmY=; b=Djp4muPJIzJ7MVDTc8ff1ZcSmCAhfc45tsjkWW/WCashxu7uVbFrvBf5Sqg0YxdD35CrbuxFX9/F9YVfptFEDJKFAKBz48XDBQM2G2EkFlBUt6tOOaRWaU9ukNqEpsESSmhx0oJLm+2x4Ws1MaXRWXaRaZXhk2sykeP2YJNqrfuT7PJkzpdxsJIzIV3siZx3HoKP0eUHMhRj5sbOG+n3oRW7qjqOv1ILzRbH73o++RhS6v/8lnMoJcLsc24tLtUrfRMwWEjdSHFYhYtU/91sc3BnwW3UfXLX24IKX5js2YYhJlAsd4+Bfps9cHnfQArXfV8D35koE7jU27TStWhxFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vRrESDKk3f6tfNeNQGrYqCf1R7i0gq6K/mzc/I5SJmY=; b=ofxjxJQQVzUj6Uwko6ffkf4Q8R+uDr3k6iZuVeeJ1GXZGlYvoiUMiI1IG+1YsV90ePYH+xpzpUMid9wvPr4sXe3R9BBZhc5htwVoZERTUaASTYSBEfJnha6VRU5YWah+lC/C412Mddtefo9qsiDeVavIHqm6TssxTHUuo3vydngQ4SOLHKGlThmEZ99+v5uvaSoE8xDbiZEGRmmarVqQiB8q9CGXQqRfvVyhfcNti4pWtyfpn6ZZdNq0MLyk+EbN7Xw2LAosTEUPB51q0BORTvIfroUvTVFgXhMmsfldb7Q9yk/vVDtaBs1OuNSITU5ieRIupZJ7nlBAqMulnx7F7A== Received: from DM6PR21CA0009.namprd21.prod.outlook.com (2603:10b6:5:174::19) by BL3PR12MB6546.namprd12.prod.outlook.com (2603:10b6:208:38d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23; Fri, 12 Jul 2024 10:51:09 +0000 Received: from DS1PEPF0001709C.namprd05.prod.outlook.com (2603:10b6:5:174:cafe::29) by DM6PR21CA0009.outlook.office365.com (2603:10b6:5:174::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.12 via Frontend Transport; Fri, 12 Jul 2024 10:51:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS1PEPF0001709C.mail.protection.outlook.com (10.167.18.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 10:51:08 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 12 Jul 2024 03:50:54 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 12 Jul 2024 03:50:52 -0700 From: Xueming Li To: Conor Fogarty CC: Vladimir Medvedkin , dpdk stable Subject: patch 'hash: check name when creating a hash' has been queued to stable release 23.11.2 Date: Fri, 12 Jul 2024 18:44:36 +0800 Message-ID: <20240712104528.308638-51-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240712104528.308638-1-xuemingl@nvidia.com> References: <20240712104528.308638-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001709C:EE_|BL3PR12MB6546:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a9ca4ff-0ca6-493e-db13-08dca260899a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?9Vqv8he9CSKTuZ+7f/ake8a1GuXRinyKJojji2hPAUCx/NrhuXw8c9/pqYJu?= =?us-ascii?Q?Ln1M8YVU/02yu6r99ixl6VBToVp9WqsxsaQe2lrH0VlbErozB5gkjVunoTPe?= =?us-ascii?Q?/eOhqMe0ketTY9OVSbTc3/iPYKCzzXcrGCHGgA0wFeMiPN4z/wScQB+eXY8o?= =?us-ascii?Q?9DIj5lv1khX92/G2hnfEoSVydbkpHuOBiovQ+kmu6wbrTDn5WM+AsAFpZmK/?= =?us-ascii?Q?IxiKXKdg5jrPkx40/wB4BRnTCbGQlswQBKR+Q5zT/2rgOePjk7R3TpYVZrND?= =?us-ascii?Q?PCNOAzmEcaDvIjT3Xl8R61Lv493uIJkak/oEUWpFNVP3r73iGAJ7ofBzFqe6?= =?us-ascii?Q?oPnzJ3rOw8AhtCJnGwK3IJ/yFL5XR0kvct5KYWRAT/X02LE5KNPCu+fZxXhH?= =?us-ascii?Q?kD3f3zdlF66PBpAlU1T+5pv2z4f75Q6C07xeBuXlvU0LXLkCDaBWcqafLxU9?= =?us-ascii?Q?CAKd5J9iRleAFQj8Tlw/qb3h2K7qRdULQOtohg4Tw2B8HZtuFjwOY9tvdLbB?= =?us-ascii?Q?W7ODzuzyKJQnpFk8GzUhwcnpYsw3ATUwhTTs2JSImWLpLBlHgu6MAWZ7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?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 10:51:08.7236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0a9ca4ff-0ca6-493e-db13-08dca260899a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001709C.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6546 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 23.11.2 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/14/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9bc1b9985b462fbee01a42cac0ec204b71629f2c Thanks. Xueming Li --- >From 9bc1b9985b462fbee01a42cac0ec204b71629f2c 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 Cc: Xueming Li [ 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 ccdc3b9894..7871f6e090 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.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-12 18:40:16.376589554 +0800 +++ 0050-hash-check-name-when-creating-a-hash.patch 2024-07-12 18:40:14.086594229 +0800 @@ -1 +1 @@ -From 8f36e53317ecf8384461e4f692e46beaaf6c4d2f Mon Sep 17 00:00:00 2001 +From 9bc1b9985b462fbee01a42cac0ec204b71629f2c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 8f36e53317ecf8384461e4f692e46beaaf6c4d2f ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index b31a3d973e..16c9c4c5c4 100644 +index ccdc3b9894..7871f6e090 100644 @@ -23 +25 @@ -@@ -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 +32 @@ - HASH_LOG(ERR, "%s has invalid parameters", __func__); + RTE_LOG(ERR, HASH, "rte_hash_create has invalid parameters\n");