[PATCH] crypto: obscure state information on free

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Neil Horman
Date: Monday, August 11, 2008 - 1:26 pm

Patch to obscure state information on free in prng code.  Keeps prying eyes from
sifting through your trash :)

Regards
Neil

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>


 prng.c |    1 +
 1 file changed, 1 insertion(+)


diff --git a/crypto/prng.c b/crypto/prng.c
index b203093..fc6fa28 100644
--- a/crypto/prng.c
+++ b/crypto/prng.c
@@ -296,6 +296,7 @@ EXPORT_SYMBOL_GPL(alloc_prng_context);
 void free_prng_context(struct prng_context *ctx)
 {
 	crypto_free_cipher(ctx->tfm);
+	memset(ctx, 0, sizeof(struct prng_context));
 	kfree(ctx);
 }
 EXPORT_SYMBOL_GPL(free_prng_context);
-- 
/****************************************************
 * Neil Horman <nhorman@tuxdriver.com>
 * Software Engineer, Red Hat
 ****************************************************/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] crypto: obscure state information on free, Neil Horman, (Mon Aug 11, 1:26 pm)
Re: [PATCH] crypto: obscure state information on free, Neil Horman, (Thu Aug 14, 5:21 am)