lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Nov 2008 15:55:36 -0500
From:	Neil Horman <nhorman@...driver.com>
To:	herbert@...dor.apana.org.au, davem@...emloft.net,
	linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org
Cc:	nhorman@...driver.com
Subject: [PATCH] ansi_cprng: zero out key data on exit

Its been mentioned to me a few times that the ansi_cprng doesn't zero out its
data when a context is freed.  Given that we store key, and other seed data in
that structure, I think its probably a good idea that we zero it out.  This
patch does that.

Regards
Neil

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


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


diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
index 72db0fd..e6ad373 100644
--- a/crypto/ansi_cprng.c
+++ b/crypto/ansi_cprng.c
@@ -266,6 +266,7 @@ done:
 static void free_prng_context(struct prng_context *ctx)
 {
 	crypto_free_cipher(ctx->tfm);
+	memset(ctx, 0, sizeof(struct prng_context));
 }
 
 static int reset_prng_context(struct prng_context *ctx,
-- 
/****************************************************
 * Neil Horman <nhorman@...driver.com>
 * Software Engineer, Red Hat
 ****************************************************/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ