Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1039801 - (CVE-2013-6418) CVE-2013-6418 pywbem: TOCTOU vulnerability in certificate validation
CVE-2013-6418 pywbem: TOCTOU vulnerability in certificate validation
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20131217,repor...
: Security
Depends On: 1026891 1030983 1065357 1065358 1065359 1121049
Blocks: 1024277 1039805
  Show dependency treegraph
 
Reported: 2013-12-09 21:42 EST by Murray McAllister
Modified: 2015-01-21 04:27 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-20 12:48:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
final fix (12.11 KB, patch)
2014-01-16 18:53 EST, Murray McAllister
no flags Details | Diff

  None (edit)
Description Murray McAllister 2013-12-09 21:42:18 EST
Florian Weimer discovered a TOCTOU (time of check to time of use) vulnerability in the way PyWBEM, a Python library for making CIM (Common Information Model) operations over HTTP using the WBEM CIM-XML protocol, performed certificate validation. An attacker could use this flaw to perform man-in-the-middle attacks against applications that are using PyWBEM.

Acknowledgements:

This issue was discovered by Florian Weimer of the Red Hat Product Security Team.
Comment 1 Murray McAllister 2013-12-09 21:51:58 EST
In depth information from Florian:

I noticed this code in cim_http.py:

     124             try:
     125                 from OpenSSL import SSL
     126                 ctx = SSL.Context(SSL.SSLv3_METHOD)
     127                 ctx.set_verify(SSL.VERIFY_PEER, verify_callback)
     128                 # Add the key and certificate to the session
     129                 if cert_file is not None and key_file is not None:
     130                   ctx.use_certificate_file(cert_file)
     131                   ctx.use_privatekey_file(key_file)
     132                 s = SSL.Connection(ctx, socket.socket(socket.AF_INET,
     133 socket.SOCK_STREAM))
     134                 s.connect((host, port))
     135                 s.do_handshake()
     136                 s.shutdown()
     137                 s.close()
     138             except socket.error, arg:
     139                 raise Error("Socket error: %s" % (arg,))
     140             except socket.sslerror, arg:
     141                 raise Error("SSL error: %s" % (arg,))

…

     151         h = HTTPSConnection(host, port = port, key_file = key_file,
     152                                             cert_file = cert_file)

verify_callback is only used for the probing connection, it is not used for the actual server interaction.  This means pywbem has a time-of-check-time-of-use vulnerability and man-in-the-middle attacks on the second HTTPS connection are possible.
Comment 3 Murray McAllister 2013-12-18 21:29:13 EST
Public now via a Fedora build. Note that the fix there may not be the correct one. Refer to http://seclists.org/oss-sec/2013/q4/524 for further details.
Comment 4 Murray McAllister 2014-01-16 18:53:27 EST
Created attachment 851357 [details]
final fix

Final fix. This patch corrects CVE-2013-6418 (bug 1039801) and CVE-2013-6444 (bug 1044246)
Comment 5 Murray McAllister 2014-01-20 18:59:46 EST
(In reply to Murray McAllister from comment #4)
> Created attachment 851357 [details]
> final fix
> 
> Final fix. This patch corrects CVE-2013-6418 (bug 1039801) and CVE-2013-6444
> (bug 1044246)

Upstream commit:

http://sourceforge.net/p/pywbem/code/627/
Comment 6 Murray McAllister 2014-01-21 06:03:05 EST
> Upstream commit:
> 
> http://sourceforge.net/p/pywbem/code/627/

This one is also needed:

http://sourceforge.net/p/pywbem/code/622/
Comment 8 Stefan Cornelius 2014-02-14 08:20:16 EST
Created pywbem tracking bugs for this issue:

Affects: epel-5 [bug 1065357]
Comment 11 Vincent Danen 2015-01-20 12:48:00 EST
Statement:

Red Hat Product Security has rated this issue as having Moderate security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

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