CVE-2015-3145
The sanitize_cookie_path function in cURL and libcurl 7.31.0 through 7.41.0 does not properly calculate an index, which allows remote attackers to cause a denial of service (out-of-bounds write and crash) or possibly have other unspecified impact via a cookie path containing only a double-quote character.
02 / AFFECTED SOFTWARE
Affected packages
24 explicit affected versions
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
libcurl supports HTTP "cookies" as documented in RFC 6265. Together with each individual cookie there are several different properties, but for this vulnerability we focus on the associated "path" element. It tells information about for which path on a given host the cookie is valid. The internal libcurl function called `sanitize_cookie_path()` that cleans up the path element as given to it from a remote site or when read from a file, did not properly validate the input. If given a path that consisted of a single double-quote, libcurl would index a newly allocated memory area with index -1 and assign a zero to it, thus destroying heap memory it was not supposed to. 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. Applications have to explicitly enable cookie parsing in libcurl for this problem to trigger, and if not enabled libcurl does not hit this problem.
The sanitize_cookie_path function in cURL and libcurl 7.31.0 through 7.41.0 does not properly calculate an index, which allows remote attackers to cause a denial of service (out-of-bounds write and crash) or possibly have other unspecified impact via a cookie path containing only a double-quote character.
05 / REFERENCES
Further evidence
- http://advisories.mageia.org/MGASA-2015-0179.html
- http://curl.haxx.se/docs/adv_20150422C.html
- http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10743
- http://lists.apple.com/archives/security-announce/2015/Aug/msg00001.html
- http://lists.fedoraproject.org/pipermail/package-announce/2015-April/155957.html
- http://lists.fedoraproject.org/pipermail/package-announce/2015-April/156250.html
- http://lists.fedoraproject.org/pipermail/package-announce/2015-May/156945.html
- http://lists.fedoraproject.org/pipermail/package-announce/2015-May/157017.html
- http://lists.fedoraproject.org/pipermail/package-announce/2015-May/157188.html
- http://lists.opensuse.org/opensuse-updates/2015-04/msg00057.html
- http://www.debian.org/security/2015/dsa-3232
- http://www.mandriva.com/security/advisories?name=MDVSA-2015:219
- http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html
- http://www.oracle.com/technetwork/topics/security/bulletinjan2016-2867206.html
- http://www.securityfocus.com/bid/74303
- http://www.securitytracker.com/id/1032232
- http://www.ubuntu.com/usn/USN-2591-1
- https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05045763
- https://security.gentoo.org/glsa/201509-02
- https://support.apple.com/kb/HT205031