mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] crypto: obscure state information on free
@ 2008-08-11 20:26 Neil Horman
  2008-08-14 11:51 ` Herbert Xu
  0 siblings, 1 reply; 8+ messages in thread
From: Neil Horman @ 2008-08-11 20:26 UTC (permalink / raw)
  To: linux-crypto, linux-kernel; +Cc: nhorman, herbert, davem

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
 ****************************************************/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-08-17 12:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-11 20:26 [PATCH] crypto: obscure state information on free Neil Horman
2008-08-14 11:51 ` Herbert Xu
2008-08-14 12:21   ` Neil Horman
2008-08-17 12:20     ` Herbert Xu
2008-08-17 12:23       ` Herbert Xu
2008-08-14 12:23   ` crypto: skcipher - Use RNG interface instead of get_random_bytes Herbert Xu
2008-08-14 15:28     ` Neil Horman
2008-08-17 12:22     ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®