Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5062483iob; Mon, 9 May 2022 07:56:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqRhPgWfQdv14EliEz6DgJPnlwa0K29FIpzx8vz7NOCEiQCGHYc2sXERiz0RNVNOXtQe7k X-Received: by 2002:a63:d301:0:b0:3c1:7361:b260 with SMTP id b1-20020a63d301000000b003c17361b260mr13706964pgg.367.1652108166973; Mon, 09 May 2022 07:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652108166; cv=none; d=google.com; s=arc-20160816; b=fkNmRmAy5sH6XTDVEhAci6JrYKVDk5/ACfQMOoc1s956/xHKLzz19w7MCkE+hEs9HF /pc55G37+dhlOnRFq2yj7ZZ14qsRGaOkWTQWlqpN7K7sEDGjP+rKnKfVEyCZt/ENwfCP knf6TQr4YJ2mNpYQ2E5pcpl7Rbvba1GSs7OmIVwVZ8xsOWVAQbu/A9e6E7JMik1plQ6v TRyisFng3tV189c27ADYxcDvzr/w8Xd6MTM0sirOiJpSkmfJGpSDq2vyixiPUT+dEYSV G7FJ6aAzIINaM2sylYczWC2DHzRExwWmLxs8upHxMmjrHcabsC809SAtMPOtiPa4UvkI HxLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=T9P4MEuxHriqqftgF/koS3nUCNSFDHCIAtLz8fd3W20=; b=afYcUxPyc7w1vPQ91BqP9w9giRx4m73jz2fWOkjXasjWwCpXKgXuOmMOIe0aiIYVwj 2QAoojvUC31uFrPJEdRMFBS5hpU3ZKwtwszlxh9ezDJtuWsenSWr6NKtRjFG9x0cz9p3 P9WD2TQgwFnB1WXBb3V1tILR0prDTszT7ym/aJw++ozE0e5ZlI9gPQNbbax7bDxvSQXl ohpEOt9eb2YcRqdKdzwIL5lBOMbt91h++fcuECdW1zJCK2b/VfsYU6qE21s3cZ5bJDiw kdNyc20wG+b4t7wtvYlpfTGf7eR8rQlUIA2AW/lcLdxjbF5Br5w0AAeeTfAWcDpcIiCT Qz+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cKjdBrj1; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id pj11-20020a17090b4f4b00b001d987943475si20762142pjb.181.2022.05.09.07.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 07:56:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cKjdBrj1; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AD57D2C4785; Mon, 9 May 2022 07:54:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237855AbiEIO6X (ORCPT + 99 others); Mon, 9 May 2022 10:58:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237764AbiEIO6V (ORCPT ); Mon, 9 May 2022 10:58:21 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 506272C4780; Mon, 9 May 2022 07:54:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652108067; x=1683644067; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=cXGN16AjvvHzj8vLffhSi+a0BXyUYujkz+6rZNcFLzw=; b=cKjdBrj1LnCB72cz/gA1Zv8cU465yTTPCfyOJ/oXcmG9j3Cr0UApZyP+ RKAGUS/O+z3PIe9W743X5LQ/cAmM/U5IsN2Wyb7FboAbekE8bfdtZEJ/Q S+EN6fuv5wHQVm++RNt/8cTdzaUYexpTi7cgFmhAY46HzfArOuLuft3V0 TNHE2MyF6HgE4oaHESWiSfqoxKyJeisbC+0QpWRLRexCfgko55Jnlb1wN WIBaeAHTe4wRCuqZFFQ8B23WyaJDBKqxlxY60RQhjaeqgAcR5qOf2bTwj uAQEva7Kxo7I0HINitFRHcrqqRlDT2Xp4aQSAM/vwLz/eJGF8eSlqV4x1 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10342"; a="256607819" X-IronPort-AV: E=Sophos;i="5.91,211,1647327600"; d="scan'208";a="256607819" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 07:54:26 -0700 X-IronPort-AV: E=Sophos;i="5.91,211,1647327600"; d="scan'208";a="696599856" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314) ([10.237.222.76]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 07:54:24 -0700 Date: Mon, 9 May 2022 15:54:21 +0100 From: Giovanni Cabiddu To: Greg KH Cc: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org, qat-linux@intel.com, stable@vger.kernel.org, Adam Guerin , Wojciech Ziemba Subject: Re: [PATCH] crypto: qat - set to zero DH parameters before free Message-ID: References: <20220509131927.55387-1-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, May 09, 2022 at 04:09:55PM +0200, Greg KH wrote: > On Mon, May 09, 2022 at 02:19:27PM +0100, Giovanni Cabiddu wrote: > > Set to zero the context buffers containing the DH key before they are > > freed. > > This is a defense in depth measure that avoids keys to be recovered from > > memory in case the system is compromised between the free of the buffer > > and when that area of memory (containing keys) gets overwritten. > > > > Cc: stable@vger.kernel.org > > Fixes: c9839143ebbf ("crypto: qat - Add DH support") > > Signed-off-by: Giovanni Cabiddu > > Reviewed-by: Adam Guerin > > Reviewed-by: Wojciech Ziemba > > --- > > drivers/crypto/qat/qat_common/qat_asym_algs.c | 3 +++ > > 1 file changed, 3 insertions(+) > > Why isn't this part of the other series for this "driver"? Just for consistency. I preferred to decouple this from the set `crypto: qat - re-enable algorithms` since differently from the other patches in that set, this is not fixing a functional issue in the driver but it is adding a protection measure. Regards, -- Giovanni