]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- djm@cvs.openbsd.org 2013/12/02 03:13:14
authorDamien Miller <djm@mindrot.org>
Wed, 4 Dec 2013 23:26:14 +0000 (10:26 +1100)
committerDamien Miller <djm@mindrot.org>
Wed, 4 Dec 2013 23:26:14 +0000 (10:26 +1100)
     [cipher.c]
     correct bzero of chacha20+poly1305 key context. bz#2177 from
     Loganaden Velvindron @ AfriNIC

     Also make it a memset for consistency with the rest of cipher.c

ChangeLog
cipher.c

index 365af3232333bc6534cf7fad5500c78326b193be..a7fd1d0b1ba300b26c7ee188d68467d9be8dfa26 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      [key.c]
      make key_to_blob() return a NULL blob on failure; part of
      bz#2175 from Loganaden Velvindron @ AfriNIC
+   - djm@cvs.openbsd.org 2013/12/02 03:13:14
+     [cipher.c]
+     correct bzero of chacha20+poly1305 key context. bz#2177 from
+     Loganaden Velvindron @ AfriNIC
+     
+     Also make it a memset for consistency with the rest of cipher.c
 
 20131121
  - (djm) OpenBSD CVS Sync
index c4aec3923b61d5d475e0d2bd7f84c84a04b2c7d9..fbb73014864da6394cfbd671d2ee39a5c9067c0f 100644 (file)
--- a/cipher.c
+++ b/cipher.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cipher.c,v 1.91 2013/11/21 00:45:44 djm Exp $ */
+/* $OpenBSD: cipher.c,v 1.92 2013/12/02 03:13:14 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -414,7 +414,7 @@ void
 cipher_cleanup(CipherContext *cc)
 {
        if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0)
-               bzero(&cc->cp_ctx, sizeof(&cc->cp_ctx));
+               memset(&cc->cp_ctx, 0, sizeof(cc->cp_ctx));
        else if (EVP_CIPHER_CTX_cleanup(&cc->evp) == 0)
                error("cipher_cleanup: EVP_CIPHER_CTX_cleanup failed");
 }