Bug 1359615 (CVE-2016-2180)

Summary: CVE-2016-2180 OpenSSL: OOB read in TS_OBJ_print_bio()
Product: [Other] Security Response Reporter: Huzaifa S. Sidhpurwala <huzaifas>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: apmukher, bbaranow, bmaxwell, cdewolf, csutherl, dandread, darran.lofthouse, dosoudil, erik-fedora, fnasser, gzaronik, huwang, jaeshin, jawilson, jclere, jshepherd, ktietz, lgao, marcandre.lureau, mbabacek, mturk, myarboro, pgier, psakar, pslavice, redhat-bugzilla, rjones, rnetuka, rsvoboda, sardella, tmraz, twalsh, vtunka, weli, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openssl 1.0.1u, openssl 1.0.2i Doc Type: If docs needed, set a value
Doc Text:
An out of bounds read flaw was found in the way OpenSSL formatted Public Key Infrastructure Time-Stamp Protocol data for printing. An attacker could possibly cause an application using OpenSSL to crash if it printed time stamp data from the attacker.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:56:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1359616, 1359617, 1359618, 1377623, 1377624, 1377625, 1377626    
Bug Blocks: 1356628, 1367347    

Description Huzaifa S. Sidhpurwala 2016-07-25 06:53:02 UTC
An OOB read flaw was found in the RFC 3161 Public Key Infrastructure Time-Stamp Protocol code of OpenSSL. An attacker could use this flaw to cause the openssl binary to crash when specially-crafted time-stamp file is parsed via the "openssl ts" command.

Upstream commit:

master: https://github.com/openssl/openssl/commit/0ed26acce328ec16a3aa635f1ca37365e8c7403a
1.0.1:  https://github.com/openssl/openssl/commit/6adf409c7432b90c06d9890787fe56c48f2a16e7

Comment 1 Huzaifa S. Sidhpurwala 2016-07-25 06:53:58 UTC
Created openssl101e tracking bugs for this issue:

Affects: epel-5 [bug 1359618]

Comment 2 Huzaifa S. Sidhpurwala 2016-07-25 06:54:12 UTC
Created openssl tracking bugs for this issue:

Affects: fedora-all [bug 1359616]

Comment 3 Huzaifa S. Sidhpurwala 2016-07-25 06:54:23 UTC
Created mingw-openssl tracking bugs for this issue:

Affects: fedora-all [bug 1359617]

Comment 4 Huzaifa S. Sidhpurwala 2016-08-08 08:54:30 UTC
Statement:

(none)

Comment 5 Tomas Hoger 2016-09-19 12:42:36 UTC
The affected functionality is not used by the SSL/TLS implementation in OpenSSL.  it is currently only used by the openssl command line tool, in its ts sub-command.  Other applications using the OpenSSL library may also use this functionality, but it does not seem to be used by any other application in Red Hat Enterprise Linux.

Comment 7 Tomas Hoger 2016-09-22 12:01:50 UTC
Covered now by OpenSSL upstream security advisory and fixed in versions 1.0.1u and 1.0.2i.


OOB read in TS_OBJ_print_bio() (CVE-2016-2180)
==============================================

Severity: Low

The function TS_OBJ_print_bio() misuses OBJ_obj2txt(): the return value is
the total length the OID text representation would use and not the amount
of data written. This will result in OOB reads when large OIDs are presented.

OpenSSL 1.0.2 users should upgrade to 1.0.2i
OpenSSL 1.0.1 users should upgrade to 1.0.1u

This issue was reported to OpenSSL on 21st July 2016 by Shi Lei (Gear Team,
Qihoo 360 Inc.). The fix was developed by Stephen Henson of the OpenSSL
development team.


External References:

https://www.openssl.org/news/secadv/20160922.txt

Comment 8 errata-xmlrpc 2016-09-27 13:53:36 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6
  Red Hat Enterprise Linux 7

Via RHSA-2016:1940 https://rhn.redhat.com/errata/RHSA-2016-1940.html