From nobody Sun Jul 16 18:25:19 2023 X-Original-To: dev-commits-ports-all@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 4R3ttR689bz4ncRw; Sun, 16 Jul 2023 18:25:19 +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 4R3ttR5jPRz47Vl; Sun, 16 Jul 2023 18:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689531919; 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=XYPwASqcok9Z0zDDUf3UbxP4K9OsSozPyPUu+gOHJ6c=; b=ZP66/K8lyTTC9khFbtwHrkUo/WnLABUFnoZ7BoUaR8Fk6Jx0aN3Cf/YEUrpp3aVvxsqIZ9 O7RsL2VsOsTTWYP+YQGAfoT3dgNgMHY0HQ44/ebC1R/4E4lcQPiRwPopAiTHkKXdxILPgq xAPr92RQcVo4wTBc3LP2OZOVMBbMONSxHWTwVgfot8ANiYx8vRsLUBZqqgsdiG9/Zf44+w Jhqv+00F4ImB5sKhhZQtmvb8IvPaKmSml4ZpKPUAp2qo4wG3BdVqZfeidqKrIb8cP+k4G8 lB6qloTcJE060KDNvymCnHtL9fBJQtd3jtfjyvzvJG9eMUhrv8UhHLVn1o6+oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689531919; 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=XYPwASqcok9Z0zDDUf3UbxP4K9OsSozPyPUu+gOHJ6c=; b=d3lXRbl9hJAttq/SR6Nns2A/7ZeuIGhQ1zF/w9uW/mhLeQaoTvjVGO4E4iHYH9oKd6p8Q+ t4n4yYMltY9SjzfM5lsUvxINKmUaZLyUXQT6jIXYsuOl0lnI4E+bM6QFubeSX/DWjlXATG /Z/1Tz9IocEg8EwW63jCi2GGV371qZ8bJ1pa/txIZmhiXCWmU0NKaampRRIZkzu7NEQT+l PZNi55Kknv1kpRiEu2CqgnOAiNCAjeRQHRDUCCMvViLbEeHT0gRCwxEJHlfa0ftbIQ22zv 5RpDDFOshcelarq84vzpupS1DiLcolOb1vJRA9uQ+yXuZAVu9gLwtrdANaV43g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689531919; a=rsa-sha256; cv=none; b=aCr/GUql/0cwnSt2OXnry/UzrGqFq+/Rf+mln+CMVjD6jxF8v1FLmyWx2X3wyiutxR2Ar+ IQmWTY1aMjC4KnTGRHYWH65l3YCIwGLCcrJ/GJLDipuvi3AQvo/6VEZUxZG03MMqWlVK/P 3/3lvL32oBR5MY+pRyunksFzLGHd7bjn9wKtaeeRJrc7qJ5vikN6wIbAa/XY5fY8+cD8Hg ya0iftRyiegAp4LsZ99KDpMMc++usXOAamzPnWhlhpInTF97QGwK64U+kj/xjkn5e1Biu5 4BjUHdoI4UfG2yMIRQjz+u3uAqXtTLmO5wjyZi013+xQWjov+Vn0tSiwuF0oIA== 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 4R3ttR4nXlzs8L; Sun, 16 Jul 2023 18:25:19 +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 36GIPJG0062324; Sun, 16 Jul 2023 18:25:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36GIPJrm062323; Sun, 16 Jul 2023 18:25:19 GMT (envelope-from git) Date: Sun, 16 Jul 2023 18:25:19 GMT Message-Id: <202307161825.36GIPJrm062323@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: 992c6f8ea891 - main - security/openssl30: Security fix for CVE-2023-2975 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@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: 992c6f8ea8912a57874ec5a290247b46aaaee668 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brnrd: URL: https://cgit.FreeBSD.org/ports/commit/?id=992c6f8ea8912a57874ec5a290247b46aaaee668 commit 992c6f8ea8912a57874ec5a290247b46aaaee668 Author: Bernard Spil AuthorDate: 2023-07-16 18:24:07 +0000 Commit: Bernard Spil CommitDate: 2023-07-16 18:24:07 +0000 security/openssl30: Security fix for CVE-2023-2975 Security: 41c60e16-2405-11ee-a0d1-84a93843eb75 --- security/openssl30/Makefile | 3 +- security/openssl30/files/patch-CVE-2023-2975 | 54 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/security/openssl30/Makefile b/security/openssl30/Makefile index 8a4a877899a4..a8b2a25904b2 100644 --- a/security/openssl30/Makefile +++ b/security/openssl30/Makefile @@ -1,5 +1,6 @@ PORTNAME= openssl -DISTVERSION= 3.0.9 +PORTVERSION= 3.0.9 +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/openssl30/files/patch-CVE-2023-2975 b/security/openssl30/files/patch-CVE-2023-2975 new file mode 100644 index 000000000000..397b46deb430 --- /dev/null +++ b/security/openssl30/files/patch-CVE-2023-2975 @@ -0,0 +1,54 @@ +From 00e2f5eea29994d19293ec4e8c8775ba73678598 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)