Re: [PATCH v3 1/2] crypto: authenc - don't leak pointers to authenc keys

2018-04-20 Thread Herbert Xu
On Tue, Apr 03, 2018 at 09:39:00AM +0300, Tudor Ambarus wrote:
> In crypto_authenc_setkey we save pointers to the authenc keys in
> a local variable of type struct crypto_authenc_keys and we don't
> zeroize it after use. Fix this and don't leak pointers to the
> authenc keys.
> 
> Signed-off-by: Tudor Ambarus 

Patch applied.  Thanks.
-- 
Email: Herbert Xu 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


[PATCH v3 1/2] crypto: authenc - don't leak pointers to authenc keys

2018-04-03 Thread Tudor Ambarus
In crypto_authenc_setkey we save pointers to the authenc keys in
a local variable of type struct crypto_authenc_keys and we don't
zeroize it after use. Fix this and don't leak pointers to the
authenc keys.

Signed-off-by: Tudor Ambarus 
---
 crypto/authenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/crypto/authenc.c b/crypto/authenc.c
index d3d6d72..4fa8d40 100644
--- a/crypto/authenc.c
+++ b/crypto/authenc.c
@@ -108,6 +108,7 @@ static int crypto_authenc_setkey(struct crypto_aead 
*authenc, const u8 *key,
   CRYPTO_TFM_RES_MASK);
 
 out:
+   memzero_explicit(, sizeof(keys));
return err;
 
 badkey:
-- 
2.9.4