Go to file
Matt Caswell 99ba9fd02f Fix BN_hex2bn/BN_dec2bn NULL ptr/heap corruption
In the BN_hex2bn function the number of hex digits is calculated using
an int value |i|. Later |bn_expand| is called with a value of |i * 4|.
For large values of |i| this can result in |bn_expand| not allocating any
memory because |i * 4| is negative. This leaves ret->d as NULL leading
to a subsequent NULL ptr deref. For very large values of |i|, the
calculation |i * 4| could be a positive value smaller than |i|. In this
case memory is allocated to ret->d, but it is insufficiently sized
leading to heap corruption. A similar issue exists in BN_dec2bn.

This could have security consequences if BN_hex2bn/BN_dec2bn is ever
called by user applications with very large untrusted hex/dec data. This is
anticipated to be a rare occurrence.

All OpenSSL internal usage of this function uses data that is not expected
to be untrusted, e.g. config file data or application command line
arguments. If user developed applications generate config file data based
on untrusted data then it is possible that this could also lead to security
consequences. This is also anticipated to be a rare.

Issue reported by Guido Vranken.

CVE-2016-0797

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-29 16:32:18 +00:00
apps Refactor the async wait fd logic 2016-02-29 12:58:44 +00:00
Configurations VMS - don't exit out of a MMS recipe 2016-02-28 09:31:46 +01:00
crypto Fix BN_hex2bn/BN_dec2bn NULL ptr/heap corruption 2016-02-29 16:32:18 +00:00
demos Finish 02f7114a7f 2016-02-17 17:04:47 -05:00
doc Clarify ASYNC_WAIT_CTX_clear_fd() docs 2016-02-29 12:58:44 +00:00
engines Refactor the async wait fd logic 2016-02-29 12:58:44 +00:00
external/perl Adjust transfer::Text::Template.pm for alternate directory name 2016-02-12 18:04:49 +01:00
include Refactor the async wait fd logic 2016-02-29 12:58:44 +00:00
ms ms/uplink-x86.pl: make it work. 2016-02-10 12:53:25 +01:00
Netware GH601: Various spelling fixes. 2016-02-05 15:25:50 -05:00
os2 Make a number of changes to the OS/2 build. Submitter's comment below. 2003-11-28 14:51:30 +00:00
ssl Refactor the async wait fd logic 2016-02-29 12:58:44 +00:00
test Fix use before init warnings in asynctest 2016-02-29 13:07:28 +00:00
tools Rename INSTALL_PREFIX to DESTDIR, remove option --install_prefix 2016-02-12 21:54:07 +01:00
util Refactor the async wait fd logic 2016-02-29 12:58:44 +00:00
VMS Clean away $config{no_shared} since we have $disabled{shared} 2016-02-22 16:36:58 +01:00
.gitignore Update .gitignore. 2016-02-12 21:49:34 +01:00
.travis-create-release.sh Configure first in travis create release 2016-01-26 08:26:27 +01:00
.travis.yml Don't build sanitizer builds with --debug 2016-02-26 18:35:08 +01:00
ACKNOWLEDGEMENTS Refer to website for acknowledgements. 2015-12-08 16:07:09 -05:00
appveyor.yml Add initial AppVeyor configuration 2015-11-21 18:06:31 +01:00
build.info Big rename fest of MingW shared libraries 2016-02-19 11:52:16 +01:00
CHANGES Add CHANGES entry for X25519 2016-02-28 22:54:54 +00:00
config Remove all -march= from configs 2016-02-23 00:47:52 +01:00
config.com Lowercase configuration arguments on VMS 2016-02-16 16:10:06 +01:00
Configure Remove last remains of old config strings 2016-02-27 21:32:24 +01:00
CONTRIBUTING Ask for tests in CONTRIBUTING 2016-01-25 17:12:57 -05:00
e_os.h Remove unused parameters from internal functions 2016-02-22 13:39:44 -05:00
FAQ Move FAQ to the web. 2015-08-16 19:02:29 -04:00
INSTALL Rename INSTALL_PREFIX to DESTDIR, remove option --install_prefix 2016-02-12 21:54:07 +01:00
INSTALL.DJGPP Refactor file writing - information on our use of Perl and Perl modules 2016-01-22 23:12:22 +01:00
INSTALL.NW misspellings fixes by https://github.com/vlajos/misspell_fixer 2013-09-05 21:39:42 +01:00
INSTALL.OS2 Add support for shared libraries with OS/2. 2002-07-17 13:27:43 +00:00
INSTALL.VMS unified build scheme: rewrite INSTALL.VMS 2016-02-10 14:36:32 +01:00
INSTALL.WCE Refactor file writing - information on our use of Perl and Perl modules 2016-01-22 23:12:22 +01:00
INSTALL.WIN Updates for auto init/deinit review comments 2016-02-09 15:12:02 +00:00
LICENSE Update license year range to 2016 2016-01-19 10:24:05 -05:00
Makefile.in Remove some old files. 2016-02-27 13:39:46 -05:00
Makefile.shared FreeBSD, at least, can restrict symbols in a shared library - so use the 2016-02-27 16:23:25 +00:00
NEWS unified build system: add CHANGES & NEWS 2016-02-10 14:41:43 +01:00
openssl.spec Rename INSTALL_PREFIX to DESTDIR, remove option --install_prefix 2016-02-12 21:54:07 +01:00
README Prepare for 1.1.0-pre4-dev 2016-02-15 19:37:42 +01:00
README.ECC Add NSA sublicense info. 2011-05-11 12:50:57 +00:00
README.ENGINE Remove Ubsec engine 2016-02-26 23:34:25 +00:00
README.FIPS Remove more (rest?) of FIPS build stuff. 2016-01-06 12:07:26 -05:00
README.PERL State the minimum Perl version that our scripts will work with 2016-02-11 22:11:48 +01:00

 OpenSSL 1.1.0-pre4-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.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.WIN     Windows
        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.