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 2a81c8e19a325aa9bdfe2b9907a4aaa448ac7a3f..7e2604d546bdbd37ca775b48669e4ca26110aa62 100644 --- a/openssl.spec +++ b/openssl.spec @@ -2,7 +2,7 @@ Name: openssl Epoch: 1 Version: 1.1.1f -Release: 39 +Release: 40 Summary: Cryptography and SSL/TLS Toolkit License: OpenSSL and SSLeay and GPLv2+ URL: https://www.openssl.org/ @@ -149,6 +149,7 @@ Patch138: backport-Check-password-length-only-when-verify-is-enabled.patch Patch139: backport-ticket_lifetime_hint-may-exceed-1-week-in-TLSv1.3.patch Patch140: backport-CVE-2024-9143-Harden-BN_GF2m_poly2arr-against-misuse.patch Patch141: backport-CVE-2024-13176-Fix-timing-side-channel.patch +Patch142: Backport-Fix-CVE-2025-9230.patch BuildRequires: gcc make lksctp-tools-devel coreutils util-linux zlib-devel @@ -332,6 +333,9 @@ make test || : %{_pkgdocdir}/html/ %changelog +* Wed Oct 1 2025 lizhipeng - 1:1.1.1f-40 +- fix CVE-2025-9230 + * Wed Feb 5 2025 jinlun - 1:1.1.1f-39 - fix CVE-2024-13176