]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_multi_cleanup: clear connection pointer for easy handles
authorDaniel Stenberg <daniel@haxx.se>
Sat, 30 Jul 2016 23:09:04 +0000 (01:09 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 2 Aug 2016 22:34:27 +0000 (00:34 +0200)
CVE-2016-5421
Bug: https://curl.haxx.se/docs/adv_20160803C.html
Reported-by: Marcelo Echeverria and Fernando Muñoz
lib/multi.c

index 9ee352353383c27aa4f62766fe6556c877c84b18..8bb93660de62d19f48304e35be760038cc74bf9d 100644 (file)
@@ -2157,6 +2157,8 @@ static void close_all_connections(struct Curl_multi *multi)
     conn->data = multi->closure_handle;
 
     sigpipe_ignore(conn->data, &pipe_st);
+    conn->data->easy_conn = NULL; /* clear the easy handle's connection
+                                     pointer */
     /* This will remove the connection from the cache */
     (void)Curl_disconnect(conn, FALSE);
     sigpipe_restore(&pipe_st);