Skip to content

Commit 2cd81ee

Browse files
[MEDIUM] patch cmake for CVE-2025-4947.patch
1 parent 2ce2257 commit 2cd81ee

File tree

3 files changed

+77
-1
lines changed

3 files changed

+77
-1
lines changed

SPECS/cmake/CVE-2025-4947.patch

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From f0b4659205da774d835434cfbf40425c25a0c813 Mon Sep 17 00:00:00 2001
2+
From: dj_palli <v-dpalli@microsoft.com>
3+
Date: Wed, 4 Jun 2025 03:37:55 +0000
4+
Subject: [PATCH] Address CVE-2025-4947.patch
5+
6+
Upstream patch URL: https://github.com/curl/curl/commit/a85f1df4803bbd272905c9e7125
7+
8+
---
9+
Utilities/cmcurl/lib/vquic/vquic-tls.c | 14 ++++++--------
10+
1 file changed, 6 insertions(+), 8 deletions(-)
11+
12+
diff --git a/Utilities/cmcurl/lib/vquic/vquic-tls.c b/Utilities/cmcurl/lib/vquic/vquic-tls.c
13+
index aca18b45..61cb6c51 100644
14+
--- a/Utilities/cmcurl/lib/vquic/vquic-tls.c
15+
+++ b/Utilities/cmcurl/lib/vquic/vquic-tls.c
16+
@@ -324,15 +324,13 @@ CURLcode Curl_vquic_tls_verify_peer(struct curl_tls_ctx *ctx,
17+
#elif defined(USE_WOLFSSL)
18+
(void)data;
19+
if(conn_config->verifyhost) {
20+
- if(peer->sni) {
21+
- WOLFSSL_X509* cert = wolfSSL_get_peer_certificate(ctx->ssl);
22+
- if(wolfSSL_X509_check_host(cert, peer->sni, strlen(peer->sni), 0, NULL)
23+
- == WOLFSSL_FAILURE) {
24+
- result = CURLE_PEER_FAILED_VERIFICATION;
25+
- }
26+
- wolfSSL_X509_free(cert);
27+
+ char *snihost = peer->sni ? peer->sni : peer->hostname;
28+
+ WOLFSSL_X509* cert = wolfSSL_get_peer_certificate(ctx->wssl.ssl);
29+
+ if(wolfSSL_X509_check_host(cert, snihost, strlen(snihost), 0, NULL)
30+
+ == WOLFSSL_FAILURE) {
31+
+ result = CURLE_PEER_FAILED_VERIFICATION;
32+
}
33+
-
34+
+ wolfSSL_X509_free(cert);
35+
}
36+
#endif
37+
return result;
38+
--
39+
2.45.2
40+

SPECS/cmake/CVE-2025-5025.patch

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From ec29fc8cabaae710f1b245ac3d1574338cb3af11 Mon Sep 17 00:00:00 2001
2+
From: dj_palli <v-dpalli@microsoft.com>
3+
Date: Wed, 4 Jun 2025 09:40:58 +0000
4+
Subject: [PATCH] Address CVE-2025-5025
5+
6+
Upstream patch URL: https://github.com/curl/curl/commit/e1f65937a96a451292e92313396#diff-309f36382abf06bac78e6a359c639da0cde7bea7b3a00aaff0000103d6695c0c
7+
8+
---
9+
Utilities/cmcurl/lib/vquic/vquic-tls.c | 3 +++
10+
1 file changed, 3 insertions(+)
11+
12+
diff --git a/Utilities/cmcurl/lib/vquic/vquic-tls.c b/Utilities/cmcurl/lib/vquic/vquic-tls.c
13+
index 61cb6c51..aed9b953 100644
14+
--- a/Utilities/cmcurl/lib/vquic/vquic-tls.c
15+
+++ b/Utilities/cmcurl/lib/vquic/vquic-tls.c
16+
@@ -331,7 +331,10 @@ CURLcode Curl_vquic_tls_verify_peer(struct curl_tls_ctx *ctx,
17+
result = CURLE_PEER_FAILED_VERIFICATION;
18+
}
19+
wolfSSL_X509_free(cert);
20+
+
21+
}
22+
+ if(!result)
23+
+ result = Curl_wssl_verify_pinned(cf, data, &ctx->wssl);
24+
#endif
25+
return result;
26+
}
27+
--
28+
2.45.2
29+

SPECS/cmake/cmake.spec

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Summary: Cmake
33
Name: cmake
44
Version: 3.30.3
5-
Release: 6%{?dist}
5+
Release: 7%{?dist}
66
License: BSD AND LGPLv2+
77
Vendor: Microsoft Corporation
88
Distribution: Azure Linux
@@ -26,6 +26,10 @@ Patch7: CVE-2023-44487.patch
2626
# required to determine what upstream patches are included.
2727
Patch8: CVE-2023-35945.patch
2828
Patch9: CVE-2024-48615.patch
29+
Patch10: CVE-2025-4947.patch
30+
31+
32+
2933
BuildRequires: bzip2
3034
BuildRequires: bzip2-devel
3135
BuildRequires: curl
@@ -105,6 +109,9 @@ bin/ctest --force-new-ctest-process --rerun-failed --output-on-failure
105109
%{_libdir}/rpm/macros.d/macros.cmake
106110

107111
%changelog
112+
* Wed Jun 03 2025 Durga Jagadeesh Palli <v-dpalli@microsoft.com> - 3.30.3-7
113+
- Patch CVE-2025-4947
114+
108115
* Mon Apr 07 2025 Kavya Sree Kaitepalli <kkaitepalli@microsoft.com> - 3.30.3-6
109116
- Backport patch to fix CVE-2024-48615
110117

0 commit comments

Comments
 (0)