From nobody Fri Jul 1 15:31:06 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0CB368AA7D6; Fri, 1 Jul 2022 15:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LZK0p5Pb5z4mqc; Fri, 1 Jul 2022 15:31:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656689466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K6fR4ZfikCJgtm+QcYFFWbooXh0qZM+ln2UBJfBMCKE=; b=SXNUjMSSmG4IBMr2AmYQ95rwYM6OODLjapECtXpOm7GbFlLr0pwnMzcU+cx/kt1wGFxwTY djsHImGtj7HKvw2qPAUN0XCBknCZWwkHPQ7o/9OCd9BfBT/bZWZGPu95SeQKKvmADD0RQy /wAuJF8AVfuk3uhpmUXvHhsHqk7F4vrnDiX/WAcVlFD2d5sBLbKj9pUIC0hGKuWM5vDGuP s5fOcCGOfNTz2rE6q8hFOHxEa1Nv+mrUqYY/e+T3CDw4vQ89+aigos52ZNm+CIep0OWt4+ qRiSL7CLBZ/lWE5/WPFa9VR9+fwPYZGV6iWDtDoA6kLV7iqqa+9nHX8E4LKsJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59D031E120; Fri, 1 Jul 2022 15:31:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 261FV6Jt011835; Fri, 1 Jul 2022 15:31:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 261FV6Dc011834; Fri, 1 Jul 2022 15:31:06 GMT (envelope-from git) Date: Fri, 1 Jul 2022 15:31:06 GMT Message-Id: <202207011531.261FV6Dc011834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 8179db52c2c8 - main - crypto: Fix the NULL_HMAC finalizer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8179db52c2c8692cdabf818bf1b7fdf3ad43b2db Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656689466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K6fR4ZfikCJgtm+QcYFFWbooXh0qZM+ln2UBJfBMCKE=; b=BGfCix0XTfV/PNj8xW2sx2xwOv4vWX8UWzVjarC6ETxoq4izJZwh/s3wbssq2evD/j7Mr9 Lhz620EWetRomH6ouxbdF3TK7zG5byGUYj9q6XgH3cEuBLtnOvD8qgwnTjNX8e0j+Wt4G8 WlardackWY8Duv4xtnadEb5aBVqt1lQ15sQFbpDjJQGmrU+7i3dwb+EcfhIax2ZR11Jh+b 7+k4z9Do8oN2tq3KHO3H0/KKdzv/Myu9hg/pygWbRIF7CLxObTsf4RppLJkvZwM8Kb95nu oKo3IDtxX/yq9kwgQObvExiDaorOOFrRaWphM4hbOKPdLJM9DMJKAk4HYXSIRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656689466; a=rsa-sha256; cv=none; b=BpiEsf75ss291K0Orh/uUwOFJ9WJGVkTj7E2nRuHaieuU6f0to6ayOwax97haBLqgjuhRe j0Jz0U55uahQbEzRmR/eAZPH3Gbj4j6KRe5O6EhOPY0SwdBdx5Ij0mtn8CrNa46jrZDypL M7yAHQ0CnYMXxp8E2Dp2Fq0WkWyZFs20hRMitxsfjM1bxa9nxX2Fe9zJmn9cG5eOgJEx0G 5As+aC1kf9rb/sWY0yeOBi0KXwqaLAwnuJ06XLBFPKR2kqlc/+xGjGoo3ismt61aUNRZXW kCWf7C68EBuc9Cy74wQ0gmmDUvKc6rJb25nPmF0IPDIMkfjWUecFYykv8U/R/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8179db52c2c8692cdabf818bf1b7fdf3ad43b2db commit 8179db52c2c8692cdabf818bf1b7fdf3ad43b2db Author: Mark Johnston AuthorDate: 2022-07-01 15:04:15 +0000 Commit: Mark Johnston CommitDate: 2022-07-01 15:04:15 +0000 crypto: Fix the NULL_HMAC finalizer The current implementation leaves the digest buffer partially uninitialized. Reported by: syzkaller Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35547 --- 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 e070a4a97142..160e1d867792 100644 --- a/sys/opencrypto/xform_null.c +++ b/sys/opencrypto/xform_null.c @@ -135,6 +135,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); }