TLS/SSL and crypto library
Find a file
Matt Caswell a801bf2638 Fix memory issues in BIO_*printf functions
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.

CVE-2016-0799

Issue reported by Guido Vranken.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit 578b956fe7)
2016-02-25 22:48:17 +00:00
apps CVE-2016-0798: avoid memory leak in SRP 2016-02-25 15:44:21 +01:00
bugs Run util/openssl-format-source -v -c . 2015-01-22 09:38:39 +00:00
certs
crypto Fix memory issues in BIO_*printf functions 2016-02-25 22:48:17 +00:00
demos Fix more URLs mangled by reformat 2015-12-19 20:40:39 +00:00
doc Always generate DH keys for ephemeral DH cipher suites 2016-01-28 10:27:55 +00:00
engines Remove the "eay" c-file-style indicators 2015-12-18 13:13:31 +01:00
MacOS Run util/openssl-format-source -v -c . 2015-01-22 09:38:39 +00:00
ms ms/uplink-x86.pl: make it work. 2016-02-10 12:57:29 +01:00
Netware
os2
shlib
ssl Better SSLv2 cipher-suite enforcement 2016-01-28 17:06:38 +00:00
test Remove the "eay" c-file-style indicators 2015-12-18 13:13:31 +01:00
times
tools RT4044: Remove .cvsignore files. 2015-09-15 12:00:18 -04:00
util CVE-2016-0798: avoid memory leak in SRP 2016-02-25 15:44:21 +01:00
VMS Teach mkshared.com to have a look for disabled algorithms in opensslconf.h 2011-10-30 11:40:56 +00:00
.gitignore Ignore .dir-locals.el 2015-09-01 01:19:52 +02:00
.travis-create-release.sh Adapt the OS X build to use the OS X tar 2015-12-08 21:06:34 +01:00
.travis.yml Adapt the OS X build to use the OS X tar 2015-12-08 21:06:34 +01:00
ACKNOWLEDGMENTS Refer to website for acknowledgements. 2015-12-08 16:08:20 -05:00
appveyor.yml Add initial AppVeyor configuration 2015-11-21 20:15:54 +01:00
CHANGES CVE-2016-0798: avoid memory leak in SRP 2016-02-25 15:44:21 +01:00
CHANGES.SSLeay
config config: fix executable format detection on latest FreeBSD. 2013-07-01 00:00:20 +02:00
Configure Fix BSD -rpath parameter 2016-01-19 20:59:31 +01:00
CONTRIBUTING Clarify the preferred way of creating patch files 2015-11-02 14:34:40 +00:00
e_os.h e_os.h: limit _MSC_VER trickery to older compilers. 2015-12-03 13:24:42 +01:00
e_os2.h Add the macro OPENSSL_SYS_WIN64 2015-06-02 18:05:31 +02:00
FAQ Move FAQ to the web. 2015-08-16 19:04:03 -04:00
INSTALL RT4202: Update rt URL's. 2015-12-28 16:41:28 -05:00
install.com Apply all the changes submitted by Steven M. Schweda <sms@antinode.info> 2011-03-19 09:47:47 +00:00
INSTALL.DJGPP
INSTALL.MacOS
INSTALL.NW
INSTALL.OS2
INSTALL.VMS Change INSTALL.VMS to reflect the changes done on the build and 2011-03-19 09:48:15 +00:00
INSTALL.W32 FAQ/README: we are now using Git instead of CVS 2013-02-11 11:29:05 +01:00
INSTALL.W64
INSTALL.WCE
LICENSE Update license year range to 2016 2016-01-19 10:24:52 -05:00
Makefile.org TARFILE wasn't correctly set 2016-01-28 17:06:38 +00:00
Makefile.shared Makefile.shared: fix brown-bag typo in link_o.darwin [from HEAD]. 2010-08-21 11:37:17 +00:00
makevms.com Define CFLAGS as cflags on VMS as well 2015-01-14 00:16:21 +01:00
NEWS Prepare for 1.0.1s-dev 2016-01-28 17:06:38 +00:00
openssl.doxy
openssl.spec Prepare for 1.0.1s-dev 2016-01-28 17:06:38 +00:00
PROBLEMS ./Configure: libcrypto.a can grow to many GB on Solaris 10, because of ar bug 2012-08-13 16:18:59 +00:00
README Prepare for 1.0.1s-dev 2016-01-28 17:06:38 +00:00
README.ASN1
README.ENGINE
TABLE Housekeeping 'make TABLE' update. 2015-05-26 21:55:57 +02:00

 OpenSSL 1.0.1s-dev

 Copyright (c) 1998-2015 The OpenSSL Project
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 All rights reserved.

 DESCRIPTION
 -----------

 The OpenSSL Project is a collaborative effort to develop a robust,
 commercial-grade, fully featured, and Open Source toolkit implementing the
 Secure Sockets Layer (SSLv3) and Transport Layer Security (TLS) protocols as
 well as a full-strength general purpose cryptograpic library. The project is
 managed by a worldwide community of volunteers that use the Internet to
 communicate, plan, and develop the OpenSSL toolkit and its related
 documentation.

 OpenSSL is descended from the SSLeay library developed by Eric A. Young
 and Tim J. Hudson.  The OpenSSL toolkit is licensed under a dual-license (the
 OpenSSL license plus the SSLeay license), which means that you are free to
 get and use it for commercial and non-commercial purposes as long as you
 fulfill the conditions of both licenses.

 OVERVIEW
 --------

 The OpenSSL toolkit includes:

 libssl.a:
     Provides the client and server-side implementations for SSLv3 and TLS.

 libcrypto.a:
     Provides general cryptographic and X.509 support needed by SSL/TLS but
     not logically part of it.

 openssl:
     A command line tool that can be used for:
        Creation of key parameters
        Creation of X.509 certificates, CSRs and CRLs
        Calculation of message digests
        Encryption and decryption
        SSL/TLS client and server tests
        Handling of S/MIME signed or encrypted mail
        And more...

 INSTALLATION
 ------------

 See the appropriate file:
        INSTALL         Linux, Unix, etc.
        INSTALL.DJGPP   DOS platform with DJGPP
        INSTALL.NW      Netware
        INSTALL.OS2     OS/2
        INSTALL.VMS     VMS
        INSTALL.W32     Windows (32bit)
        INSTALL.W64     Windows (64bit)
        INSTALL.WCE     Windows CE

 SUPPORT
 -------

 See the OpenSSL website www.openssl.org for details on how to obtain
 commercial technical support.

 If you have any problems with OpenSSL then please take the following steps
 first:

    - Download the current snapshot from ftp://ftp.openssl.org/snapshot/
      to see if the problem has already been addressed
    - Remove ASM versions of libraries
    - Remove compiler optimisation flags

 If you wish to report a bug then please include the following information in
 any bug report:

    - On Unix systems:
        Self-test report generated by 'make report'
    - On other systems:
        OpenSSL version: output of 'openssl version -a'
        OS Name, Version, Hardware platform
        Compiler Details (name, version)
    - Application Details (name, version)
    - Problem Description (steps that will reproduce the problem, if known)
    - Stack Traceback (if the application dumps core)

 Email the report to:

    rt@openssl.org

 In order to avoid spam, this is a moderated mailing list, and it might
 take a day for the ticket to show up.  (We also scan posts to make sure
 that security disclosures aren't publically posted by mistake.) Mail
 to this address is recorded in the public RT (request tracker) database
 (see https://www.openssl.org/community/index.html#bugs for details) and
 also forwarded the public openssl-dev mailing list.  Confidential mail
 may be sent to openssl-security@openssl.org (PGP key available from the
 key servers).

 Please do NOT use this for general assistance or support queries.
 Just because something doesn't work the way you expect does not mean it
 is necessarily a bug in OpenSSL.

 You can also make GitHub pull requests. If you do this, please also send
 mail to rt@openssl.org with a link to the PR so that we can more easily
 keep track of it.

 HOW TO CONTRIBUTE TO OpenSSL
 ----------------------------

 See CONTRIBUTING

 LEGALITIES
 ----------

 A number of nations, in particular the U.S., restrict the use or export
 of cryptography. If you are potentially subject to such restrictions
 you should seek competent professional legal advice before attempting to
 develop or distribute cryptographic code.