diff --git a/backport-CVE-2025-9230.patch b/backport-CVE-2025-9230.patch new file mode 100644 index 0000000000000000000000000000000000000000..500180b56f2b9480626c61b2b815c32705598c62 --- /dev/null +++ b/backport-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/compat-openssl11.spec b/compat-openssl11.spec index 69b91544eb256475bd7ffc54833e3db651cb9bbd..3cd0e62ebc780d407caad7e23e1e2d9850820cfa 100644 --- a/compat-openssl11.spec +++ b/compat-openssl11.spec @@ -1,7 +1,7 @@ %define soversion 1.1 Name: compat-openssl11 Version: 1.1.1m -Release: 13 +Release: 14 Epoch: 1 Summary: Cryptography and SSL/TLS Toolkit License: OpenSSL and SSLeay @@ -142,6 +142,7 @@ Patch131: backport-CVE-2024-5535-Fix-SSL_select_next_proto-and-add-ALPN.patch Patch132: backport-CVE-2024-5535-Add-a-test-for-ALPN-and-NPN.patch Patch133: backport-CVE-2024-9143-Harden-BN_GF2m_poly2arr-against-misuse.patch Patch134: backport-CVE-2024-13176-Fix-timing-side-channel.patch +Patch135: backport-CVE-2025-9230.patch BuildRequires: gcc perl make lksctp-tools-devel coreutils util-linux zlib-devel @@ -268,6 +269,9 @@ make test || : %ldconfig_scriptlets libs %changelog +* Mon Oct 27 2025 jinlun - 1:1.1.1m-14 +- fix CVE-2025-9230 + * Mon Mar 10 2025 hugel - 1:1.1.1m-13 - fix CVE-2024-13176