Bug 7641 - CVE-2014-9365 python: failure to validate certificates in the HTTP client with TLS (PEP 476)
Summary: CVE-2014-9365 python: failure to validate certificates in the HTTP client wit...
Status: RESOLVED WONTFIX
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium+ normal
Target Milestone: 1.7.4
Assignee: Armin Kuster
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-04-22 10:05 UTC by Sona Sarmadi
Modified: 2016-10-03 19:41 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sona Sarmadi 2015-04-22 10:05:26 UTC
"""
When Python's standard library HTTP clients (httplib, urllib, urllib2, xmlrpclib) are used to access resources with HTTPS, by default the certificate is not checked against any trust store, nor is the hostname in the certificate checked against the requested host. It was possible to configure a trust root to be checked against, however there were no faculties for hostname checking.

This made MITM attacks against the HTTP clients trivial, and violated RFC 2818 (http://tools.ietf.org/html/rfc2818#section-3).

Python 2.7.9 has been issued to resolve this issue. It is also resolved in 3.4.3, which has not yet been released.
"""

References:
http://seclists.org/oss-sec/2014/q4/1022
https://lwn.net/Articles/611243/
https://www.python.org/dev/peps/pep-0476/
http://bugs.python.org/issue22417
http://bugs.python.org/issue22366
http://bugs.python.org/issue22417

This change depends on another PEP 466 "Network Security Enhancements for Python 2.7.x":

https://www.python.org/dev/peps/pep-0466/

The PEP 466 covers a set of not directly related enhancement, one of them being update of the ssl module.  The update adds few features relevant here - SSLContext support, which defines connections parameters and verification done during handshake, name checking functions (previously packages for python 2.7 via a separate python-backports-ssl_match_hostname package), and functionality for loading system trust store.

Upstream bug for the ssl module part of PEP 466:

http://bugs.python.org/issue21308
Comment 1 Sona Sarmadi 2015-04-22 12:02:02 UTC
Statement:

This issue affects dizzy and daisy branches which are using Python 2.7.3 version.
This issue does not affect master branch which uses Python 2.7.9  version.
Comment 2 Alejandro Hernandez 2015-05-20 19:41:26 UTC
This also affected Python 3.3, but it has been fixed here:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=79a2fc2f6c84265baefcdb6bb74c4da3b8b600d4
Comment 3 Ross Burton 2016-07-13 22:52:49 UTC
Armin, do you plan to resolve this for the dizzy branch, or should we close it as wontfix on the grounds that dizzy is past support now?
Comment 4 Armin Kuster 2016-10-03 19:41:18 UTC
I am not planning on fixing this issue. Marking as wontfix.

There are several Yocto member's who provide commercial support and may be able to provide assistances on this issue.

https://www.yoctoproject.org/ecosystem/member-organizations.