Skip to content

Commit 5a0635d

Browse files
[AutoPR- Security] Patch curl for CVE-2025-10148 [MEDIUM] (microsoft#14674)
1 parent 1549547 commit 5a0635d

File tree

6 files changed

+77
-15
lines changed

6 files changed

+77
-15
lines changed

SPECS/curl/CVE-2025-10148.patch

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
From e15280dfa9de549e64daf7336a0bd4c94e038bfe Mon Sep 17 00:00:00 2001
2+
From: AllSpark <allspark@microsoft.com>
3+
Date: Sat, 13 Sep 2025 06:19:10 +0000
4+
Subject: [PATCH] ws: get a new mask for each new outgoing frame
5+
6+
Signed-off-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
7+
Upstream-reference: AI Backport of https://github.com/curl/curl/commit/84db7a9eae8468c0445b15aa806fa.patch
8+
---
9+
lib/ws.c | 26 ++++++++++++++++++--------
10+
1 file changed, 18 insertions(+), 8 deletions(-)
11+
12+
diff --git a/lib/ws.c b/lib/ws.c
13+
index 6ccf9e6..467af41 100644
14+
--- a/lib/ws.c
15+
+++ b/lib/ws.c
16+
@@ -615,6 +615,23 @@ static ssize_t ws_enc_write_head(struct Curl_easy *data,
17+
enc->payload_remain = enc->payload_len = payload_len;
18+
ws_enc_info(enc, data, "sending");
19+
20+
+ /* 4 bytes random */
21+
+ {
22+
+ CURLcode result = Curl_rand(data, (unsigned char *)&enc->mask,
23+
+ sizeof(enc->mask));
24+
+ if(result) {
25+
+ *err = result;
26+
+ return -1;
27+
+ }
28+
+ }
29+
+
30+
+#ifdef DEBUGBUILD
31+
+ if(getenv("CURL_WS_FORCE_ZERO_MASK"))
32+
+ /* force the bit mask to 0x00000000, effectively disabling masking */
33+
+ memset(&enc->mask, 0, sizeof(enc->mask));
34+
+#endif
35+
+
36+
+
37+
/* add 4 bytes mask */
38+
memcpy(&head[hlen], &enc->mask, 4);
39+
hlen += 4;
40+
@@ -805,14 +822,7 @@ CURLcode Curl_ws_accept(struct Curl_easy *data,
41+
subprotocol not requested by the client), the client MUST Fail
42+
the WebSocket Connection. */
43+
44+
- /* 4 bytes random */
45+
-
46+
- result = Curl_rand(data, (unsigned char *)&ws->enc.mask,
47+
- sizeof(ws->enc.mask));
48+
- if(result)
49+
- return result;
50+
- infof(data, "Received 101, switch to WebSocket; mask %02x%02x%02x%02x",
51+
- ws->enc.mask[0], ws->enc.mask[1], ws->enc.mask[2], ws->enc.mask[3]);
52+
+ infof(data, "[WS] Received 101, switch to WebSocket");
53+
54+
/* Install our client writer that decodes WS frames payload */
55+
result = Curl_cwriter_create(&ws_dec_writer, data, &ws_cw_decode,
56+
--
57+
2.45.4
58+

SPECS/curl/curl.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: An URL retrieval utility and library
22
Name: curl
33
Version: 8.8.0
4-
Release: 6%{?dist}
4+
Release: 7%{?dist}
55
License: curl
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -13,6 +13,7 @@ Patch1: CVE-2024-8096.patch
1313
Patch2: CVE-2024-11053.patch
1414
Patch3: CVE-2024-9681.patch
1515
Patch4: CVE-2025-0167.patch
16+
Patch5: CVE-2025-10148.patch
1617
BuildRequires: krb5-devel
1718
BuildRequires: libssh2-devel
1819
BuildRequires: nghttp2-devel
@@ -90,6 +91,9 @@ find %{buildroot} -type f -name "*.la" -delete -print
9091
%{_libdir}/libcurl.so.*
9192

9293
%changelog
94+
* Sat Sep 13 2025 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 8.8.0-7
95+
- Patch for CVE-2025-10148
96+
9397
* Fri Mar 28 2025 Sreeniavsulu Malavathula <v-smalavathu@microsoft.com> - 8.8.0-6
9498
- Fix CVE-2025-0167 with an upstream patch
9599

toolkit/resources/manifests/package/pkggen_core_aarch64.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ libssh2-1.9.0-4.cm2.aarch64.rpm
190190
libssh2-devel-1.9.0-4.cm2.aarch64.rpm
191191
krb5-1.19.4-4.cm2.aarch64.rpm
192192
nghttp2-1.57.0-2.cm2.aarch64.rpm
193-
curl-8.8.0-6.cm2.aarch64.rpm
194-
curl-devel-8.8.0-6.cm2.aarch64.rpm
195-
curl-libs-8.8.0-6.cm2.aarch64.rpm
193+
curl-8.8.0-7.cm2.aarch64.rpm
194+
curl-devel-8.8.0-7.cm2.aarch64.rpm
195+
curl-libs-8.8.0-7.cm2.aarch64.rpm
196196
createrepo_c-0.17.5-1.cm2.aarch64.rpm
197197
libxml2-2.10.4-8.cm2.aarch64.rpm
198198
libxml2-devel-2.10.4-8.cm2.aarch64.rpm

toolkit/resources/manifests/package/pkggen_core_x86_64.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ libssh2-1.9.0-4.cm2.x86_64.rpm
190190
libssh2-devel-1.9.0-4.cm2.x86_64.rpm
191191
krb5-1.19.4-4.cm2.x86_64.rpm
192192
nghttp2-1.57.0-2.cm2.x86_64.rpm
193-
curl-8.8.0-6.cm2.x86_64.rpm
194-
curl-devel-8.8.0-6.cm2.x86_64.rpm
195-
curl-libs-8.8.0-6.cm2.x86_64.rpm
193+
curl-8.8.0-7.cm2.x86_64.rpm
194+
curl-devel-8.8.0-7.cm2.x86_64.rpm
195+
curl-libs-8.8.0-7.cm2.x86_64.rpm
196196
createrepo_c-0.17.5-1.cm2.x86_64.rpm
197197
libxml2-2.10.4-8.cm2.x86_64.rpm
198198
libxml2-devel-2.10.4-8.cm2.x86_64.rpm

toolkit/resources/manifests/package/toolchain_aarch64.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ cracklib-lang-2.9.7-5.cm2.aarch64.rpm
4646
createrepo_c-0.17.5-1.cm2.aarch64.rpm
4747
createrepo_c-debuginfo-0.17.5-1.cm2.aarch64.rpm
4848
createrepo_c-devel-0.17.5-1.cm2.aarch64.rpm
49-
curl-8.8.0-6.cm2.aarch64.rpm
50-
curl-debuginfo-8.8.0-6.cm2.aarch64.rpm
51-
curl-devel-8.8.0-6.cm2.aarch64.rpm
52-
curl-libs-8.8.0-6.cm2.aarch64.rpm
49+
curl-8.8.0-7.cm2.aarch64.rpm
50+
curl-debuginfo-8.8.0-7.cm2.aarch64.rpm
51+
curl-devel-8.8.0-7.cm2.aarch64.rpm
52+
curl-libs-8.8.0-7.cm2.aarch64.rpm
5353
Cython-debuginfo-0.29.33-2.cm2.aarch64.rpm
5454
debugedit-5.0-2.cm2.aarch64.rpm
5555
debugedit-debuginfo-5.0-2.cm2.aarch64.rpm

toolkit/resources/manifests/package/toolchain_x86_64.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ createrepo_c-debuginfo-0.17.5-1.cm2.x86_64.rpm
4949
createrepo_c-devel-0.17.5-1.cm2.x86_64.rpm
5050
cross-binutils-common-2.37-17.cm2.noarch.rpm
5151
cross-gcc-common-11.2.0-8.cm2.noarch.rpm
52-
curl-8.8.0-6.cm2.x86_64.rpm
53-
curl-debuginfo-8.8.0-6.cm2.x86_64.rpm
54-
curl-devel-8.8.0-6.cm2.x86_64.rpm
55-
curl-libs-8.8.0-6.cm2.x86_64.rpm
52+
curl-8.8.0-7.cm2.x86_64.rpm
53+
curl-debuginfo-8.8.0-7.cm2.x86_64.rpm
54+
curl-devel-8.8.0-7.cm2.x86_64.rpm
55+
curl-libs-8.8.0-7.cm2.x86_64.rpm
5656
Cython-debuginfo-0.29.33-2.cm2.x86_64.rpm
5757
debugedit-5.0-2.cm2.x86_64.rpm
5858
debugedit-debuginfo-5.0-2.cm2.x86_64.rpm

0 commit comments

Comments
 (0)