From nobody Sun Jul 16 18:26:05 2023 X-Original-To: dev-commits-ports-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 4R3tvL0TSrz4ncnG; Sun, 16 Jul 2023 18:26:06 +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 4R3tvK71z5z47cW; Sun, 16 Jul 2023 18:26:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689531966; 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=WtGK/mm7KtvHyazNXyO09n4BggneLt36GXrkm/r98UA=; b=Bjny3JSdNf0Pu4dNWERLRAJ07ha9UqHWnRk/r8C0ihQWd0qfE9xNwO8MeLaQsR5VvOD+do riQ5Nyv7LRi+d70SRW6QtPlDy3qJCBbPv4nxN365TGrae2048twh594nUOFNjIKPwYY5Yo y34UoLXDUoHVjP7zwdFZ8S2mExTXD4eTbNfr03/JBdqKTvXO0vX+7vOPW3KOuWHGxvXFHk d6JLhXwDqxniEb8TucSM9XBxDHkEf7ffZcWrGDRGGkd/rkOpj5/CzTvAq9IoY/2O2iebz9 oFNdFQ5ykV5VuQN2lowCI03sjZxTBsBB3w2WYNKJon5sbZGgmeNsRihbCMlgWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689531966; 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=WtGK/mm7KtvHyazNXyO09n4BggneLt36GXrkm/r98UA=; b=EIgX1lhSAr7CMK83ejZqgHcbqgk3gmYMaZQkJY38UH8JpbEnHI7R8e/7FTYVwphqjJpfQ3 OizPyh3VE8tTNoOpmfZWv6NKIDeieJLQV8uIGQjOKOel8zxiN9mTmjEkNyFnXhPEVmWDkk 9UzkX+GQfLILYt/TF72wX6Bv4pTp+wZTD3jtELI+ptpSKim+t0Ul4/49XNWii8enqDdzfQ r0PrfcBYbdFKTG/clUlJWq8U0XpM5naInaqGi2GUROIwlyePMkJEEqzUD7hreFKd32TJ7D 8HcS3Iz+W2ytdr2nWcz3NhXq0g5BqO3GX6YtuE6Qo1VM7UmOAs1FTe2yiJv5Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689531966; a=rsa-sha256; cv=none; b=b1tbtYol+83Md9oMEjHDglTQUCnBo2eAYU6kpNrTCWqr6YZu5cwZF3FMDiaCTWFkGcvQz9 3Cl4LVbaRy7ksuH8F4yBS0ircBCS+FAZVnPAh0Q+22or3oNZVNpl1loAuLjsvgtSRLqNPt xM+8B7vCMl/CRpVwypLc3bKPsv0PRAeTVK2kKat4IDfLVZ9+Z9l6GmXoWqYe3R1xvtkGic tp4lYZC+8nlp9Kj2BNcac9A86BNVxpfhzq42XwdefBVV0kQEZVBxAC7qXiWgt/iLhpIkbJ 1yNd6dfHb3KStH8JpD7A/4gyYhwK8UFSjOM6441A4gIViSCXmVHdR9oiKgDe6Q== 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 4R3tvK65dbzsJC; Sun, 16 Jul 2023 18:26:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36GIQ5hA062582; Sun, 16 Jul 2023 18:26:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36GIQ5xt062581; Sun, 16 Jul 2023 18:26:05 GMT (envelope-from git) Date: Sun, 16 Jul 2023 18:26:05 GMT Message-Id: <202307161826.36GIQ5xt062581@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Bernard Spil Subject: git: 6d38380655cd - main - security/openssl31: Security fix for CVE-2023-2975 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brnrd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d38380655cd0caadc3cbcb95ee6d4571fa2471b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brnrd: URL: https://cgit.FreeBSD.org/ports/commit/?id=6d38380655cd0caadc3cbcb95ee6d4571fa2471b commit 6d38380655cd0caadc3cbcb95ee6d4571fa2471b Author: Bernard Spil AuthorDate: 2023-07-16 18:25:36 +0000 Commit: Bernard Spil CommitDate: 2023-07-16 18:25:36 +0000 security/openssl31: Security fix for CVE-2023-2975 Security: 41c60e16-2405-11ee-a0d1-84a93843eb75 --- security/openssl31/Makefile | 3 +- security/openssl31/files/patch-CVE-2023-2975 | 54 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/security/openssl31/Makefile b/security/openssl31/Makefile index 71d3800638c1..29221630a1e3 100644 --- a/security/openssl31/Makefile +++ b/security/openssl31/Makefile @@ -1,5 +1,6 @@ PORTNAME= openssl -DISTVERSION= 3.1.1 +PORTVERSION= 3.1.1 +PORTREVISION= 1 CATEGORIES= security devel MASTER_SITES= https://www.openssl.org/source/ \ ftp://ftp.cert.dfn.de/pub/tools/net/openssl/source/ diff --git a/security/openssl31/files/patch-CVE-2023-2975 b/security/openssl31/files/patch-CVE-2023-2975 new file mode 100644 index 000000000000..dde528e31be4 --- /dev/null +++ b/security/openssl31/files/patch-CVE-2023-2975 @@ -0,0 +1,54 @@ +From 6a83f0c958811f07e0d11dfc6b5a6a98edfd5bdc Mon Sep 17 00:00:00 2001 +From: Tomas Mraz +Date: Tue, 4 Jul 2023 17:30:35 +0200 +Subject: [PATCH] Do not ignore empty associated data with AES-SIV mode + +The AES-SIV mode allows for multiple associated data items +authenticated separately with any of these being 0 length. + +The provided implementation ignores such empty associated data +which is incorrect in regards to the RFC 5297 and is also +a security issue because such empty associated data then become +unauthenticated if an application expects to authenticate them. + +Fixes CVE-2023-2975 + +Reviewed-by: Matt Caswell +Reviewed-by: Paul Dale +(Merged from https://github.com/openssl/openssl/pull/21384) + +(cherry picked from commit c426c281cfc23ab182f7d7d7a35229e7db1494d9) +--- + .../implementations/ciphers/cipher_aes_siv.c | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) + +diff --git a/providers/implementations/ciphers/cipher_aes_siv.c b/providers/implementations/ciphers/cipher_aes_siv.c +index 45010b90db2a..b396c8651a32 100644 +--- providers/implementations/ciphers/cipher_aes_siv.c.orig ++++ providers/implementations/ciphers/cipher_aes_siv.c +@@ -120,14 +120,18 @@ static int siv_cipher(void *vctx, unsigned char *out, size_t *outl, + if (!ossl_prov_is_running()) + return 0; + +- if (inl == 0) { +- *outl = 0; +- return 1; +- } ++ /* Ignore just empty encryption/decryption call and not AAD. */ ++ if (out != NULL) { ++ if (inl == 0) { ++ if (outl != NULL) ++ *outl = 0; ++ return 1; ++ } + +- if (outsize < inl) { +- ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL); +- return 0; ++ if (outsize < inl) { ++ ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL); ++ return 0; ++ } + } + + if (ctx->hw->cipher(ctx, out, in, inl) <= 0)