From nobody Fri Jul 8 00:47:12 2022 X-Original-To: dev-commits-src-branches@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 5436D3E4E1D; Fri, 8 Jul 2022 00:47:13 +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 4LfF3j1WTnz3sXS; Fri, 8 Jul 2022 00:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657241233; 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=e2tb638Yn6HiWk9Lyjs4qOBSrhp+8n0yi9SPnN/49EI=; b=iQPnVkU/73s8btv2Caq8fnm0FY4nTHAN1NYf2+sqqB16L/6rrujAIyIy2RoPnM7HIa2noX cv9Hp3WClasJT/sC7O7Q+dhRf1elZDFzBomByRlbhphFis7mIzMDOqaHftB2eFQVj5m6EB QotTQeUkzMBy44npxalXgTiYKk9bGnUkVB/sKDNO6Qrp5cCRsVT5nXRESf8SdKllcB2PmE 9zif5RBNw5/AM48Zvb6RilyFP4twti+MuKc44B8FK3ud8X0dyV9wWa7YJ9FQZQGhM5SUCG wY44FzrBxJ3f7Bn94/1FMZa23r5E9Q4/5eEs97jjp8YEVxHpQe8SYlB3F1yJMw== 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 4LfF3j0YQgz12rF; Fri, 8 Jul 2022 00:47:13 +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 2680lC5j077463; Fri, 8 Jul 2022 00:47:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2680lCSS077462; Fri, 8 Jul 2022 00:47:12 GMT (envelope-from git) Date: Fri, 8 Jul 2022 00:47:12 GMT Message-Id: <202207080047.2680lCSS077462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 77712e81bf99 - stable/13 - crypto: Fix the NULL_HMAC finalizer List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 77712e81bf995c621753517b9f11ca2aad186953 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657241233; 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=e2tb638Yn6HiWk9Lyjs4qOBSrhp+8n0yi9SPnN/49EI=; b=StCjsYj8lR/1018a4pOX77vZ36ulbzFmGhCLbSSgjZVmz3yBdy/VnFnCJNWV8GCgi655iq rUFgo1lqLcmxtay0irayAJdvq2iDvBi0bk1No9GQcvZSfgOAqPEAtbwSzQkfB8CN8QPaFl PbQ0sDxOmPH/eWgUTsea1bZmjHu8vGfG9qeiPzAQaQcrO6jPT2dDC/kq2Her3ipld8cwEb 4a+ozOG8mICigk6g5gOymRealbSYgJJEI11dsZ/xP+lzM/z9lNNZwlvxussnHIScSPmJQR wVBcan1PBiykwImdJ0E62iDynjo7qElFsSqYiJ0hTWppDp1XSwQK0Aqh3cU1hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657241233; a=rsa-sha256; cv=none; b=QJkMjBDsZQASxdJM+DxC11KjZZmQU1R2uqPYf09V13k3otWK4cJwDYtoKkrahBhH0CQc+V KOV2whaO/95kgTuV+SSuKJ9g2+bvckEEgN37cl1fIr7IEc6+PLE/INewP+GjggH6jUSsY3 /81oHM8qwwnV4tlDlOIBMMrVe7XaQDXrT4PF7QxKdwp+pgQpMBZ3efVYWRT5aJVInWK8mL VAtBtHAg7gkmmYYhpYtOaeKnKKdQjk3pwtNzA8HMVfn/IonXvLHmgfGlGb3+rZEPuOzU8Q seqbVZOWVC3TedQskdJOWvwCygnYmMNiw+Ag6vo3U6reNbBZojpMJbUHokUcrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=77712e81bf995c621753517b9f11ca2aad186953 commit 77712e81bf995c621753517b9f11ca2aad186953 Author: Mark Johnston AuthorDate: 2022-07-01 15:04:15 +0000 Commit: Mark Johnston 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); }