public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/curl] curl-v8.23.0-3: http3: apply upstream patches for valgrind issues
@ 2026-11-03 12:39 Jan Macku
0 siblings, 0 replies; only message in thread
From: Jan Macku @ 2026-11-03 12:39 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/curl
Branch : curl-v8.23.0-3
Commit : 7d91f53d81f6aa9e760638a1e4dceb82a5b839b7
Author : Jan Macku <jamacku@redhat.com>
Date : 2025-12-04T10:44:25+01:00
Stats : +74/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/curl/c/7d91f53d81f6aa9e760638a1e4dceb82a5b839b7?branch=curl-v8.23.0-3
Log:
http3: apply upstream patches for valgrind issues
Related: #2408809
---
diff --git a/0001-curl-8.17.0-vquic-do_sendmsg-full-init.patch b/0001-curl-8.17.0-vquic-do_sendmsg-full-init.patch
new file mode 100644
index 0000000..f41b79a
--- /dev/null
+++ b/0001-curl-8.17.0-vquic-do_sendmsg-full-init.patch
@@ -0,0 +1,34 @@
+From aa95d1ceda65e7aa20110a69742797d80009e7de Mon Sep 17 00:00:00 2001
+From: Stefan Eissing <stefan@eissing.org>
+Date: Thu, 27 Nov 2025 10:23:43 +0100
+Subject: [PATCH 1/2] vquic: do_sendmsg full init
+
+When passing a `msg_ctrl` to sendmsg() as part of GSO handling, zero the
+complete array. This fixes any false positives by valgrind that complain
+about uninitialised memory, even though the kernel only ever accesses
+the first two bytes.
+
+Reported-by: Aleksei Bavshin
+Fixes #19714
+Closes #19715
+
+(cherry picked from commit a9e7a027ed866b791c12a3c701dc40304f4e00cb)
+---
+ lib/vquic/vquic.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/vquic/vquic.c b/lib/vquic/vquic.c
+index 7533001ea..2e8d8e5cd 100644
+--- a/lib/vquic/vquic.c
++++ b/lib/vquic/vquic.c
+@@ -144,6 +144,7 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
+ if(pktlen > gsolen) {
+ /* Only set this, when we need it. macOS, for example,
+ * does not seem to like a msg_control of length 0. */
++ memset(msg_ctrl, 0, sizeof(msg_ctrl));
+ msg.msg_control = msg_ctrl;
+ assert(sizeof(msg_ctrl) >= CMSG_SPACE(sizeof(int)));
+ msg.msg_controllen = CMSG_SPACE(sizeof(int));
+--
+2.52.0
+
diff --git a/0002-curl-8.17.0-ngtcp2-openssl-fix-leak-of-session.patch b/0002-curl-8.17.0-ngtcp2-openssl-fix-leak-of-session.patch
new file mode 100644
index 0000000..4db6234
--- /dev/null
+++ b/0002-curl-8.17.0-ngtcp2-openssl-fix-leak-of-session.patch
@@ -0,0 +1,32 @@
+From a11ab7ad4ea0d97ac0d5af1e28b30b00c37c3c3c Mon Sep 17 00:00:00 2001
+From: Stefan Eissing <stefan@eissing.org>
+Date: Thu, 27 Nov 2025 12:11:39 +0100
+Subject: [PATCH 2/2] ngtcp2+openssl: fix leak of session
+
+Fix return value indicating to OpenSSL if reference to session is kept
+(it is not), so OpenSSL frees it.
+
+Reported-by: Aleksei Bavshin
+Fixes #19717
+Closes #19718
+
+(cherry picked from commit 9bb5c0578b39e5b086b6a9db5c6eb299a0fe1c5c)
+---
+ lib/vquic/curl_ngtcp2.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/lib/vquic/curl_ngtcp2.c b/lib/vquic/curl_ngtcp2.c
+index f72f6630f..069dcb67e 100644
+--- a/lib/vquic/curl_ngtcp2.c
++++ b/lib/vquic/curl_ngtcp2.c
+@@ -2262,7 +2262,6 @@ static int quic_ossl_new_session_cb(SSL *ssl, SSL_SESSION *ssl_sessionid)
+ #endif
+ Curl_ossl_add_session(cf, data, ctx->peer.scache_key, ssl_sessionid,
+ SSL_version(ssl), "h3", quic_tp, quic_tp_len);
+- return 1;
+ }
+ return 0;
+ }
+--
+2.52.0
+
diff --git a/curl.spec b/curl.spec
index ca173a3..a58a893 100644
--- a/curl.spec
+++ b/curl.spec
@@ -7,7 +7,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 8.17.0
-Release: 3%{?dist}
+Release: 4%{?dist}
License: curl
Source0: https://curl.se/download/%{name}-%{version_no_tilde}.tar.xz
Source1: https://curl.se/download/%{name}-%{version_no_tilde}.tar.xz.asc
@@ -16,6 +16,10 @@ Source1: https://curl.se/download/%{name}-%{version_no_tilde}.tar.xz.asc
# which points to the GPG key as of April 7th 2016 of https://daniel.haxx.se/mykey.asc
Source2: mykey.asc
+# Fix valgrind issues in HTTP/3
+Patch001: 0001-curl-8.17.0-vquic-do_sendmsg-full-init.patch
+Patch002: 0002-curl-8.17.0-ngtcp2-openssl-fix-leak-of-session.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -415,6 +419,9 @@ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/wcurl.1*
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu Dec 04 2025 Jan Macku <jamacku@redhat.com> - 8.17.0-4
+- apply upstream patches for valgrind issues in HTTP/3 (#2408809)
+
* Thu Nov 13 2025 Jan Macku <jamacku@redhat.com> - 8.17.0-3
- recommend wcurl package instead of bundled wcurl utility
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-03 12:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 12:39 [rpms/curl] curl-v8.23.0-3: http3: apply upstream patches for valgrind issues Jan Macku
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox