Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp68586pxa; Fri, 21 Aug 2020 01:06:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycYxK3t+MRsf/BEFcocjER75gtdVGV2O+Q/Fr8UpXqZ2zXlQykYgE5/BLOKJ1BefI+0qSH X-Received: by 2002:aa7:da0e:: with SMTP id r14mr1691855eds.236.1597997183147; Fri, 21 Aug 2020 01:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597997183; cv=none; d=google.com; s=arc-20160816; b=onCPd7neoOAxTUpb2erCeg8H999M1tULO1+gMmFeEaKZw3hq+91VrVeotALowhaV1t LBmeBLHFaRBodroWZLNtDSp/MTOffqn8QU0wXQXRItgNNX013oQ1HxOUf/niiwIcWjNr rWrxCYsoaJgPxW7sWt94XtT0Qa54No2pX1FhTr0D3MWBD/fwTbmjzVsHd5hSRaUrT5UQ LjtnEMQ0rOUMxk1/p73dyQ7nob7j8pse32A1BrvjOx2+SPHfOl/BfFSV0R4e+s+f9rFg RQHW2hSPUVdmP7TZEl5FDabZxVTWcjBlAnAEDKvbpVcDC+cwBxv/P83L4K/Qj5eItjf9 jsdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XMAZR/UaAh3ynTrEYNCJ6dx98oZJTx77iYdna/0OT3o=; b=qNLUogDpbaNJl/jmbOesMrHoKgemXugltyjbyJYgmNu8AJp+sMMtdUR/Eqmtl1tVrq dgVbfpCN0tCUn+7WGvnA9+/okeRkQ7pPpBzbWYcKZkg8evtT9GiiarBJsq53N20yKo69 /UwdF8clsfQBhkv1Gb4QM0RzM4yvi6L03fX1Bge6h3hZRSz5DpTWwlS3kpvy0pVfLqBp oRnqSMeEFbtXWgUCA79sgo28vx/eZ+4mBfH0j2AEcGZrcc5EmeqOlZjmgKmIKGP0eVW1 7dBTxFkZ+7wzCoDd3jqI7un/gQX1dGyr6ri0wFiXHr1z/ioQj7226OPT4DnQT8IIjKua NBmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g23si715130edv.507.2020.08.21.01.05.59; Fri, 21 Aug 2020 01:06:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726332AbgHUIFP (ORCPT + 99 others); Fri, 21 Aug 2020 04:05:15 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:50100 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbgHUIFO (ORCPT ); Fri, 21 Aug 2020 04:05:14 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1k922s-0004Cr-5y; Fri, 21 Aug 2020 18:05:07 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 21 Aug 2020 18:05:06 +1000 Date: Fri, 21 Aug 2020 18:05:06 +1000 From: Herbert Xu To: Pavel Machek Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Gilad Ben-Yossef , Markus Elfring , Sasha Levin Subject: Re: [PATCH 4.19 012/168] crypto: ccree - fix resource leak on error path Message-ID: <20200821080506.GA25449@gondor.apana.org.au> References: <20200817143733.692105228@linuxfoundation.org> <20200817143734.336080170@linuxfoundation.org> <20200818092231.GA10974@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200818092231.GA10974@amd> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 11:22:31AM +0200, Pavel Machek wrote: > > But it is freed unconditionally, and free_shash() is not robust > against NULL pointer due to undefined behaviour in crypto_shash_tfm. crypto_free_shash calls crypto_destroy_tfm with both the original pointer as well as the crypto_shash_tfm pointer so it does the right thing for NULL pointers. Please check again. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt