From nobody Tue May 28 17:04:41 2024 X-Original-To: dev-commits-ports-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 4Vpf55490Mz5MkF8; Tue, 28 May 2024 17:04:41 +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 4Vpf552Pbmz4HgC; Tue, 28 May 2024 17:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716915881; 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=6/oJsoAJ3CuVFK1dc5hEHpZ5guQZW41Ydfigww1kSiE=; b=yufyGYfmHAp0tHcpk1Dc7TOTDkQD7HfZVixg/7lg1nDIfp/lvxkhN3wjwUg2JImFVx1f2b CVg2jsJB+tlnV925ozjATDN+oW1CKIqkR9UJHvh5HIacTnfd6Sh2raE7OpyFSNh8gTU4Jp VQ7pfKh+HnJfBj0H+DgwadMOak8zFuAbgjcbIvDK5KySbTlwUhWzJghaMA2lchk8nvv9DR cleCdbjy6cOe1oA4NnyOPUcHGuqKY21CHkqa7pfmrraxD2p2tCI3iMY3Yno0I/GaoEB7AL ohU7dSQStGGRg3whkdSEXTcol9mk05T7/Rfh3CkAllJDZLvsDQ8dnCxov1KR/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716915881; a=rsa-sha256; cv=none; b=IyKR2WnnDZ+tkGP2p9IZynH0plxPXAAmzb6zi1p3Ncj4aJRY0Eh/YWw0bEIIIlI/QpZjTp 2FHl4JtUHljaZlXH2NLN4OWiHiw0j7bFwHoy8V5cRwOHHRKtYyUrqUQXBO+22wsWjGYYDc SEcZkXOHSOtnkodrfheldZ97rpmylQr5qUXNO05pmm37zJQpCJr0kHeDWtGs6YuFBab7FA ShSzKSui0KbpSlDCaw1HBdEsppWbJ+fSk+dZzGnQHy5XM8FFhATu21t+n3SOr/mMGUEgRZ wWsmZVOYk7Dbr8pOoDRICWyRW6azgxgEfLz3osfPgFnmKQY6u0pOrXAAHGC8Jw== 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=1716915881; 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=6/oJsoAJ3CuVFK1dc5hEHpZ5guQZW41Ydfigww1kSiE=; b=iscVdpwxdM5ALu5UJ9j3tTKmIQkaFeYR+0OIMVFDp4vaPV7Mm8DkeV4vFb6CSxwVDNBkMX 415Iiz9hNtB+GLh1mC+RVFWEnADKTpZHPFnF2OM+chJZEqCkUbK+ImdcYTxshsxyBGIepH CG7UQRWYxkKrpDJn6iSTUJqKiw0wM+g2Iwyp9IoC5SjUidP69xRzq9tkrQxDGwfW0WGKEN pme2Rq2hn6KUJkzZJpi9FSofOFoKh4yppDsXEUG9Vn7Y4jX/ciD6UiP7aQc4yT3oiEsWYa 9ZP4l1mPA+xRLfJ9RgsxsdQjmi7BVGnlmIEC18Vclp/RPUhMReMuRPvIPfZTNQ== 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 4Vpf5520kczLCb; Tue, 28 May 2024 17:04:41 +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 44SH4fbB010483; Tue, 28 May 2024 17:04:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44SH4fpJ010480; Tue, 28 May 2024 17:04:41 GMT (envelope-from git) Date: Tue, 28 May 2024 17:04:41 GMT Message-Id: <202405281704.44SH4fpJ010480@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Bernard Spil Subject: git: 574b059ed440 - 2024Q2 - security/openssl32: Security update for CVE-2024-4741 List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-branches@freebsd.org Sender: owner-dev-commits-ports-branches@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/2024Q2 X-Git-Reftype: branch X-Git-Commit: 574b059ed44007cef0aa51a7853d33849a9127fd Auto-Submitted: auto-generated The branch 2024Q2 has been updated by brnrd: URL: https://cgit.FreeBSD.org/ports/commit/?id=574b059ed44007cef0aa51a7853d33849a9127fd commit 574b059ed44007cef0aa51a7853d33849a9127fd Author: Bernard Spil AuthorDate: 2024-05-28 16:42:16 +0000 Commit: Bernard Spil CommitDate: 2024-05-28 17:00:15 +0000 security/openssl32: Security update for CVE-2024-4741 Security: 73a697d7-1d0f-11ef-a490-84a93843eb75 MFH: 2024Q2 (cherry picked from commit 004078f59293ef7efb616daeb0c065a0c1f9bea4) --- 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 fd1d67a00317..c9081410da74 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);