svn commit: r259429 - head/sys/geom/eli

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Dec 15 22:52:19 UTC 2013


Author: pjd
Date: Sun Dec 15 22:52:18 2013
New Revision: 259429
URL: http://svnweb.freebsd.org/changeset/base/259429

Log:
  Clear some more places with potentially sensitive data.
  
  MFC after:	1 week

Modified:
  head/sys/geom/eli/g_eli_crypto.c

Modified: head/sys/geom/eli/g_eli_crypto.c
==============================================================================
--- head/sys/geom/eli/g_eli_crypto.c	Sun Dec 15 22:51:26 2013	(r259428)
+++ head/sys/geom/eli/g_eli_crypto.c	Sun Dec 15 22:52:18 2013	(r259429)
@@ -288,10 +288,12 @@ g_eli_crypto_hmac_final(struct hmac_ctx 
 	bzero(ctx, sizeof(*ctx));
 	SHA512_Update(&lctx, digest, sizeof(digest));
 	SHA512_Final(digest, &lctx);
+	bzero(&lctx, sizeof(lctx));
 	/* mdsize == 0 means "Give me the whole hash!" */
 	if (mdsize == 0)
 		mdsize = SHA512_MDLEN;
 	bcopy(digest, md, mdsize);
+	bzero(digest, sizeof(digest));
 }
 
 void


More information about the svn-src-all mailing list