cookies: getlist() now holds deep copies of all cookies

Previously it only held references to them, which was reckless as the
thread lock was released so the cookies could get modified by other
handles that share the same cookie jar over the share interface.

CVE-2016-8623

Bug: https://curl.haxx.se/docs/adv_20161102I.html
Reported-by: Cure53
This commit is contained in:
Daniel Stenberg 2016-10-04 23:26:13 +02:00
parent fba28277ca
commit c5be3d7267
3 changed files with 43 additions and 24 deletions

View file

@ -2384,7 +2384,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
}
co = co->next; /* next cookie please */
}
Curl_cookie_freelist(store, FALSE); /* free the cookie list */
Curl_cookie_freelist(store);
}
if(addcookies && !result) {
if(!count)