lkml.org 
[lkml]   [2019]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 1/2] crypto: caam - fix pkcs1pad(rsa-caam, sha256) failure because of invalid input
Date
On 5/23/2019 9:12 AM, Herbert Xu wrote:
> 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.
The patch was considered a fix, and thus developed on top of crypto-2.6.
I guess you are implicitly asking to resubmit based on cryptodev-2.6, correct?

> You're also going to leak zero_buffer if crypto_register_akcipher
> fails.
>
When crypto_register_akcipher fails, it merely prints a warning and falls
through (does not immediately return), thus there's no leak.

Thanks,
Horia

\
 
 \ /
  Last update: 2019-05-23 12:03    [W:0.122 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site