From nobody Tue May 28 16:42:31 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 4VpdbW26Vhz5MhC6; Tue, 28 May 2024 16:42:31 +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 4VpdbW1dLCz4FVB; Tue, 28 May 2024 16:42:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716914551; 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=eianuPsLUOkXzBH30nuSgW2JZwKW+0YCzw+w4UvkD1c=; b=oTpFfPXH1xZKRfHKr6/vY9M7Pz5udA7uRnDCyeeOgvfXC0RBYZ6ZQKxYC3ObZEUijJNkJc /dfTzbmDSvnqCMSO5ZkfwljQomTYb9Q79dmHiqUpg+X0eFcdvlqLAZBxi4lFiCjsJO2uyh qvH3MekReqiReXQ2zUCvtDP1zO+J5xSdPWqIso6LG3PtadvWe7KBxSLBZK8weQASOe0XXZ m2sDDlGfJvUeKzRT9w2KHcSUiEHXWLZEpQb7lM0b95mrCRyNQox5blHcuaoZoPHr1eQUC8 imKjyoRSSGUtgWQ/36QTVp5brY0t0kxSmowHkL1/n4AZn+iPDhCQPqibip7+ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716914551; a=rsa-sha256; cv=none; b=Ch3C0zJnryGeLq1l89MYLDZR/X0yBsJcHfwBe0BKDCqrGHfaIEdy6oTWPznW5CeBGZnAxU XAPYF7psFMfehKiktqLfqS/gxDiDqJt98w6fKUS0r9QHWYqW9Uk/8ILjpWa83iyYRYiEk9 C0DuM2On7ntuGe/7tq44y38BqYM4VEVPDy2yEAq18qfJuY1C+k+KmYUe/BLPI6vDngfnMb igJXQK4k7s/SfzOu4Of/EkNw4LLa+ZkiRVuYOtf1GKWjS2ajERR1OUv2VZw4BCLFTjgSvv WlAuy5pI10k4QjUHDnllvqsEr35gzZ+qXe1E1TsdNKuyQh9hnOM2G1At2wKGyA== 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=1716914551; 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=eianuPsLUOkXzBH30nuSgW2JZwKW+0YCzw+w4UvkD1c=; b=Q7wWysOjFtq1GyIrJYDtD4SQGXPno4uSErZhcLINiYj8862hgY/xITYUJwAPG/O3HVgHBp g/kdSL0hLXYrWjr7i5SRXIKpIZkNHUJK4P3CokCEjKXygA/9VobOn/rv/Yk9TUffy4Y3hI Ex6P4/k3FrprwEfDOlIFpL44gXBZMITvez7F8nUYk+8njgRgI3MN1kip2u6K7nPMG4xFmj NXe7g9oWhAdmAxsdQuQ2Jg6XY3wdhH+J7n7bYJwJR2smOaVtDDswXdLeEVSATSdjHCRxjD LqBh1+OJJF9VMJNiNlnjoeus539EqLcTt9ZmRx0+UvLKpJ6GHRyoNys/u5xoWQ== 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 4VpdbW1F1LzKx9; Tue, 28 May 2024 16:42:31 +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 44SGgVQN074152; Tue, 28 May 2024 16:42:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44SGgVmA074149; Tue, 28 May 2024 16:42:31 GMT (envelope-from git) Date: Tue, 28 May 2024 16:42:31 GMT Message-Id: <202405281642.44SGgVmA074149@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: 004078f59293 - main - security/openssl32: 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: 004078f59293ef7efb616daeb0c065a0c1f9bea4 Auto-Submitted: auto-generated The branch main has been updated by brnrd: URL: https://cgit.FreeBSD.org/ports/commit/?id=004078f59293ef7efb616daeb0c065a0c1f9bea4 commit 004078f59293ef7efb616daeb0c065a0c1f9bea4 Author: Bernard Spil AuthorDate: 2024-05-28 16:42:16 +0000 Commit: Bernard Spil CommitDate: 2024-05-28 16:42:16 +0000 security/openssl32: Security update for CVE-2024-4741 Security: 73a697d7-1d0f-11ef-a490-84a93843eb75 MFH: 2024Q2 --- security/openssl32/Makefile | 2 +- security/openssl32/files/patch-CVE-2024-4741 | 36 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/security/openssl32/Makefile b/security/openssl32/Makefile index 0af7b3a0663e..2e1609fe15f8 100644 --- a/security/openssl32/Makefile +++ b/security/openssl32/Makefile @@ -1,6 +1,6 @@ PORTNAME= openssl DISTVERSION= 3.2.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= security devel MASTER_SITES= https://www.openssl.org/source/ \ ftp://ftp.cert.dfn.de/pub/tools/net/openssl/source/ diff --git a/security/openssl32/files/patch-CVE-2024-4741 b/security/openssl32/files/patch-CVE-2024-4741 new file mode 100644 index 000000000000..78aea45553ce --- /dev/null +++ b/security/openssl32/files/patch-CVE-2024-4741 @@ -0,0 +1,36 @@ +From c88c3de51020c37e8706bf7a682a162593053aac 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 08e519ac7a385..f46da0fd5b33f 100644 +--- ssl/record/methods/tls_common.c.orig ++++ ssl/record/methods/tls_common.c +@@ -2129,7 +2129,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);