From: Herbert Xu <herbert@gondor.apana.org.au>
To: Iuliana Prodan <iuliana.prodan@nxp.com>
Cc: Horia Geanta <horia.geanta@nxp.com>,
Aymen Sghaier <aymen.sghaier@nxp.com>,
"David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH v2 1/2] crypto: caam - fix pkcs1pad(rsa-caam, sha256) failure because of invalid input
Date: Thu, 23 May 2019 14:12:02 +0800 [thread overview]
Message-ID: <20190523061202.ic2vgimgzvvm6dzc@gondor.apana.org.au> (raw)
In-Reply-To: <1557919546-360-1-git-send-email-iuliana.prodan@nxp.com>
On Wed, May 15, 2019 at 02:25:45PM +0300, Iuliana Prodan wrote:
>
> @@ -1058,6 +1105,14 @@ static int __init caam_pkc_init(void)
> goto out_put_dev;
> }
>
> + /* allocate zero buffer, used for padding input */
> + zero_buffer = kzalloc(CAAM_RSA_MAX_INPUT_SIZE - 1, GFP_DMA |
> + GFP_KERNEL);
> + if (!zero_buffer) {
> + err = -ENOMEM;
> + goto out_put_dev;
> + }
> +
> err = crypto_register_akcipher(&caam_rsa);
> if (err)
> dev_warn(ctrldev, "%s alg registration failed\n",
This patch does not apply on top of the caam patch-series from Horia.
You're also going to leak zero_buffer if crypto_register_akcipher
fails.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2019-05-23 6:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 11:25 [PATCH v2 1/2] crypto: caam - fix pkcs1pad(rsa-caam, sha256) failure because of invalid input Iuliana Prodan
2019-05-15 11:25 ` [PATCH v2 2/2] crypto: caam - strip input without changing crypto request Iuliana Prodan
2019-05-15 12:59 ` Horia Geanta
2019-05-15 14:00 ` Iuliana Prodan
2019-05-15 12:45 ` [PATCH v2 1/2] crypto: caam - fix pkcs1pad(rsa-caam, sha256) failure because of invalid input Horia Geanta
2019-05-23 6:12 ` Herbert Xu [this message]
2019-05-23 8:08 ` Iuliana Prodan
2019-05-23 10:02 ` Horia Geanta
2019-05-23 12:38 ` Herbert Xu
2019-05-24 6:52 ` Horia Geanta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190523061202.ic2vgimgzvvm6dzc@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=aymen.sghaier@nxp.com \
--cc=davem@davemloft.net \
--cc=horia.geanta@nxp.com \
--cc=iuliana.prodan@nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).