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 C7476470E5 for ; Thu, 25 Dec 2025 10:20:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C050F4025E; Thu, 25 Dec 2025 10:20:35 +0100 (CET) Received: from CO1PR03CU002.outbound.protection.outlook.com (mail-westus2azon11010066.outbound.protection.outlook.com [52.101.46.66]) by mails.dpdk.org (Postfix) with ESMTP id 1C0404025E for ; Thu, 25 Dec 2025 10:20:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eRDLy911KzHKKwNfyVD+e1lE8ieptf6uetKhCOPS7hx7ihX8WUdDN1BnQBI/tzW5/IHku2tJ2OOpvwPIW8YozQ0XyfjM8tLBBa7SkWDHvJ5ZB3ymQxZ0ZHSksDJY/Ln8NKw7S8k6/JXws9ssbJ1u/aa7xU+oyi2Hb23ToRMf6NkND/FYaleLWQ4L1B3b7FnfqK68L7i8B1o0xPhQ3MAHEfWH74nlH4VsydKfCtI/H6WjWlU2mcdgo8x9rqsHfsTxQCByrx+ZTY9FRZ88XdR3oAuOfHU+iM8leP4KHz8RcpcVTl4bemHY176hu4jWrtNHVXjyVxs2avnn9/woB9UXZA== 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=10hImDoT6li2ZtKwE7F8D/iOeCT3lNRZYRczVXSwr7U=; b=T83S7gZzjJCXHbk66M+yFQp0Jlkr55ebW99fXJ4AHgjR5na9UbSV3gCTipIrWawPbUWfc+1MDeUG63TmOkgEbqhH/ztZ2EMErmE0XUIXZnLZ98PZHPI/BisVivkdJKjvoB0aAdlRTjamozktqgx3uVTZqyN3vr/ZJBxTTgNJGPvipg5hMHd9jj4Rt3Elyu1HCjLOD4Y5cl5KOO/p0TA3UaB7Kfa62qD+QP7W/1lT60fCjAaUoOHyz0MhV6cK78h6mpFVnwFPeV34gfM6UUfSG2vNTsJ3X0yPkiS6B+dn2R9fPQG+GkeotmiJR1w2xsd0jlTf6vtEtEZhFOnkE4QOaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=10hImDoT6li2ZtKwE7F8D/iOeCT3lNRZYRczVXSwr7U=; b=JonsyFey1fAf8d0CPPO8GX2t3txreI6ZX2hqXbvMwmBtAO3w3FPE14dO1TNkLX1tcVz7kgWeeHiHyRwZd2W2AXxKpLjqyIqPsfrjz21csbw1+G199PdpMuc1/UQjiBGy5da9dF0v1XcaP/SHrmkFtwJeJHZrIJTQWM07hNjh+7YvPsLJsy2mACnrT8lBjkxY4OK75XS97tGvI13x3a0nVbuKw3RnT982kjUJG8pl8+IERcJegBbiWtd9XFwLZdja9euf0jyqfIa4En2u9JQrK9iR3nfZxfU47l0aCcV34vJBTTwlFb3lCg86gIRZPpCnku22t1cGjwfsPFW5xYFbZA== Received: from CH0PR03CA0099.namprd03.prod.outlook.com (2603:10b6:610:cd::14) by IA1PR12MB8335.namprd12.prod.outlook.com (2603:10b6:208:3fa::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.11; Thu, 25 Dec 2025 09:20:28 +0000 Received: from CH2PEPF0000013B.namprd02.prod.outlook.com (2603:10b6:610:cd:cafe::ba) by CH0PR03CA0099.outlook.office365.com (2603:10b6:610:cd::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9456.11 via Frontend Transport; Thu, 25 Dec 2025 09:20:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH2PEPF0000013B.mail.protection.outlook.com (10.167.244.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.9 via Frontend Transport; Thu, 25 Dec 2025 09:20:28 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:20:10 -0800 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:20:09 -0800 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 25 Dec 2025 01:20:08 -0800 From: Shani Peretz To: Shani Peretz CC: Kai Ji , Akhil Goyal , dpdk stable Subject: patch 'app/crypto-perf: fix plaintext size exceeds buffer size' has been queued to stable release 23.11.6 Date: Thu, 25 Dec 2025 11:17:27 +0200 Message-ID: <20251225091938.345892-6-shperetz@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251225091938.345892-1-shperetz@nvidia.com> References: <20251221145746.763179-93-shperetz@nvidia.com> <20251225091938.345892-1-shperetz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF0000013B:EE_|IA1PR12MB8335:EE_ X-MS-Office365-Filtering-Correlation-Id: 020abf86-4ce5-4764-ce10-08de4396d81f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|1800799024|82310400026|7053199007|13003099007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3hTO1nB09dKsNESPJhH0SKI5SD0DCd2TUc+1F+S+RkThUnb5xtYXMEVUmKQ9?= =?us-ascii?Q?2a/0AzMrE9gtZXR3Y2EhK/EzvGs+6pQTZx4QK2V/fuw/s0XydKr13WZ/kNqz?= =?us-ascii?Q?uRjs3OW+lC7doCllP0QJ5zoiWI2VHXyC9lHstWWBJdN+AID/StslEESgmOTU?= =?us-ascii?Q?zVTanAsgAb7OtK4JTUF00eG2nT2EU121URn7N/GhYfw3UL1nFv5VTbveBJph?= =?us-ascii?Q?C1eybuqn0Yoc9iS0L6jF9i4kcAPiNhY7LCuhkcE5sVZL8qpM2GgoiAmYHmYO?= =?us-ascii?Q?OAZhHYo6q+Qt0qFzFX0WIbHANQCV8IFy+UYkGXst+XR/tAhWgq0lPZ23v/fp?= =?us-ascii?Q?iJGRxXfnEE/nMnLWLwqRHMQANw07qLEX2bU1/7T8Vs2YCHIyOXGjpcx67jfm?= =?us-ascii?Q?8z/OeBqgI2GFSdkoU2Sf15K18TrcdWjND16T7Sp7B3LIQK4LIkZiRDFNXeyR?= =?us-ascii?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BbMQ8KCJbQTAi82ApSUscgEFv5nlohebF8+?= =?us-ascii?Q?EScqF0i3sgTEwDoq5GAI/QDRTlCIb78P6ssiafK6kV/NOVn9/du75HWHroqr?= =?us-ascii?Q?ElUcCe/dXteXUG74Cn9IZyvAXFvPVuXZ2opPvkdixptClhC7wj1x7xvTrrKy?= =?us-ascii?Q?c7fBmyExUFM3Ep+3+yPAFUXyPpTkWQlnPYtylcS37iAAZDeglNic8hXgJ52Z?= =?us-ascii?Q?i86IiQg1/ES8iFH3R383YS0k9Em+NjpA4qZl8dzQ?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026)(7053199007)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2025 09:20:28.1734 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 020abf86-4ce5-4764-ce10-08de4396d81f 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF0000013B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8335 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.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 12/30/25. 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/shanipr/dpdk-stable This queued commit can be viewed at: https://github.com/shanipr/dpdk-stable/commit/efeda91c597a08b418d281a918d8b523010976fb Thanks. Shani --- >From efeda91c597a08b418d281a918d8b523010976fb Mon Sep 17 00:00:00 2001 From: Shani Peretz Date: Mon, 25 Aug 2025 10:14:50 +0300 Subject: [PATCH] app/crypto-perf: fix plaintext size exceeds buffer size [ upstream commit b2988038656b03d1c019114fbe7609018cc16e87 ] When test vector plaintext exceeds buffer size, only the first max_buffer_size bytes are processed, causing incorrect digest verification (computed vs expected mismatch). This patch fixes this issue by checking that the plaintext size is larger than the buffer size and returns an error with a log. Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Signed-off-by: Shani Peretz Acked-by: Kai Ji Acked-by: Akhil Goyal --- .../cperf_test_vector_parsing.c | 47 +++++++++++-------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/app/test-crypto-perf/cperf_test_vector_parsing.c b/app/test-crypto-perf/cperf_test_vector_parsing.c index 737d61d4af..5665fb425b 100644 --- a/app/test-crypto-perf/cperf_test_vector_parsing.c +++ b/app/test-crypto-perf/cperf_test_vector_parsing.c @@ -308,12 +308,19 @@ parse_entry(char *entry, struct cperf_test_vector *vector, if (strstr(key_token, "plaintext")) { rte_free(vector->plaintext.data); vector->plaintext.data = data; + + if (opts->test == CPERF_TEST_TYPE_VERIFY && data_length > opts->max_buffer_size) { + printf("Global plaintext (%u) larger than buffer_sz (%u)\n", + data_length, opts->max_buffer_size); + return -1; + } + if (tc_found) vector->plaintext.length = data_length; else { if (opts->max_buffer_size > data_length) { - printf("Global plaintext shorter than " - "buffer_sz\n"); + printf("Global plaintext (%u) shorter than " + "buffer_sz (%u)\n", data_length, opts->max_buffer_size); return -1; } vector->plaintext.length = opts->max_buffer_size; @@ -326,8 +333,8 @@ parse_entry(char *entry, struct cperf_test_vector *vector, vector->cipher_key.length = data_length; else { if (opts->cipher_key_sz > data_length) { - printf("Global cipher_key shorter than " - "cipher_key_sz\n"); + printf("Global cipher_key (%u) shorter than " + "cipher_key_sz (%u)\n", data_length, opts->cipher_key_sz); return -1; } vector->cipher_key.length = opts->cipher_key_sz; @@ -340,8 +347,8 @@ parse_entry(char *entry, struct cperf_test_vector *vector, vector->auth_key.length = data_length; else { if (opts->auth_key_sz > data_length) { - printf("Global auth_key shorter than " - "auth_key_sz\n"); + printf("Global auth_key (%u) shorter than " + "auth_key_sz (%u)\n", data_length, opts->auth_key_sz); return -1; } vector->auth_key.length = opts->auth_key_sz; @@ -354,8 +361,8 @@ parse_entry(char *entry, struct cperf_test_vector *vector, vector->aead_key.length = data_length; else { if (opts->aead_key_sz > data_length) { - printf("Global aead_key shorter than " - "aead_key_sz\n"); + printf("Global aead_key (%u) shorter than " + "aead_key_sz (%u)\n", data_length, opts->aead_key_sz); return -1; } vector->aead_key.length = opts->aead_key_sz; @@ -368,8 +375,8 @@ parse_entry(char *entry, struct cperf_test_vector *vector, vector->cipher_iv.length = data_length; else { if (opts->cipher_iv_sz > data_length) { - printf("Global cipher iv shorter than " - "cipher_iv_sz\n"); + printf("Global cipher iv (%u) shorter than " + "cipher_iv_sz (%u)\n", data_length, opts->cipher_iv_sz); return -1; } vector->cipher_iv.length = opts->cipher_iv_sz; @@ -382,8 +389,8 @@ parse_entry(char *entry, struct cperf_test_vector *vector, vector->auth_iv.length = data_length; else { if (opts->auth_iv_sz > data_length) { - printf("Global auth iv shorter than " - "auth_iv_sz\n"); + printf("Global auth iv (%u) shorter than " + "auth_iv_sz (%u)\n", data_length, opts->auth_iv_sz); return -1; } vector->auth_iv.length = opts->auth_iv_sz; @@ -396,8 +403,8 @@ parse_entry(char *entry, struct cperf_test_vector *vector, vector->aead_iv.length = data_length; else { if (opts->aead_iv_sz > data_length) { - printf("Global aead iv shorter than " - "aead_iv_sz\n"); + printf("Global aead iv (%u) shorter than " + "aead_iv_sz (%u)\n", data_length, opts->aead_iv_sz); return -1; } vector->aead_iv.length = opts->aead_iv_sz; @@ -410,8 +417,8 @@ parse_entry(char *entry, struct cperf_test_vector *vector, vector->ciphertext.length = data_length; else { if (opts->max_buffer_size > data_length) { - printf("Global ciphertext shorter than " - "buffer_sz\n"); + printf("Global ciphertext (%u) shorter than " + "buffer_sz (%u)\n", data_length, opts->max_buffer_size); return -1; } vector->ciphertext.length = opts->max_buffer_size; @@ -425,8 +432,8 @@ parse_entry(char *entry, struct cperf_test_vector *vector, vector->aad.length = data_length; else { if (opts->aead_aad_sz > data_length) { - printf("Global aad shorter than " - "aead_aad_sz\n"); + printf("Global aad (%u) shorter than " + "aead_aad_sz (%u)\n", data_length, opts->aead_aad_sz); return -1; } vector->aad.length = opts->aead_aad_sz; @@ -441,8 +448,8 @@ parse_entry(char *entry, struct cperf_test_vector *vector, vector->digest.length = data_length; else { if (opts->digest_sz > data_length) { - printf("Global digest shorter than " - "digest_sz\n"); + printf("Global digest (%u) shorter than " + "digest_sz (%u)\n", data_length, opts->digest_sz); return -1; } vector->digest.length = opts->digest_sz; -- 2.43.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-12-25 11:16:36.687799916 +0200 +++ 0006-app-crypto-perf-fix-plaintext-size-exceeds-buffer-si.patch 2025-12-25 11:16:35.292786000 +0200 @@ -1 +1 @@ -From b2988038656b03d1c019114fbe7609018cc16e87 Mon Sep 17 00:00:00 2001 +From efeda91c597a08b418d281a918d8b523010976fb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b2988038656b03d1c019114fbe7609018cc16e87 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org