diff --git a/Backport-Fix-CVE-2025-9230.patch b/Backport-Fix-CVE-2025-9230.patch new file mode 100644 index 0000000000000000000000000000000000000000..500180b56f2b9480626c61b2b815c32705598c62 --- /dev/null +++ b/Backport-Fix-CVE-2025-9230.patch @@ -0,0 +1,31 @@ +From a79c4ce559c6a3a8fd4109e9f33c1185d5bf2def Mon Sep 17 00:00:00 2001 +From: Viktor Dukhovni +Date: Thu, 11 Sep 2025 18:10:12 +0200 +Subject: [PATCH] kek_unwrap_key(): Fix incorrect check of unwrapped key size + +Fixes CVE-2025-9230 + +The check is off by 8 bytes so it is possible to overread by +up to 8 bytes and overwrite up to 4 bytes. + +Reviewed-by: Neil Horman +Reviewed-by: Matt Caswell +Reviewed-by: Tomas Mraz +(cherry picked from commit 9c462be2cea54ebfc62953224220b56f8ba22a0c) +--- + crypto/cms/cms_pwri.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c +index d5c3c8d399dfd..33a7ccaa76a3a 100644 +--- a/crypto/cms/cms_pwri.c ++++ b/crypto/cms/cms_pwri.c +@@ -229,7 +229,7 @@ static int kek_unwrap_key(unsigned char *out, size_t *outlen, + /* Check byte failure */ + goto err; + } +- if (inlen < (size_t)(tmp[0] - 4)) { ++ if (inlen < 4 + (size_t)tmp[0]) { + /* Invalid length value */ + goto err; + } diff --git a/openssl.spec b/openssl.spec index 89289659fa5154075d987b2b8f4cc66d73638e89..9867e000bce36fff163a1884efd4127eff02cf4a 100755 --- a/openssl.spec +++ b/openssl.spec @@ -2,7 +2,7 @@ Name: openssl Epoch: 1 Version: 3.0.12 -Release: 27 +Release: 28 Summary: Cryptography and SSL/TLS Toolkit License: Apache-2.0 URL: https://www.openssl.org/ @@ -90,6 +90,7 @@ Patch9000: add-FIPS_mode_set-support.patch Patch9001: backport-CVE-2024-9143-Harden-BN_GF2m_poly2arr-against-misuse.patch Patch9002: Fix-build-error-for-ppc64le.patch Patch9003: add-support-for-sw_64-architecture.patch +Patch9004: Backport-Fix-CVE-2025-9230.patch BuildRequires: gcc gcc-c++ perl make lksctp-tools-devel coreutils util-linux zlib-devel Requires: coreutils %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -298,6 +299,9 @@ make test || : %ldconfig_scriptlets libs %changelog +* Wed Oct 1 2025 lizhipeng - 1:3.0.12-28 +- fix CVE-2025-9230 + * Thu Sep 18 2025 liuqingtao - 1:3.0.12-27 - Backport Implement Montgomery multiplication assembly optimization for RV64GC