lkml.org 
[lkml]   [2019]   [May]   [24]   [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 3:38 PM, Herbert Xu wrote:
> On Thu, May 23, 2019 at 10:02:41AM +0000, Horia Geanta wrote:
>>
>> When crypto_register_akcipher fails, it merely prints a warning and falls
>> through (does not immediately return), thus there's no leak.
>
> How can this work? Wouldn't the exit path then unregister a bunch of
> unregistered algorithms and crash?
>
You're actually right.
zero_buffer is leaked in case crypto_register_akcipher fails.

Besides this, there is an existing issue (independent of current patch) with
algorithm registration: algorithms (in fact, rsa) are unregistered even if
registration might have failed.
This should be addressed separately.

Thanks,
Horia

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