Related Vulnerabilities: CVE-2016-8622  

The URL percent-encoding decode function in libcurl is called curl_easy_unescape. Internally, even if this function would be made to allocate a unscape destination buffer larger than 2GB, it would return that new length in a signed 32 bit integer variable, thus the length would get either just truncated or both truncated and turned negative. That could then lead to libcurl writing outside of its heap based buffer. This can be triggered by a user on a 64bit system if the user can send in a custom (very large) URL to a libcurl using program.

Severity High

Remote Yes

Type Arbitrary code execution

Description

The URL percent-encoding decode function in libcurl is called curl_easy_unescape. Internally, even if this function would be made to allocate a unscape destination buffer larger than 2GB, it would return that new length in a signed 32 bit integer variable, thus the length would get either just truncated or both truncated and turned negative. That could then lead to libcurl writing outside of its heap based buffer.

This can be triggered by a user on a 64bit system if the user can send in a custom (very large) URL to a libcurl using program.

AVG-65 libcurl-gnutls 7.50.3-1 7.51.0-1 High Fixed

AVG-62 libcurl-compat 7.50.3-1 7.51.0-1 High Fixed

AVG-60 curl 7.50.3-1 7.51.0-1 High Fixed

03 Nov 2016 ASA-201611-9 AVG-65 libcurl-gnutls High multiple issues

03 Nov 2016 ASA-201611-8 AVG-62 libcurl-compat High multiple issues

03 Nov 2016 ASA-201611-7 AVG-60 curl High multiple issues

https://curl.haxx.se/docs/adv_20161102H.html