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 BB51646A9C for ; Mon, 30 Jun 2025 14:26:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEE7E402E1; Mon, 30 Jun 2025 14:26:52 +0200 (CEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 8F399402E1 for ; Mon, 30 Jun 2025 14:26:49 +0200 (CEST) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-450cf214200so17166265e9.1 for ; Mon, 30 Jun 2025 05:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751286409; x=1751891209; 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=3Wj0AShWR+djbF3vYRIx/tI2LzeUrj1yrtSP52SPaVo=; b=K9nlpUhHuS3nTsJnxYk8i6UGbagHKN2JiU1gLGQHAsm6IS4m8edHp3s5zem4u6pcxc zhtKV5XyTQRhOaCLDmZMPqWiZdEDAdRFMmddnJMcsXGtSJVvzqgaH2RGBUANwHKtE/4w HKObQVRXKiFwhkOZU6l56Bl65cfrOsGZPti8CPmDFK0gaCz5UGhioRTz8dRNM5/OhdYZ 0CwE3lx5HIjasDU0XQ6ik7PbnbR7t6oq2Lx6G7VLsq/idlLXPVI4WLDWqBLMMzFaS/X7 KwOGvvHsKDxUxYyNXy/cigRUOhkRzsHLMx2+xSbQWMMe+wXAN02iR74yXpjc9XN6O8w9 jExg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751286409; x=1751891209; 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=3Wj0AShWR+djbF3vYRIx/tI2LzeUrj1yrtSP52SPaVo=; b=LjYw6hzCro/aZGQBL4AJ2wBxlyZQwipPfNxCbwSF2c6qpGt9uNkPnmsYNx8ZwelKy6 NSpwtJJ9pKKrxpBxSmGhiwWrtiEx58djiiK0iQIOw/U61dC6kqcas7G9GrtNY1NaGn6y zNCAfSA7tMlWAtXV2A6/cNcyGKOJlfPCr2xhAd1slI2Z/byMqS+O/SDZMsPqCpP9HpMM fb5F7RBIwW/L3XSbzMCiIXMsBILkolGTDmC2ZRVo4RS08BTvv8jI6j6haX0JwSRtds/F ntlSBaayHjwEv/KX5CrVIS7TDkar4cuNnhPf9qZAQmUAQ55xzOtKAASZcEQazC1rUuPM v5Zw== X-Gm-Message-State: AOJu0YxLdx+TZyy7UWhXgbszasMdZU31LgKqxSVqToRvJ5r1x6dQ2ucw ruTlsN7TJ3lTynNZ4YOJ/SFvaUp+RuFmLYeQyb8Kg7E9q22+0NZnALWL X-Gm-Gg: ASbGncsW6XG1PHbUzELEgp5VXMDn6y5OGOzRNdLB5LCzDNRVfMHj0qRjSCkOfGvxJyv Q6y6cUNZGDEa10zJkol3gN7MDBmZPmTNFmu3igJHQ0sq31/OASxfahqDcbDT8zBTGvbI+JA7eO3 PDbSwB6c/dv3eGHZQNAYbVPCacq1ACVneblN20/NqFUKdK8MDHoJd4FfPWHd9DvPhBmkxY2mM0T 66X3PAX00OqX98FnIYVTjVbCZCYeWSy460DwmDvF6WDBEcaB/rmdk4BDKgFEnDYPDJW3Ikst+sK fP9hkY9W6vqtf05lL9WVG3xCyo6HigIpYMc0W6LXisVUhNMM8QcFX5uj4j4xds9PQZE= X-Google-Smtp-Source: AGHT+IFATRO9nkIMsGk7uCxc/49M6GHhp1JMhyUPBg4BZu7hn5uoS6Q+1bVe9HoOdqL6NCObbGJNqw== X-Received: by 2002:a05:600c:8211:b0:439:9424:1b70 with SMTP id 5b1f17b1804b1-45390b99b8emr126733655e9.30.1751286408867; Mon, 30 Jun 2025 05:26:48 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:ded1:f637:68f:c2a6]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-45380d628c6sm86412845e9.3.2025.06.30.05.26.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jun 2025 05:26:48 -0700 (PDT) From: luca.boccassi@gmail.com To: Gowrishankar Muthukrishnan Cc: dpdk stable Subject: patch 'crypto/openssl: include private exponent in RSA session' has been queued to stable release 22.11.9 Date: Mon, 30 Jun 2025 13:25:47 +0100 Message-ID: <20250630122556.1133654-17-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250630122556.1133654-1-luca.boccassi@gmail.com> References: <20250612210733.2506558-72-luca.boccassi@gmail.com> <20250630122556.1133654-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.9 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/02/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/b2467ca0a7456a59d77e11f42bf37c15dc481ec6 Thanks. Luca Boccassi --- >From b2467ca0a7456a59d77e11f42bf37c15dc481ec6 Mon Sep 17 00:00:00 2001 From: Gowrishankar Muthukrishnan Date: Fri, 20 Jun 2025 13:49:16 +0530 Subject: [PATCH] crypto/openssl: include private exponent in RSA session [ upstream commit 9020477270c5dc93e1a347b90d5248b10e8cc4e3 ] If private exponent is available, it should be included within RSA session as per RFC 8017 (A.1.2). OpenSSL 1.1.1 implementation rely on this private exponent, to implicitly reject invalid cipher. Hence, check if it is available for session and include it. Fixes: 3e9d6bd447fb ("crypto/openssl: add RSA and mod asym operations") Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c index 18a8095ba2..c815128444 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c @@ -976,7 +976,7 @@ static int openssl_set_asym_session_parameters( if (rsa == NULL) goto err_rsa; - if (xform->rsa.key_type == RTE_RSA_KEY_TYPE_EXP) { + if (xform->rsa.d.length > 0) { d = BN_bin2bn( (const unsigned char *)xform->rsa.d.data, xform->rsa.d.length, @@ -985,7 +985,9 @@ static int openssl_set_asym_session_parameters( RSA_free(rsa); goto err_rsa; } - } else { + } + + if (xform->rsa.key_type == RTE_RSA_KEY_TYPE_QT) { p = BN_bin2bn((const unsigned char *) xform->rsa.qt.p.data, xform->rsa.qt.p.length, -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-30 13:21:22.398089588 +0100 +++ 0017-crypto-openssl-include-private-exponent-in-RSA-sessi.patch 2025-06-30 13:21:21.759057628 +0100 @@ -1 +1 @@ -From 9020477270c5dc93e1a347b90d5248b10e8cc4e3 Mon Sep 17 00:00:00 2001 +From b2467ca0a7456a59d77e11f42bf37c15dc481ec6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9020477270c5dc93e1a347b90d5248b10e8cc4e3 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 04e018f3df..d3aa396c76 100644 +index 18a8095ba2..c815128444 100644 @@ -23 +24 @@ -@@ -1025,7 +1025,7 @@ static int openssl_set_asym_session_parameters( +@@ -976,7 +976,7 @@ static int openssl_set_asym_session_parameters( @@ -32 +33 @@ -@@ -1034,7 +1034,9 @@ static int openssl_set_asym_session_parameters( +@@ -985,7 +985,9 @@ static int openssl_set_asym_session_parameters(