summaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-07-31 01:09:04 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-08-03 00:34:27 +0200
commit75dc096e01ef1e21b6c57690d99371dedb2c0b80 (patch)
tree62d0fdee645d95fc3ca7a7885ce127fadc7ad55e /lib/multi.c
parent9cb1059f92286a6eb5d28c477fdd3f26aed1d554 (diff)
downloadgnurl-75dc096e01ef1e21b6c57690d99371dedb2c0b80.tar.gz
gnurl-75dc096e01ef1e21b6c57690d99371dedb2c0b80.tar.bz2
gnurl-75dc096e01ef1e21b6c57690d99371dedb2c0b80.zip
curl_multi_cleanup: clear connection pointer for easy handles
CVE-2016-5421 Bug: https://curl.haxx.se/docs/adv_20160803C.html Reported-by: Marcelo Echeverria and Fernando Muñoz
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 9ee352353..8bb93660d 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -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);