Skip to content

Commit 61022e4

Browse files
[MEDIUM] patch cmake for CVE-2025-4947 (microsoft#13959)
1 parent df4e13a commit 61022e4

File tree

4 files changed

+49
-5
lines changed

4 files changed

+49
-5
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/cmake.spec

Lines changed: 5 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,7 @@ 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
2930
BuildRequires: bzip2
3031
BuildRequires: bzip2-devel
3132
BuildRequires: curl
@@ -105,6 +106,9 @@ bin/ctest --force-new-ctest-process --rerun-failed --output-on-failure
105106
%{_libdir}/rpm/macros.d/macros.cmake
106107

107108
%changelog
109+
* Tue Jun 03 2025 Durga Jagadeesh Palli <v-dpalli@microsoft.com> - 3.30.3-7
110+
- Patch CVE-2025-4947
111+
108112
* Mon Apr 07 2025 Kavya Sree Kaitepalli <kkaitepalli@microsoft.com> - 3.30.3-6
109113
- Backport patch to fix CVE-2024-48615
110114

toolkit/resources/manifests/package/toolchain_aarch64.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ check-debuginfo-0.15.2-1.azl3.aarch64.rpm
5151
chkconfig-1.25-1.azl3.aarch64.rpm
5252
chkconfig-debuginfo-1.25-1.azl3.aarch64.rpm
5353
chkconfig-lang-1.25-1.azl3.aarch64.rpm
54-
cmake-3.30.3-6.azl3.aarch64.rpm
55-
cmake-debuginfo-3.30.3-6.azl3.aarch64.rpm
54+
cmake-3.30.3-7.azl3.aarch64.rpm
55+
cmake-debuginfo-3.30.3-7.azl3.aarch64.rpm
5656
coreutils-9.4-6.azl3.aarch64.rpm
5757
coreutils-debuginfo-9.4-6.azl3.aarch64.rpm
5858
coreutils-lang-9.4-6.azl3.aarch64.rpm

toolkit/resources/manifests/package/toolchain_x86_64.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ check-debuginfo-0.15.2-1.azl3.x86_64.rpm
5454
chkconfig-1.25-1.azl3.x86_64.rpm
5555
chkconfig-debuginfo-1.25-1.azl3.x86_64.rpm
5656
chkconfig-lang-1.25-1.azl3.x86_64.rpm
57-
cmake-3.30.3-6.azl3.x86_64.rpm
58-
cmake-debuginfo-3.30.3-6.azl3.x86_64.rpm
57+
cmake-3.30.3-7.azl3.x86_64.rpm
58+
cmake-debuginfo-3.30.3-7.azl3.x86_64.rpm
5959
coreutils-9.4-6.azl3.x86_64.rpm
6060
coreutils-debuginfo-9.4-6.azl3.x86_64.rpm
6161
coreutils-lang-9.4-6.azl3.x86_64.rpm

0 commit comments

Comments
 (0)