Go to file
Benjamin Kaduk b8a437ffa0 Fix out-of-bounds read in ctr_XOR
Looking at
http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf
we see that in the CTR_DRBG_Update() algorithm (internal page number 51),
the provided input data is (after truncation to seedlen) xor-d with the
key and V vector (of length keylen and blocklen respectively).  The comment
in ctr_XOR notes that xor-ing with 0 is the identity function, so we can
just ignore the case when the provided input is shorter than seedlen.

The code in ctr_XOR() then proceeds to xor the key with the input, up
to the amount of input present, and computes the remaining input that
could be used to xor with the V vector, before accessing a full 16-byte
stretch of the input vector and ignoring the calculated length.  The correct
behavior is to respect the supplied input length and only xor the
indicated number of bytes.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3971)
2017-07-20 12:12:36 -05:00
.github
apps Fix bogus use of BIO_sock_should_retry. 2017-07-17 15:28:20 +02:00
boringssl@2070f8ad91
Configurations VMS: When running a sub-MMS, make sure to give it the main MMS' qualifiers 2017-07-07 11:31:03 +02:00
crypto Fix out-of-bounds read in ctr_XOR 2017-07-20 12:12:36 -05:00
demos Demo style fixes and modernisation. 2017-07-13 07:34:40 +10:00
doc Add some performance notes about early data 2017-07-18 17:43:06 +01:00
engines
external/perl
fuzz
include typedef's for RAND_DRBG methods 2017-07-20 12:12:36 -05:00
krb5@b9ad6c4950
ms
os-dep
pyca-cryptography@139b25f2ba
ssl Remove session checks from SSL_clear() 2017-07-18 17:35:52 +01:00
test Remove trailing whitespace from drbgtest.c 2017-07-20 12:12:36 -05:00
tools
util Add DRBG random method 2017-07-19 03:25:16 -04:00
VMS
.gitattributes
.gitignore
.gitmodules
.travis-apt-pin.preferences
.travis-create-release.sh
.travis.yml Add echo for end of each build phase 2017-07-04 16:23:59 -04:00
ACKNOWLEDGEMENTS
appveyor.yml
AUTHORS
build.info
CHANGES Remove the possibility to disable the UI module entirely 2017-07-03 07:51:04 +02:00
config
config.com
Configure Remove the possibility to disable the UI module entirely 2017-07-03 07:51:04 +02:00
CONTRIBUTING
e_os.h
FAQ
INSTALL
LICENSE
Makefile.shared
NEWS
NOTES.DJGPP
NOTES.PERL
NOTES.UNIX
NOTES.VMS
NOTES.WIN
README
README.ECC
README.ENGINE
README.FIPS

 OpenSSL 1.1.1-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
 Transport Layer Security (TLS) protocols (including SSLv3) as well as a
 full-strength general purpose cryptographic library.

 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, ...
        NOTES.*         INSTALL addendums for different platforms

 SUPPORT
 -------

 See the OpenSSL website www.openssl.org for details on how to obtain
 commercial technical support. Free community support is available through the
 openssl-users email list (see
 https://www.openssl.org/community/mailinglists.html for further details).

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

    - Download the latest version from the repository
      to see if the problem has already been addressed
    - Configure with no-asm
    - Remove compiler optimisation flags

 If you wish to report a bug then please include the following information
 and create an issue on GitHub:

    - OpenSSL version: output of 'openssl version -a'
    - Any "Configure" options that you selected during compilation of the
      library if applicable (see INSTALL)
    - 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)

 Just because something doesn't work the way you expect does not mean it
 is necessarily a bug in OpenSSL. Use the openssl-users email list for this type
 of query.

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

 See CONTRIBUTING

 LEGALITIES
 ----------

 A number of nations 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.