Go to file
Matt Caswell 3f3582139f Fix encrypt overflow
An overflow can occur in the EVP_EncryptUpdate function. If an attacker is
able to supply very large amounts of input data after a previous call to
EVP_EncryptUpdate with a partial block then a length check can overflow
resulting in a heap corruption.

Following an analysis of all OpenSSL internal usage of the
EVP_EncryptUpdate function all usage is one of two forms.

The first form is like this:
EVP_EncryptInit()
EVP_EncryptUpdate()

i.e. where the EVP_EncryptUpdate() call is known to be the first called
function after an EVP_EncryptInit(), and therefore that specific call
must be safe.

The second form is where the length passed to EVP_EncryptUpdate() can be
seen from the code to be some small value and therefore there is no
possibility of an overflow.

Since all instances are one of these two forms, I believe that there can
be no overflows in internal code due to this problem.

It should be noted that EVP_DecryptUpdate() can call EVP_EncryptUpdate()
in certain code paths. Also EVP_CipherUpdate() is a synonym for
EVP_EncryptUpdate(). Therefore I have checked all instances of these
calls too, and came to the same conclusion, i.e. there are no instances
in internal usage where an overflow could occur.

This could still represent a security issue for end user code that calls
this function directly.

CVE-2016-2106

Issue reported by Guido Vranken.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-05-03 08:57:06 +01:00
apps Don't use an uninitialised variable in srp application 2016-04-29 16:47:41 +01:00
Configurations Remove personal configs from version control 2016-05-02 20:19:41 +02:00
crypto Fix encrypt overflow 2016-05-03 08:57:06 +01:00
demos Remove --classic build entirely 2016-04-20 16:04:56 +02:00
doc GH875: Document -no_check_time 2016-05-02 17:03:55 -04:00
engines Remove obsolete defined(__INTEL__) condition. 2016-05-02 12:35:01 +02:00
external/perl Copyright consolidation; .pm and Configure 2016-04-20 10:40:05 -04:00
include Secure memory fixes 2016-05-02 12:58:03 -04:00
ms Copyright consolidation: perl files 2016-04-20 09:45:40 -04:00
ssl Remove confusing comment. 2016-05-02 16:55:14 -04:00
test Secure memory fixes 2016-05-02 12:58:03 -04:00
tools Remove --classic build entirely 2016-04-20 16:04:56 +02:00
util Handle multi-line "written by/for" comments. 2016-05-02 08:27:39 -04:00
VMS Copyright consolidation: perl files 2016-04-20 09:45:40 -04:00
.gitattributes *.der files are binary. 2016-04-26 13:45:20 +01:00
.gitignore Add apps/tsget and test/ssltest_old to .gitignore 2016-04-06 16:33:10 +02:00
.travis-create-release.sh Remove the -n tar flag from osx dist creation 2016-03-08 20:21:26 +01:00
.travis.yml Travis: _srcdist, not _srcdir 2016-04-20 18:39:01 +02:00
ACKNOWLEDGEMENTS
appveyor.yml Update Travis and Appveyor for change to shared by default 2016-04-14 22:23:12 +01:00
AUTHORS Copyright consolidation: perl files 2016-04-20 09:45:40 -04:00
build.info Build system: VC-WIN64I fixups. 2016-03-29 09:48:25 +02:00
CHANGES Document the addition of OPENSSL_LOCAL_CONFIG_DIR 2016-05-02 20:19:41 +02:00
config Add Haiku support. 2016-04-14 13:49:42 -04:00
config.com Harmonize the option processing in 'config' and 'config.com' 2016-03-10 14:20:50 +01:00
Configure Add the possibility for local build file templates 2016-05-02 20:19:41 +02:00
CONTRIBUTING
e_os.h Include winsock2.h even if compiling no-sock 2016-04-20 14:52:46 +01:00
FAQ
INSTALL Remove the never-functional no-sct 2016-04-26 08:32:10 -04:00
INSTALL.DJGPP
INSTALL.WCE
LICENSE
Makefile.shared Add Haiku support. 2016-04-14 13:49:42 -04:00
NEWS Make many X509_xxx types opaque. 2016-04-15 13:21:43 -04:00
NOTES.VMS Force argv to be an array of long pointers on VMS 2016-04-01 16:23:35 +02:00
NOTES.WIN Remove mk1mf documentation 2016-03-21 11:02:00 +01:00
openssl.spec
README Prepare for 1.1.0-pre6-dev 2016-04-19 15:58:45 +01:00
README.ECC
README.ENGINE
README.FIPS
README.PERL

 OpenSSL 1.1.0-pre6-dev

 Copyright (c) 1998-2016 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 cryptographic 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 (with platform specific naming):
     Provides the client and server-side implementations for SSLv3 and TLS.

 libcrypto (with platform specific naming):
     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, Windows, OpenVMS
        INSTALL.DJGPP   DOS platform with DJGPP
        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.