Bug 958638 (CVE-2013-2037) - CVE-2013-2037 python-httplib2: ssl cert incorrect error handling
Summary: CVE-2013-2037 python-httplib2: ssl cert incorrect error handling
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2013-2037
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 958640 958642 958643 958644 958649
Blocks: 958639
TreeView+ depends on / blocked
 
Reported: 2013-05-02 06:12 UTC by Kurt Seifried
Modified: 2021-02-17 07:45 UTC (History)
22 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-09-11 02:05:53 UTC
Embargoed:


Attachments (Terms of Use)

Description Kurt Seifried 2013-05-02 06:12:37 UTC
Reported by rpodoly..., Apr 23, 2013

What steps will reproduce the problem?
1. Make a request to an HTTPS server with a domain name not matching one that is specified in the corresponding SSL certificate.
2. Repeat the request once again.

Expected behavior: both requests fail with CertificateHostnameMismatch error.

Actual behavior: the first request fails with CertificateHostnameMismatch, but the second one succeeds.

The problem is caused by incorrect error handling in connect() method of HTTPSConnectionWithTimeout class. The created socket is closed in case of a general SSL error, but it's not closed in case of CertificateHostnameMismatchError (as ssl module doesn't provide hostname checking and it's done by httplib2 code). So when the second request is performed, connect() is not called, because the connection has already been created, and certificate hostname mismatch is not checked. 

Tested versions: the last commit of the default branch in hg repo; 0.7.2, 0.8.

External References:

http://code.google.com/p/httplib2/issues/detail?id=282
https://bugs.launchpad.net/httplib2/+bug/1175272

Comment 1 Kurt Seifried 2013-05-02 06:16:29 UTC
Created python-httplib2 tracking bugs for this issue

Affects: fedora-all [bug 958640]

Comment 2 Kurt Seifried 2013-05-02 06:20:56 UTC
Created python-httplib2 tracking bugs for this issue

Affects: epel-all [bug 958642]

Comment 3 Kurt Seifried 2013-05-02 06:21:44 UTC
Created python26-httplib2 tracking bugs for this issue

Affects: epel-5 [bug 958643]

Comment 6 Kurt Seifried 2014-07-22 04:32:19 UTC
Statement:

This issue affects the versions of python-httplib2 as shipped with Red Hat Update Infrastructure 2.1. Hat Product Security has rated this issue as having Moderate security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 7 Fedora Update System 2015-04-21 18:26:50 UTC
python-httplib2-0.9-6.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.