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 3BD5F4331C for ; Mon, 13 Nov 2023 16:24:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3FF2F406FF; Mon, 13 Nov 2023 16:24:23 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id C8184402AB for ; Mon, 13 Nov 2023 16:24:21 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 4E7175C01A5; Mon, 13 Nov 2023 10:24:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 13 Nov 2023 10:24:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1699889058; x=1699975458; bh=7YE212mJv6YqT9hI1lkCmUDFkBEQGlMv6Q3 9DNn+LTY=; b=dHhsdX8jtQO6X8rbnL5x0+MAoBtTK+2XoUahMWmqL4xpjCMicbR kLS2ynb1seurhCeGrdAW0d0WAMilFKhckUn1uuhjxdx1ks/MZHcYe6lkFPulqnFc FW1rf4hpYkXqALbs6tES6nGwGFs22c7J4ssFi0uU1BFpJ+18w49RWYniUIsXETSM hIdtBwiyKE0WxmHyGZVSXR+841koOMeycpm28s46UE0Wf5b8D5SURm6yzjqABsAw N5fRXyIKSUZ9dSq0prFLkYw/zkvHMOYF45AiktQzgyvFMcgxz3VhffspJPZj6yJ3 0mjudIkltkUGWSclmGboTT1W3i7v7ilgEKQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1699889058; x=1699975458; bh=7YE212mJv6YqT9hI1lkCmUDFkBEQGlMv6Q3 9DNn+LTY=; b=jT5HVlTN0r2KN8YJUGr8L2jxorNC4t4alLbfUrpBHiTiz7FkiGH HN21fwJz5K1Oo7K8kyx22LYUt7xMLlPne7bwcmqIVXHS0uqKVyqZPqi93SD37NAT skFQhxHXFkWkdAtrVn4olXTTrW/5XVg1ROyOytC+x5f+un4L+RTY9jXznva8jB8i PnDTObVFESpAO2WJhnTYF8b1U/ADepe5z8i5urXsjydL06KNES4nrFLrYextcFbC gauXjTWOm50/VipzoAWaRUx5qaPj9XeYdaBPWsFN4+lRMybe/qIp2JUvfNj/76zq cI9zlZ7s0uysw98jnvAfC79vBEsMXrum/og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeftddgjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Nov 2023 10:24:16 -0500 (EST) From: Thomas Monjalon To: Ciara Power Cc: gakhil@marvell.com, Ciara Power , kai.ji@intel.com, gmuthukrishn@marvell.com, sunila.sahu@caviumnetworks.com, stable@dpdk.org Subject: Re: [PATCH v3] crypto/openssl: fix asym memory leaks Date: Mon, 13 Nov 2023 16:24:13 +0100 Message-ID: <3449816.QJadu78ljV@thomas> In-Reply-To: <20231113131623.1485483-1-ciara.power@intel.com> References: <20231103154516.3456536-1-ciara.power@intel.com> <20231113131623.1485483-1-ciara.power@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 13/11/2023 14:16, Ciara Power: > Numerous memory leaks were detected by ASAN > in the OpenSSL PMD asymmetric code path. > > These are now fixed to free all variables allocated > by OpenSSL functions such as BN_bin2bn and > OSSL_PARAM_BLD_new. > > Some need to exist until the op is processed, > for example the BIGNUMs associated with DSA. > The pointers for these are added to the private > asym session so they can be accessed later when calling free. > > Some cases need to be treated differently if OpenSSL < 3.0. > It has slightly different handling of memory, as functions such as > RSA_set0_key() take over memory management of values, > so the caller should not free the values. > > Fixes: 4c7ae22f1f83 ("crypto/openssl: update DSA routine with 3.0 EVP API") > Fixes: c794b40c9258 ("crypto/openssl: update DH routine with 3.0 EVP API") > Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2") > Fixes: ac42813a0a7c ("crypto/openssl: add DH and DSA asym operations") > Fixes: d7bd42f6db19 ("crypto/openssl: update RSA routine with 3.0 EVP API") > Fixes: ad149f93093e ("crypto/openssl: fix memory leaks in asym ops") > Cc: kai.ji@intel.com > Cc: gmuthukrishn@marvell.com > Cc: sunila.sahu@caviumnetworks.com > Cc: stable@dpdk.org > > Signed-off-by: Ciara Power > Acked-by: Kai Ji Applied, thanks.