TLS/SSL and crypto library
Find a file
Richard Levitte 4f29f3a29b asn1parse: avoid double free
|str| was used for multiple conflicting purposes.  When using
'-strictpem', it's used to uniquely hold a reference to the loaded
payload.  However, when using '-strparse', |str| was re-used to hold
the position from where to start parsing.

So when '-strparse' and '-strictpem' are were together, |str| ended up
pointing into data pointed at by |at|, and was yet being freed, with
the result that the payload it held a reference to became a memory
leak, and there was a double free conflict when both |str| and |at|
were being freed.

The situation is resolved by always having |buf| hold the pointer to
the file data, and always and only use |str| to hold the position to
start parsing from.  Now, we only need to free |buf| properly and not
|str|.

Fixes #8752

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/8753)
2019-04-18 19:20:55 +02:00
.github Remove markdown links from HTML comments in issue templates 2018-11-13 17:01:41 +01:00
apps asn1parse: avoid double free 2019-04-18 19:20:55 +02:00
boringssl@2070f8ad91 Update ossl_config.json for later BoringSSL commit 2017-03-14 12:12:13 +00:00
Configurations Don't use '-z defs' with Clang's sanitizers 2019-04-15 16:47:25 +02:00
crypto chacha/asm/chacha-armv8.pl: replace 3+1 code paths with 4+1. 2019-04-17 21:31:01 +02:00
demos Fix memory leaks in pkread.c demo file 2019-03-13 09:54:49 +00:00
doc Add documentation for the BIO_s_mem pecularities 2019-04-16 10:50:30 +01:00
engines Build cleanup: don't use SHARED_SOURCE with modules 2019-04-02 07:30:06 +02:00
external/perl Following the license change, modify the boilerplates in external/ 2018-12-06 15:39:02 +01:00
fuzz Support SM2 certificate verification 2019-03-13 15:29:39 +08:00
include Providers: for the digest_final operation, pass a output buffer size 2019-04-15 10:46:09 +02:00
krb5@b9ad6c4950 [extended tests] Enable krb5 tests in Travis 2017-04-18 19:10:25 +02:00
ms Windows: Call TerminateProcess, not ExitProcess 2019-02-22 21:03:45 +01:00
os-dep Move Haiku configuration to separate config file to denote 2016-05-19 22:39:52 +02:00
providers providers/common/digests/sha2.c: forward declare all dispatched functions 2019-04-15 10:46:09 +02:00
pyca-cryptography@09403100de Update the pyca-cryptography submodule 2018-09-10 12:04:03 +01:00
ssl Fix typos 2019-04-10 12:00:20 +02:00
test Add SSHKDF in evp_kdf_test 2019-04-18 12:38:47 +01:00
tools Following the license change, modify the boilerplates in util/, tools/ 2018-12-06 14:17:23 +01:00
util Add a check for history section location to find-doc-nits 2019-04-12 15:50:02 +02:00
VMS Following the license change, modify the boilerplates in last few 2018-12-06 15:40:33 +01:00
.gitattributes Don't export the submodules 'boringssl', 'krb5' and 'pyca-cryptography' 2018-11-24 18:40:31 +01:00
.gitignore Add test for the provider configuration module 2019-04-03 11:42:48 +02:00
.gitmodules [extended tests] Enable krb5 tests in Travis 2017-04-18 19:10:25 +02:00
.travis-apt-pin.preferences Fix travis clang-3.9 builds 2017-06-23 17:57:02 +01:00
.travis-create-release.sh Remove all 'make dist' artifacts 2018-11-23 12:40:32 +01:00
.travis.yml Update to xenial 2019-03-16 15:53:39 +01:00
ACKNOWLEDGEMENTS Refer to website for acknowledgements. 2015-12-08 16:07:09 -05:00
appveyor.yml CI config: no need to make both install and install_docs 2018-05-14 17:51:48 +02:00
AUTHORS Update AUTHORS list, add commentary 2018-07-08 20:32:04 -04:00
build.info Add a skeleton default provider 2019-03-21 09:23:38 +00:00
CHANGES Deprecate AES_ige_encrypt() and AES_bi_ige_encrypt() 2019-04-12 14:22:41 +01:00
config Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
config.com Following the license change, modify the boilerplates in last few 2018-12-06 15:40:33 +01:00
Configure Add a legacy provider and put MD2 in it 2019-04-09 10:24:43 +01:00
CONTRIBUTING Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
e_os.h Limit DEVRANDOM_WAIT to linux 2019-03-07 22:36:31 +01:00
FAQ Move FAQ to the web. 2015-08-16 19:02:29 -04:00
INSTALL Add a legacy provider and put MD2 in it 2019-04-09 10:24:43 +01:00
LICENSE Change license to the Apache License v2.0 2018-12-06 13:27:18 +01:00
NEWS Remove heartbeats completely 2019-03-29 13:50:59 +01:00
NOTES.ANDROID Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
NOTES.DJGPP Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
NOTES.PERL Tweaks to NOTES.PERL 2016-06-03 17:10:16 +01:00
NOTES.UNIX NOTES.UNIX: add "Linking your application" paragraph 2018-06-26 12:28:06 +02:00
NOTES.VMS Remove unnecessary trailing whitespace 2019-02-05 16:25:11 +01:00
NOTES.WIN INSTALL,NOTES.WIN: classify no-asm as non-production option. 2018-07-25 15:47:12 +02:00
README Change license to the Apache License v2.0 2018-12-06 13:27:18 +01:00
README.ENGINE Remove bsd_cryptodev engine 2017-06-19 09:31:45 -04:00
README.FIPS Remove more (rest?) of FIPS build stuff. 2016-01-06 12:07:26 -05:00

 OpenSSL 3.0.0-dev

 Copyright (c) 1998-2018 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 the Apache License 2.0, which means
 that you are free to get and use it for commercial and non-commercial
 purposes as long as you fulfill its conditions.

 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 optimization 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'
    - Configuration data: output of 'perl configdata.pm --dump'
    - 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.