Date: Tue, 27 May 2014 14:55:10 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266749 - stable/10/sys/geom/eli Message-ID: <201405271455.s4REtAth053195@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Tue May 27 14:55:09 2014 New Revision: 266749 URL: http://svnweb.freebsd.org/changeset/base/266749 Log: MFC: r259428 Clear content of keyfiles loaded by the loader after processing them. MFC: r259429 Clear some more places with potentially sensitive data. Modified: stable/10/sys/geom/eli/g_eli.c stable/10/sys/geom/eli/g_eli_crypto.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/eli/g_eli.c ============================================================================== --- stable/10/sys/geom/eli/g_eli.c Tue May 27 14:54:20 2014 (r266748) +++ stable/10/sys/geom/eli/g_eli.c Tue May 27 14:55:09 2014 (r266749) @@ -990,6 +990,7 @@ g_eli_keyfiles_load(struct hmac_ctx *ctx G_ELI_DEBUG(1, "Loaded keyfile %s for %s (type: %s).", file, provider, name); g_eli_crypto_hmac_update(ctx, data, size); + bzero(data, size); } } Modified: stable/10/sys/geom/eli/g_eli_crypto.c ============================================================================== --- stable/10/sys/geom/eli/g_eli_crypto.c Tue May 27 14:54:20 2014 (r266748) +++ stable/10/sys/geom/eli/g_eli_crypto.c Tue May 27 14:55:09 2014 (r266749) @@ -289,10 +289,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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405271455.s4REtAth053195>