Bug 1312219 (CVE-2016-0799) - CVE-2016-0799 OpenSSL: Fix memory issues in BIO_*printf functions
Summary: CVE-2016-0799 OpenSSL: Fix memory issues in BIO_*printf functions
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-0799
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1312856 1312857 1312858 1321841 1321842 1331569 1331865 1331866 1366994
Blocks: 1314768 1395463
TreeView+ depends on / blocked
 
Reported: 2016-02-26 06:44 UTC by Huzaifa S. Sidhpurwala
Modified: 2021-02-17 04:17 UTC (History)
37 users (show)

See Also:
Fixed In Version: openssl 1.0.1s, openssl 1.0.2g
Doc Type: Bug Fix
Doc Text:
Several flaws were found in the way BIO_*printf functions were implemented in OpenSSL. Applications which passed large amounts of untrusted data through these functions could crash or potentially execute code with the permissions of the user running such an application.
Clone Of:
Environment:
Last Closed: 2019-06-08 02:48:53 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0722 0 normal SHIPPED_LIVE Important: openssl security update 2016-05-09 13:28:24 UTC
Red Hat Product Errata RHSA-2016:0996 0 normal SHIPPED_LIVE Important: openssl security update 2016-05-10 08:18:56 UTC
Red Hat Product Errata RHSA-2016:2073 0 normal SHIPPED_LIVE Important: openssl security update 2016-10-18 11:08:06 UTC
Red Hat Product Errata RHSA-2016:2957 0 normal SHIPPED_LIVE Important: Red Hat JBoss Core Services Apache HTTP 2.4.23 Release 2016-12-16 03:11:19 UTC

Description Huzaifa S. Sidhpurwala 2016-02-26 06:44:51 UTC
As per Upstream advisory:

The internal |fmtstr| function used in processing a "%s" format string in the
BIO_*printf functions could overflow while calculating the length of a string
and cause an OOB read when printing very long strings.

Additionally the internal |doapr_outch| function can attempt to write to an OOB
memory location (at an offset from the NULL pointer) in the event of a memory
allocation failure. In 1.0.2 and below this could be caused where the size of a
buffer to be allocated is greater than INT_MAX. E.g. this could be in processing
a very long "%s" format string. Memory leaks can also occur.

These issues will only occur on certain platforms where sizeof(size_t) >
sizeof(int). E.g. many 64 bit systems. The first issue may mask the second issue
dependent on compiler behaviour. These problems could enable attacks where large
amounts of untrusted data is passed to the BIO_*printf functions. If
applications use these functions in this way then they could be vulnerable.
OpenSSL itself uses these functions when printing out human-readable dumps of
ASN.1 data. Therefore applications that print this data could be vulnerable if
the data is from untrusted sources. OpenSSL command line applications could also
be vulnerable where they print out ASN.1 data, or if untrusted data is passed as
command line arguments.

Libssl is not considered directly vulnerable. Additionally certificates etc
received via remote connections via libssl are also unlikely to be able to
trigger these issues because of message size limits enforced within libssl.

This issue affects OpenSSL versions 1.0.2 and 1.0.1.

OpenSSL 1.0.2 users should upgrade to 1.0.2g
OpenSSL 1.0.1 users should upgrade to 1.0.1s

This issue was reported to OpenSSL on February 23rd by Guido Vranken.  The fix was developed by Matt Caswell of the OpenSSL development team.

Comment 2 Martin Prpič 2016-02-29 12:02:22 UTC
Created openssl101e tracking bugs for this issue:

Affects: epel-5 [bug 1312858]

Comment 3 Martin Prpič 2016-02-29 12:02:28 UTC
Created openssl tracking bugs for this issue:

Affects: fedora-all [bug 1312856]

Comment 4 Martin Prpič 2016-02-29 12:02:34 UTC
Created mingw-openssl tracking bugs for this issue:

Affects: fedora-all [bug 1312857]

Comment 5 Martin Prpič 2016-02-29 12:33:10 UTC
Acknowledgments:

Name: the OpenSSL project
Upstream: Guido Vranken

Comment 6 Fedora Update System 2016-03-03 20:22:27 UTC
openssl-1.0.2g-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Huzaifa S. Sidhpurwala 2016-03-10 08:51:56 UTC
Statement:

The original issue fixed by OpenSSL upstream contains two distinct fixes. The first one is a format string flaw in the internal fmtstr functions, which may result in a OOB read flaw when printing very large string. This issue was assigned CVE-2016-0799

The second issue relates to the internal doapr_outch function of OpenSSL. It can result in an OOB write, or cause memory leaks. This issue has been assigned CVE-2016-2842 by MITRE as is now tracked as https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-2842

Comment 8 Fedora Update System 2016-03-13 09:51:42 UTC
openssl-1.0.1k-14.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 errata-xmlrpc 2016-05-09 09:28:36 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 16 errata-xmlrpc 2016-05-10 04:20:10 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

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

Comment 19 jkeilson 2016-05-16 15:42:40 UTC
There appears to be a problem with the source RPM for RHEL6. It looks like something is wrong with one of the certs used in the tests.

Comment 23 Tomas Mraz 2016-05-17 14:12:46 UTC
(In reply to jkeilson from comment #19)
> There appears to be a problem with the source RPM for RHEL6. It looks like
> something is wrong with one of the certs used in the tests.

Unfortunately the certs used for the tests expired. If you want to rebuild the source you have to artificially manipulate the date on the machine used to the rebuild or disable the tests.

The certs will be updated in future openssl erratum.

Comment 25 Fedora Update System 2016-05-27 23:16:22 UTC
openssl101e-1.0.1e-8.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.

Comment 27 errata-xmlrpc 2016-10-18 07:08:27 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.7 Extended Update Support

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

Comment 28 errata-xmlrpc 2016-12-15 22:16:24 UTC
This issue has been addressed in the following products:



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


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