From nobody Tue May 28 16:49:19 2024 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 4VpdlM2K5tz5Mhkp; Tue, 28 May 2024 16:49: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 4VpdlM1kT1z4G3n; Tue, 28 May 2024 16:49:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716914959; 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=CU6LC4HNO6jb/Yv6liYEXo7XDZlEUXDQRwl/kmYZKes=; b=PkKLPYvJT3xbhnt4X2m09exfsKxBvGRNsPKcEPeH1wBk+jd8/xBkDBfuJMnf6FgQs33qGK DpmZpPhxV4QCAWFZTV3z5dWE7ZkqJpqVz96fPp7381COcMq/JmNnkrCc5VKZYBLBf0/Qqf KP34GkKh8IcRZciv+v2rHkMWhd/Wi457iEK9CszlbYWhwgxEN+5bZAMSNnn9TGESDLt6Le kjEhPu3rtCcJFUfFFQUzIPanFEGuYCrCaYuhfmSntLyEsO+35aVALnmM5KqnoqsrjCEioX MzopoBm7EcV1iAmlvZehthDUIKumY+QZ+fGXmT+P+h2E4BwpMGWLx0UOE37hBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716914959; a=rsa-sha256; cv=none; b=RMXcPMMEV4xP5qkDlNjGnQrcIoUTlFv2y/kDhcsL8BxOL0ifBJmfKwz0zt0TiyuW5ULLff dbzuH/8xKjGAY+yvF6E1SFFJu6nRG1EVzDhVNnazdiboUqNNVVuTBL/QuPN+Ig0kW47Yde qAJl5/lB5FYuPlHECu0p3IMFhAzSC4nuADfpCJ8pPXS+WsaAm8K3x2pKOP0k6d8Ss6KPV8 fnCEA98kUXN5m7pq5v+2YACuhT0TOp0z5C5FFqpTEYfyR62CIGMtLMEY8p7MwGDmx8Flnp isBmWhqmkDPm2G3YROAIeXc4SltZj0IHxOYHng6NBY4YYxiZeaMOy6fjUyqrpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716914959; 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=CU6LC4HNO6jb/Yv6liYEXo7XDZlEUXDQRwl/kmYZKes=; b=MVdmMvLoXIMRit1++/xnhV19e0FiR6UDDCc2qg2EcMGbawSWUZkVwUOq56QQF7R/g+Tfgc NoBpanzT8sDR9neAftBCfHIwQ/THdAe/dYykzqseStFRXCPfySrtYC9V7qtpexznAhnkm/ ZO1cbsER3jRGT22sX1rvrWRCiSKMXjjIVDI72b2+F2+YL9J/RaMe+KWKtuBVW0T75+giHf F9eLBnUyFqx+KRvcl4dVknyJZ1MbsyZCBLln4AlDvTmTLBA1cq2jI7OjZoBe6EvztdTwsp ykIjue/y9LzqZd975JDhCsirfuMbedor/CHW4pM/HMnN0/7TB949MS06Fu4crw== 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 4VpdlM1Kp6zLBj; Tue, 28 May 2024 16:49: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 44SGnJIW075231; Tue, 28 May 2024 16:49:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44SGnJJj075228; Tue, 28 May 2024 16:49:19 GMT (envelope-from git) Date: Tue, 28 May 2024 16:49:19 GMT Message-Id: <202405281649.44SGnJJj075228@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: 6ace8008e56f - main - security/openssl33: Security update for CVE-2024-4741 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-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: 6ace8008e56ffd41133206478ef6926e9d509735 Auto-Submitted: auto-generated The branch main has been updated by brnrd: URL: https://cgit.FreeBSD.org/ports/commit/?id=6ace8008e56ffd41133206478ef6926e9d509735 commit 6ace8008e56ffd41133206478ef6926e9d509735 Author: Bernard Spil AuthorDate: 2024-05-28 16:49:06 +0000 Commit: Bernard Spil CommitDate: 2024-05-28 16:49:06 +0000 security/openssl33: Security update for CVE-2024-4741 Security: 73a697d7-1d0f-11ef-a490-84a93843eb75 MFH: 2024Q2 --- security/openssl33/Makefile | 2 +- security/openssl33/files/patch-CVE-2024-4741 | 36 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/security/openssl33/Makefile b/security/openssl33/Makefile index 15a1cb76763b..093c21e2fbe5 100644 --- a/security/openssl33/Makefile +++ b/security/openssl33/Makefile @@ -1,6 +1,6 @@ PORTNAME= openssl DISTVERSION= 3.3.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security devel MASTER_SITES= https://www.openssl.org/source/ \ ftp://ftp.cert.dfn.de/pub/tools/net/openssl/source/ diff --git a/security/openssl33/files/patch-CVE-2024-4741 b/security/openssl33/files/patch-CVE-2024-4741 new file mode 100644 index 000000000000..47e857a9bafd --- /dev/null +++ b/security/openssl33/files/patch-CVE-2024-4741 @@ -0,0 +1,36 @@ +From e5093133c35ca82874ad83697af76f4b0f7e3bd8 Mon Sep 17 00:00:00 2001 +From: Matt Caswell +Date: Tue, 23 Apr 2024 16:34:46 +0100 +Subject: [PATCH] Only free the read buffers if we're not using them + +If we're part way through processing a record, or the application has +not released all the records then we should not free our buffer because +they are still needed. + +CVE-2024-4741 + +Reviewed-by: Tomas Mraz +Reviewed-by: Neil Horman +(Merged from https://github.com/openssl/openssl/pull/24395) + +(cherry picked from commit 38690cab18de88198f46478565fab423cf534efa) +--- + ssl/record/methods/tls_common.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/ssl/record/methods/tls_common.c b/ssl/record/methods/tls_common.c +index b7481c071f746..01cf3012b8c2c 100644 +--- ssl/record/methods/tls_common.c.orig ++++ ssl/record/methods/tls_common.c +@@ -2124,7 +2124,10 @@ int tls_free_buffers(OSSL_RECORD_LAYER *rl) + /* Read direction */ + + /* If we have pending data to be read then fail */ +- if (rl->curr_rec < rl->num_recs || TLS_BUFFER_get_left(&rl->rbuf) != 0) ++ if (rl->curr_rec < rl->num_recs ++ || rl->curr_rec != rl->num_released ++ || TLS_BUFFER_get_left(&rl->rbuf) != 0 ++ || rl->rstate == SSL_ST_READ_BODY) + return 0; + + return tls_release_read_buffer(rl);