diff options
author | Xin LI <delphij@FreeBSD.org> | 2014-02-08 05:17:49 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2014-02-08 05:17:49 +0000 |
commit | c35ddb346f69cc065d22b85182a458e46a7cd74c (patch) | |
tree | fcd18832d35b1b6392526c504e931d002640b97b /sys/geom | |
parent | 62fbd7c27a88efc031991c5c8735d05272436dd6 (diff) | |
download | src-c35ddb346f69cc065d22b85182a458e46a7cd74c.tar.gz src-c35ddb346f69cc065d22b85182a458e46a7cd74c.zip |
In g_eli_crypto_hmac_init(), zero out after using the ipad buffer,
k_ipad.
Note that the two consumers in geli(4) are not affected by this
issue because the way the code is constructed and as such, we
believe there is no security impact with or without this change
with geli(4)'s usage.
Reported by: Serge van den Boom <serge vdboom.org>
Reviewed by: pjd
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=261618
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/eli/g_eli_crypto.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/geom/eli/g_eli_crypto.c b/sys/geom/eli/g_eli_crypto.c index e7217a1342a8..9b420972b03e 100644 --- a/sys/geom/eli/g_eli_crypto.c +++ b/sys/geom/eli/g_eli_crypto.c @@ -265,6 +265,7 @@ g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const uint8_t *hkey, /* Perform inner SHA512. */ SHA512_Init(&ctx->shactx); SHA512_Update(&ctx->shactx, k_ipad, sizeof(k_ipad)); + bzero(k_ipad, sizeof(k_ipad)); } void |