Re: [PATCH] crypto: rsa-pkcs1pad - Fix akcipher request allocation

2016-07-18 Thread Herbert Xu
On Thu, Jul 14, 2016 at 08:39:18PM -0700, Tadeusz Struk wrote: > Hi Salvatore, > On 07/14/2016 03:25 AM, Salvatore Benedetto wrote: > > Embedding the akcipher_request in pkcs1pad_request don't take > > into account the context space required by the akcipher object. > > I think we do take into

Re: [PATCH] crypto: rsa-pkcs1pad - Fix akcipher request allocation

2016-07-14 Thread Tadeusz Struk
Hi Salvatore, On 07/14/2016 03:25 AM, Salvatore Benedetto wrote: > Embedding the akcipher_request in pkcs1pad_request don't take > into account the context space required by the akcipher object. I think we do take into account the sub request context. See line 675. The only thing that is wrong is

[PATCH] crypto: rsa-pkcs1pad - Fix akcipher request allocation

2016-07-14 Thread Salvatore Benedetto
Embedding the akcipher_request in pkcs1pad_request don't take into account the context space required by the akcipher object. This result in memory corruption (and kernel panic) as the akcipher object will overwrite anything after akcipher_request structure. Fix it by dinamically allocating the