Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Aug 2020 22:11:23 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r364845 - stable/12/sys/dev/cxgbe/crypto
Message-ID:  <202008262211.07QMBNq4013508@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Aug 26 22:11:22 2020
New Revision: 364845
URL: https://svnweb.freebsd.org/changeset/base/364845

Log:
  MFC 361776: Explicitly zero AES key schedules on the stack.

Modified:
  stable/12/sys/dev/cxgbe/crypto/t4_keyctx.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/cxgbe/crypto/t4_keyctx.c
==============================================================================
--- stable/12/sys/dev/cxgbe/crypto/t4_keyctx.c	Wed Aug 26 21:49:43 2020	(r364844)
+++ stable/12/sys/dev/cxgbe/crypto/t4_keyctx.c	Wed Aug 26 22:11:22 2020	(r364845)
@@ -75,6 +75,7 @@ t4_init_gmac_hash(const char *key, int klen, char *gha
 
 	rounds = rijndaelKeySetupEnc(keysched, key, klen);
 	rijndaelEncrypt(keysched, rounds, zeroes, ghash);
+	explicit_bzero(keysched, sizeof(keysched));
 }
 
 /* Copy out the partial hash state from a software hash implementation. */
@@ -195,4 +196,5 @@ t4_aes_getdeckey(void *dec_key, const void *enc_key, u
 		break;
 	}
 	MPASS(dkey == dec_key);
+	explicit_bzero(ek, sizeof(ek));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008262211.07QMBNq4013508>