public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/curl] f43: Resolves: CVE-2026-9080 - UAF after pause in socket callback
@ 2026-08-27 15:01 Jan Macku
0 siblings, 0 replies; only message in thread
From: Jan Macku @ 2026-08-27 15:01 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/curl
Branch : f43
Commit : 6586ffeb97dd162987222ac103bb51136a38aa2e
Author : Jan Macku <jamacku@redhat.com>
Date : 2026-08-26T21:32:45+02:00
Stats : +97/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/curl/c/6586ffeb97dd162987222ac103bb51136a38aa2e?branch=f43
Log:
Resolves: CVE-2026-9080 - UAF after pause in socket callback
---
diff --git a/0018-curl-8.15.0-CVE-2026-9080.patch b/0018-curl-8.15.0-CVE-2026-9080.patch
new file mode 100644
index 0000000..f1cdd96
--- /dev/null
+++ b/0018-curl-8.15.0-CVE-2026-9080.patch
@@ -0,0 +1,90 @@
+From 78559f57f4591e43daefbc8982866699988f9575 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Tue, 26 May 2026 09:52:19 +0200
+Subject: [PATCH] multi: handle pause in multi socket callback
+
+The mev_sh_entry object might be removed if curl_easy_pause() is called
+from within the socket callback.
+
+Introduced a 'magic' struct field to to 'mev_sh_entry' to make it easier
+to programmatically detect/assert if the pointer is bad - in debug
+builds.
+
+Reported-by: Joshua Rogers
+Closes #21748
+
+(cherry picked from commit 5ab34cba42e4ee4282fe8bab43f311d51b9bf9bd)
+---
+ lib/multi_ev.c | 21 +++++++++++++++++++--
+ 1 file changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/lib/multi_ev.c b/lib/multi_ev.c
+index 0b4c472849..6cd3a4ee4a 100644
+--- a/lib/multi_ev.c
++++ b/lib/multi_ev.c
+@@ -53,6 +53,8 @@ static void mev_in_callback(struct Curl_multi *multi, bool value)
+
+ #define CURL_MEV_CONN_HASH_SIZE 3
+
++#define SH_ENTRY_MAGIC 0x570091d
++
+ /* Information about a socket for which we inform the libcurl application
+ * what to supervise (CURL_POLL_IN/CURL_POLL_OUT/CURL_POLL_REMOVE)
+ */
+@@ -64,6 +66,9 @@ struct mev_sh_entry {
+ * libcurl application to watch out for */
+ unsigned int readers; /* this many transfers want to read */
+ unsigned int writers; /* this many transfers want to write */
++#ifdef DEBUGBUILD
++ unsigned int magic;
++#endif
+ };
+
+ static size_t mev_sh_entry_hash(void *key, size_t key_length, size_t slots_num)
+@@ -85,6 +90,9 @@ static void mev_sh_entry_dtor(void *freethis)
+ {
+ struct mev_sh_entry *entry = (struct mev_sh_entry *)freethis;
+ Curl_uint_spbset_destroy(&entry->xfers);
++#ifdef DEBUGBUILD
++ entry->magic = 0;
++#endif
+ free(entry);
+ }
+
+@@ -123,7 +131,9 @@ mev_sh_entry_add(struct Curl_hash *sh, curl_socket_t s)
+ mev_sh_entry_dtor(check);
+ return NULL; /* major failure */
+ }
+-
++#ifdef DEBUGBUILD
++ check->magic = SH_ENTRY_MAGIC;
++#endif
+ return check; /* things are good in sockhash land */
+ }
+
+@@ -233,6 +243,7 @@ static CURLMcode mev_sh_entry_update(struct Curl_multi *multi,
+
+ /* we should only be called when the callback exists */
+ DEBUGASSERT(multi->socket_cb);
++ DEBUGASSERT(entry->magic == SH_ENTRY_MAGIC);
+ if(!multi->socket_cb)
+ return CURLM_OK;
+
+@@ -287,7 +298,13 @@ static CURLMcode mev_sh_entry_update(struct Curl_multi *multi,
+ multi->dead = TRUE;
+ return CURLM_ABORTED_BY_CALLBACK;
+ }
+- entry->action = (unsigned int)comboaction;
++ /* curl_easy_pause() is documented as callable from any callback; it
++ * re-enters mev_assess() which may free this 'entry'. Re-fetch. */
++ entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
++ if(entry) {
++ DEBUGASSERT(entry->magic == SH_ENTRY_MAGIC);
++ entry->action = (unsigned int)comboaction;
++ }
+ return CURLM_OK;
+ }
+
+--
+2.55.0
+
diff --git a/curl.spec b/curl.spec
index ee6fdd9..0441901 100644
--- a/curl.spec
+++ b/curl.spec
@@ -67,6 +67,9 @@ Patch016: 0016-curl-8.15.0-CVE-2026-8927.patch
# fix exposing HTTP/3 early data (CVE-2026-9545)
Patch017: 0017-curl-8.15.0-CVE-2026-9545.patch
+# fix UAF after pause in socket callback (CVE-2026-9080)
+Patch018: 0018-curl-8.15.0-CVE-2026-9080.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -271,6 +274,9 @@ be installed.
# <https://github.com/bagder/curl/commit/21e82bd6#commitcomment-12226582>
printf "1801\n" >>tests/data/DISABLED
+# # disable test 1701 -- nghttpx rejects h2c upgrade with 400 Bad Request
+printf "1701\n" >>tests/data/DISABLED
+
# test3026: avoid pthread_create() failure due to resource exhaustion on i386
%ifarch %{ix86}
sed -e 's|NUM_THREADS 1000$|NUM_THREADS 256|' \
@@ -472,6 +478,7 @@ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/wcurl.1*
- fix SASL double-free (CVE-2026-8925)
- fix env-set cross-proxy Digest auth state leak (CVE-2026-8927)
- fix exposing HTTP/3 early data (CVE-2026-9545)
+- fix UAF after pause in socket callback (CVE-2026-9080)
* Mon Aug 03 2026 Jan Macku <jamacku@redhat.com> - 8.15.0-8
- fix cross-proxy Digest auth state leak (CVE-2026-7168)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-27 15:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-27 15:01 [rpms/curl] f43: Resolves: CVE-2026-9080 - UAF after pause in socket callback Jan Macku
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox