Skip to content

Commit 13f5368

Browse files
[AutoPR- Security] Patch curl for CVE-2025-10148 [MEDIUM] (microsoft#14653)
1 parent 55530bd commit 13f5368

File tree

6 files changed

+76
-15
lines changed

6 files changed

+76
-15
lines changed

SPECS/curl/CVE-2025-10148.patch

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

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.11.1
4-
Release: 3%{?dist}
4+
Release: 4%{?dist}
55
License: curl
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
@@ -11,6 +11,7 @@ Source0: https://curl.haxx.se/download/%{name}-%{version}.tar.gz
1111
Patch0: CVE-2025-0665.patch
1212
Patch1: CVE-2025-0167.patch
1313
Patch2: CVE-2025-0725.patch
14+
Patch3: CVE-2025-10148.patch
1415
BuildRequires: cmake
1516
BuildRequires: krb5-devel
1617
BuildRequires: libnghttp2-devel
@@ -101,6 +102,9 @@ find %{buildroot} -type f -name "*.la" -delete -print
101102
%{_libdir}/libcurl.so.*
102103

103104
%changelog
105+
* Thu Sep 11 2025 Azure Linux Security Servicing Account <[email protected]> - 8.11.1-4
106+
- Patch for CVE-2025-10148
107+
104108
* Thu Feb 13 2025 Kanishk Bansal <[email protected]> - 8.11.1-3
105109
- Fix CVE-2025-0665, CVE-2025-0167, CVE-2025-0725
106110

toolkit/resources/manifests/package/pkggen_core_aarch64.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ krb5-1.21.3-2.azl3.aarch64.rpm
199199
krb5-devel-1.21.3-2.azl3.aarch64.rpm
200200
nghttp2-1.61.0-2.azl3.aarch64.rpm
201201
nghttp2-devel-1.61.0-2.azl3.aarch64.rpm
202-
curl-8.11.1-3.azl3.aarch64.rpm
203-
curl-devel-8.11.1-3.azl3.aarch64.rpm
204-
curl-libs-8.11.1-3.azl3.aarch64.rpm
202+
curl-8.11.1-4.azl3.aarch64.rpm
203+
curl-devel-8.11.1-4.azl3.aarch64.rpm
204+
curl-libs-8.11.1-4.azl3.aarch64.rpm
205205
createrepo_c-1.0.3-1.azl3.aarch64.rpm
206206
libxml2-2.11.5-6.azl3.aarch64.rpm
207207
libxml2-devel-2.11.5-6.azl3.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
@@ -199,9 +199,9 @@ krb5-1.21.3-2.azl3.x86_64.rpm
199199
krb5-devel-1.21.3-2.azl3.x86_64.rpm
200200
nghttp2-1.61.0-2.azl3.x86_64.rpm
201201
nghttp2-devel-1.61.0-2.azl3.x86_64.rpm
202-
curl-8.11.1-3.azl3.x86_64.rpm
203-
curl-devel-8.11.1-3.azl3.x86_64.rpm
204-
curl-libs-8.11.1-3.azl3.x86_64.rpm
202+
curl-8.11.1-4.azl3.x86_64.rpm
203+
curl-devel-8.11.1-4.azl3.x86_64.rpm
204+
curl-libs-8.11.1-4.azl3.x86_64.rpm
205205
createrepo_c-1.0.3-1.azl3.x86_64.rpm
206206
libxml2-2.11.5-6.azl3.x86_64.rpm
207207
libxml2-devel-2.11.5-6.azl3.x86_64.rpm

toolkit/resources/manifests/package/toolchain_aarch64.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ cracklib-lang-2.9.11-1.azl3.aarch64.rpm
6767
createrepo_c-1.0.3-1.azl3.aarch64.rpm
6868
createrepo_c-debuginfo-1.0.3-1.azl3.aarch64.rpm
6969
createrepo_c-devel-1.0.3-1.azl3.aarch64.rpm
70-
curl-8.11.1-3.azl3.aarch64.rpm
71-
curl-debuginfo-8.11.1-3.azl3.aarch64.rpm
72-
curl-devel-8.11.1-3.azl3.aarch64.rpm
73-
curl-libs-8.11.1-3.azl3.aarch64.rpm
70+
curl-8.11.1-4.azl3.aarch64.rpm
71+
curl-debuginfo-8.11.1-4.azl3.aarch64.rpm
72+
curl-devel-8.11.1-4.azl3.aarch64.rpm
73+
curl-libs-8.11.1-4.azl3.aarch64.rpm
7474
Cython-debuginfo-3.0.5-2.azl3.aarch64.rpm
7575
debugedit-5.0-2.azl3.aarch64.rpm
7676
debugedit-debuginfo-5.0-2.azl3.aarch64.rpm

toolkit/resources/manifests/package/toolchain_x86_64.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ createrepo_c-debuginfo-1.0.3-1.azl3.x86_64.rpm
7272
createrepo_c-devel-1.0.3-1.azl3.x86_64.rpm
7373
cross-binutils-common-2.41-8.azl3.noarch.rpm
7474
cross-gcc-common-13.2.0-7.azl3.noarch.rpm
75-
curl-8.11.1-3.azl3.x86_64.rpm
76-
curl-debuginfo-8.11.1-3.azl3.x86_64.rpm
77-
curl-devel-8.11.1-3.azl3.x86_64.rpm
78-
curl-libs-8.11.1-3.azl3.x86_64.rpm
75+
curl-8.11.1-4.azl3.x86_64.rpm
76+
curl-debuginfo-8.11.1-4.azl3.x86_64.rpm
77+
curl-devel-8.11.1-4.azl3.x86_64.rpm
78+
curl-libs-8.11.1-4.azl3.x86_64.rpm
7979
Cython-debuginfo-3.0.5-2.azl3.x86_64.rpm
8080
debugedit-5.0-2.azl3.x86_64.rpm
8181
debugedit-debuginfo-5.0-2.azl3.x86_64.rpm

0 commit comments

Comments
 (0)