equal
deleted
inserted
replaced
|
1 From ccb7d79b62c8b15a6be446f9c9fd3767c01eb5b6 Mon Sep 17 00:00:00 2001 |
|
2 From: Daniel Stenberg <[email protected]> |
|
3 Date: Sun, 31 Jul 2016 01:09:04 +0200 |
|
4 Subject: [PATCH] curl_multi_cleanup: clear connection pointer for easy handles |
|
5 MIME-Version: 1.0 |
|
6 Content-Type: text/plain; charset=UTF-8 |
|
7 Content-Transfer-Encoding: 8bit |
|
8 |
|
9 CVE-2016-5421 |
|
10 Bug: https://curl.haxx.se/docs/adv_20160803C.html |
|
11 Reported-by: Marcelo Echeverria and Fernando Muñoz |
|
12 --- |
|
13 lib/multi.c | 2 ++ |
|
14 1 file changed, 2 insertions(+) |
|
15 |
|
16 --- lib/multi.c |
|
17 +++ lib/multi.c |
|
18 @@ -2155,10 +2155,12 @@ static void close_all_connections(struct Curl_multi *multi) |
|
19 while(conn) { |
|
20 SIGPIPE_VARIABLE(pipe_st); |
|
21 conn->data = multi->closure_handle; |
|
22 |
|
23 sigpipe_ignore(conn->data, &pipe_st); |
|
24 + conn->data->easy_conn = NULL; /* clear the easy handle's connection |
|
25 + pointer */ |
|
26 /* This will remove the connection from the cache */ |
|
27 (void)Curl_disconnect(conn, FALSE); |
|
28 sigpipe_restore(&pipe_st); |
|
29 |
|
30 conn = Curl_conncache_find_first_connection(&multi->conn_cache); |
|
31 -- |
|
32 2.8.1 |
|
33 |