Re: [PATCH v2 1/5] crypto: dh - Fix double free of ctx->p

2017-11-06 Thread Tudor Ambarus
On 11/06/2017 04:30 AM, Eric Biggers wrote: From: Eric Biggers When setting the secret with the software Diffie-Hellman implementation, if allocating 'g' failed (e.g. if it was longer than MAX_EXTERN_MPI_BITS), then 'p' was freed twice: once immediately, and once later

[PATCH v2 1/5] crypto: dh - Fix double free of ctx->p

2017-11-05 Thread Eric Biggers
From: Eric Biggers When setting the secret with the software Diffie-Hellman implementation, if allocating 'g' failed (e.g. if it was longer than MAX_EXTERN_MPI_BITS), then 'p' was freed twice: once immediately, and once later when the crypto_kpp tfm was destroyed. Fix it by