curl-library
[SECURITY ADVISORY 3/4] libcurl not verifying certs for TLS to IP address / Darwinssl
Date: Wed, 26 Mar 2014 08:05:15 +0100 (CET)
libcurl not verifying certs for TLS to IP address / Darwinssl
=============================================================
Project cURL Security Advisory, March 26th 2014
http://curl.haxx.se/docs/security.html
1. VULNERABILITY
When asked to do a TLS connection (HTTPS, FTPS, IMAPS, etc) to a URL
specified with an IP address instead of a name, libcurl would wrongly not
verify the server's name in the certificate. The signature (whether it was
signed by a trusted CA) and validity (whether the date was within the
certificate's lifetime and it was not revoked) verifications were still
performed.
This is a problem in libcurl built to use the SecureTransport/Darwinssl
backend. SecureTransport/Darwinssl is the TLS library present and used on
Mac OS X and iOS.
Only users on Mac OS X or iOS can be affected by this. And only if libcurl
was built to use the native TLS backend library.
This problem was initially used as an example of the Apple SSL bug that hit
the news in late February 2014[1] but that was not correct.
The Common Vulnerabilities and Exposures (CVE) project has assigned the name
CVE-2014-1263 to this issue.
2. AFFECTED VERSIONS
This flaw has existed ever since libcurl started to support the
SecureTransport/Darwinssl backend.
Affected versions: from libcurl 7.27.0 to and including 7.35.0
Not affected versions: libcurl >= 7.36.0
libcurl is used by many applications, but not always advertised as such!
3. THE SOLUTION
libcurl 7.36.0 makes sure that all TLS using requests verify the host name
even if specified as an IP address in the URL.
A patch for this problem is available at:
https://github.com/bagder/curl/commit/afc6e5004fabee
The fix was committed to the public source code repository because the full
security impact wasn't properly realized until after the fact.
4. RECOMMENDATIONS
We suggest you take one of the following actions immediately, in order of
preference:
A - Upgrade to curl and libcurl 7.36.0
B - Apply the patch and rebuild libcurl
C - Rebuild libcurl to use another TLS backend
5. TIME LINE
It was discovered by the curl project during late February 2014.
libcurl 7.36.0 was released on March 26th 2014, coordinated with the
publication of this advisory.
6. CREDITS
This was indirectly reported by numerous people and it was also clarified by
Adam Langley that it wasn't the problem Apple themselves fixed. Roland Moriz
is credited in Apple's security note[2].
David Ryskalczyk wrote the patch.
Nick Zitzmann helped coordinate the bug fix.
Apple claims to have fixed this problem in an update of their own. That was
done independently from and without informing the curl project.
[1] = https://www.imperialviolet.org/2014/02/22/applebug.html
[2] = http://support.apple.com/kb/HT6150
Thanks a lot!
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-03-26