There is a private function in libcurl called `fix_hostname()` that removes a trailing dot from the host name if there is one. The function is called after the host name has been extracted from the URL libcurl has been told to act on. If a URL is given with a zero-length host name, like in "http://:80" or just ":80", `fix_hostname()` will index the host name pointer with a -1 offset (as it blindly assumes a non-zero length) and both read and assign that address. At best, this gets unnoticed but can also lead to a crash or worse. We have not researched further what kind of malicious actions that potentially this could be used for. We are not aware of any exploits of this flaw. Affected versions: from libcurl 7.37.0 to and including 7.41.0 Acknowledgements: Red Hat would like to thank Daniel Stenberg (curl upstream) for reporting this issue. Upstream acknowledges Hanno Böck as the original reporter.
Created attachment 1016321 [details] Suggested patch
External References: http://curl.haxx.se/docs/adv_20150422D.html
Created curl tracking bugs for this issue: Affects: fedora-all [bug 1214181]
Created mingw-curl tracking bugs for this issue: Affects: fedora-all [bug 1214795] Affects: epel-7 [bug 1214796]
Statement: Not vulnerable. This issue does not affect the version of curl as shipped with Red Hat Enterprise Linux 5, 6 and 7.
Upstream commit: https://github.com/bagder/curl/commit/0583e87ada7a3cfb10904ae4ab61b339582c5bd3
curl-7.40.0-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
curl-7.37.0-14.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.