Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jul 2022 00:47:12 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 77712e81bf99 - stable/13 - crypto: Fix the NULL_HMAC finalizer
Message-ID:  <202207080047.2680lCSS077462@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=77712e81bf995c621753517b9f11ca2aad186953

commit 77712e81bf995c621753517b9f11ca2aad186953
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-07-01 15:04:15 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-07-08 00:47:03 +0000

    crypto: Fix the NULL_HMAC finalizer
    
    The current implementation leaves the digest buffer partially
    uninitialized.
    
    Reported by:    syzkaller
    Reviewed by:    jhb
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 8179db52c2c8692cdabf818bf1b7fdf3ad43b2db)
---
 sys/opencrypto/xform_null.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/opencrypto/xform_null.c b/sys/opencrypto/xform_null.c
index d1b79e1385b2..729cff37a036 100644
--- a/sys/opencrypto/xform_null.c
+++ b/sys/opencrypto/xform_null.c
@@ -127,6 +127,5 @@ null_update(void *ctx, const void *buf, u_int len)
 static void
 null_final(uint8_t *buf, void *ctx)
 {
-	if (buf != (uint8_t *) 0)
-		bzero(buf, 12);
+	bzero(buf, NULL_HASH_LEN);
 }



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