- 20 Oct, 2016 1 commit
-
-
Richard Levitte authored
In apps/apps.c, one can set up an engine with setup_engine(). However, we freed the structural reference immediately, which means that for engines that don't already have a structural reference somewhere else (because it has registered at least one cipher or digest algorithm method, and therefore gets a functional reference through the ENGINE_set_default() call), we end up returning an invalid reference. Instead, the function release_engine() is added, and called at the end of the routines that call setup_engine(). Originally, the ENGINE API wasn't designed for this to happen, an engine had to register at least one algorithm method, and was especially expected to register the algorithms corresponding to the key types that could be stored and hidden in hardware. However, it turns out that some engines will not register those algorithms with the ENGINE_set_{algo}, ENGINE_set_cipher or ENGINE_set_digest functions, as they only want the methods to be used for keys, not as general crypto accelerator methods. That may cause ENGINE_set_default() to do nothing, and no functional reference is therefore made, leading to a premature deallocation of the engine and it thereby becoming unavailable when trying to fetch a key. Reviewed-by:
Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1644)
-
- 19 Oct, 2016 2 commits
-
-
Richard Levitte authored
Reviewed-by:
Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1748)
-
Richard Levitte authored
Fixes RT#4699 Reviewed-by:
Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1668)
-
- 18 Oct, 2016 2 commits
-
-
Patrick Steuer authored
crypto/evp/e_aes.c: Types of inp and out parameters of AES_xts_en/decrypt functions need to be changed from char to unsigned char to avoid build error due to -Werror=incompatible-pointer-types. crypto/aes/asm/aes-s390x.pl: Comments need to reflect the above change. Signed-off-by:
Patrick Steuer <psteuer@mail.de> Reviewed-by:
Rich Salz <rsalz@openssl.org> Reviewed-by:
Matt Caswell <matt@openssl.org> CLA: trivial
-
Patrick Steuer authored
crypto/s390xcap.c: cryptlib.h needs to be included for OPENSSL_cpuid_setup function prototype is located there to avoid build error due to -Werror=missing-prototypes. Signed-off-by:
Patrick Steuer <psteuer@mail.de> Reviewed-by:
Rich Salz <rsalz@openssl.org> Reviewed-by:
Matt Caswell <matt@openssl.org> CLA: trivial
-
- 15 Oct, 2016 2 commits
-
-
Steven Fackler authored
These are implemented as macros delegating to `EVP_DigestUpdate`, which takes a `size_t` as its third argument, not an `unsigned int`. CLA: trivial Reviewed-by:
Tim Hudson <tjh@openssl.org> Reviewed-by:
Matt Caswell <matt@openssl.org> (cherry picked from commit 8bdce8d1)
-
Matt Caswell authored
If len == 0 in a call to ERR_error_string_n() then we can read beyond the end of the buffer. Really applications should not be calling this function with len == 0, but we shouldn't be letting it through either! Thanks to Agostino Sarubbo for reporting this issue. Agostino's blog on this issue is available here: https://blogs.gentoo.org/ago/2016/10/14/openssl-libcrypto-stack-based-buffer-overflow-in-err_error_string_n-err-c/ Reviewed-by:
Richard Levitte <levitte@openssl.org> (cherry picked from commit e5c13615)
-
- 14 Oct, 2016 1 commit
-
-
Vitezslav Cizek authored
The SWEET32 fix moved 3DES from HIGH to MEDIUM, but omitted SSL2. CLA: trivial Reviewed-by:
Kurt Roeckx <kurt@openssl.org> Reviewed-by:
Matt Caswell <matt@openssl.org> Reviewed-by:
Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1683)
-
- 13 Oct, 2016 1 commit
-
-
Rich Salz authored
Reviewed-by:
Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1702) (cherry picked from commit 7954dced)
-
- 11 Oct, 2016 1 commit
-
-
Kurt Cancemi authored
Reviewed-by:
Rich Salz <rsalz@openssl.org> Reviewed-by:
Matt Caswell <matt@openssl.org>
-
- 28 Sep, 2016 3 commits
-
-
Richard Levitte authored
Before loading a key from an engine, it may need to be initialized. When done loading the key, we must de-initialize the engine. (if the engine is already initialized somehow, only the reference counter will be incremented then decremented) Reviewed-by:
Stephen Henson <steve@openssl.org> (cherry picked from commit 49e476a5)
-
Rich Salz authored
This reverts commit 4badd2b3 . This fails to call ENGINE_finish; an alternate fix is coming. Reviewed-by:
Dr. Stephen Henson <steve@openssl.org>
-
David Woodhouse authored
Things like 'openssl s_client' only ever worked with keys from an engine which provided a default generic method for some key type — because it called ENGINE_set_default() and that ended up being an implicit initialisation and functional refcount. But an engine which doesn't provide generic methods doesn't get initialised, and then when you try to use it you get an error: cannot load client certificate private key file from engine 140688147056384:error:26096075:engine routines:ENGINE_load_private_key:not initialised:crypto/engine/eng_pkey.c:66: unable to load client certificate private key file cf. https://github.com/OpenSC/libp11/issues/107 (in which we discover that engine_pkcs11 *used* to provide generic methods that OpenSSL would try to use for ephemeral DH keys when negotiating ECDHE cipher suites in TLS, and that didn't work out very well.) Reviewed-by:
Richard Levitte <levitte@openssl.org> Reviewed-by:
Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1640)
-
- 26 Sep, 2016 5 commits
-
-
Matt Caswell authored
The NEWS file referenced the wrong CVE for 1.0.2 Reviewed-by:
Richard Levitte <levitte@openssl.org>
-
Matt Caswell authored
Reviewed-by:
Richard Levitte <levitte@openssl.org>
-
Matt Caswell authored
Reviewed-by:
Richard Levitte <levitte@openssl.org>
-
Matt Caswell authored
Reviewed-by:
Richard Levitte <levitte@openssl.org>
-
Matt Caswell authored
Note: this was accidentally omitted from OpenSSL 1.0.2 branch. Without this fix any attempt to use CRLs will crash. CVE-2016-7052 Thanks to Bruce Stephens and Thomas Jakobi for reporting this issue. Reviewed-by:
Stephen Henson <steve@openssl.org> Reviewed-by:
Rich Salz <rsalz@openssl.org>
-
- 22 Sep, 2016 9 commits
-
-
Dirk Feytons authored
Add a missing ifdef. Same change is already present in master. Reviewed-by:
Matt Caswell <matt@openssl.org> Reviewed-by:
Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1100)
-
Rich Salz authored
Reviewed-by:
Richard Levitte <levitte@openssl.org>
-
Matt Caswell authored
Reviewed-by:
Richard Levitte <levitte@openssl.org>
-
Matt Caswell authored
Reviewed-by:
Richard Levitte <levitte@openssl.org>
-
Matt Caswell authored
Reviewed-by:
Richard Levitte <levitte@openssl.org>
-
Dmitry Belyavsky authored
Russian GOST ciphersuites are vulnerable to the KCI attack because they use long-term keys to establish the connection when ssl client authorization is on. This change brings the GOST implementation into line with the latest specs in order to avoid the attack. It should not break backwards compatibility. Reviewed-by:
Rich Salz <rsalz@openssl.org> Reviewed-by:
Richard Levitte <levitte@openssl.org> Reviewed-by:
Matt Caswell <matt@openssl.org>
-
Matt Caswell authored
If a server sent multiple NPN extensions in a single ClientHello then a mem leak can occur. This will only happen where the client has requested NPN in the first place. It does not occur during renegotiation. Therefore the maximum that could be leaked in a single connection with a malicious server is 64k (the maximum size of the ServerHello extensions section). As this is client side, only occurs if NPN has been requested and does not occur during renegotiation this is unlikely to be exploitable. Issue reported by Shi Lei. Reviewed-by:
Rich Salz <rsalz@openssl.org>
-
Matt Caswell authored
A malicious client can send an excessively large OCSP Status Request extension. If that client continually requests renegotiation, sending a large OCSP Status Request extension each time, then there will be unbounded memory growth on the server. This will eventually lead to a Denial Of Service attack through memory exhaustion. Servers with a default configuration are vulnerable even if they do not support OCSP. Builds using the "no-ocsp" build time option are not affected. I have also checked other extensions to see if they suffer from a similar problem but I could not find any other issues. CVE-2016-6304 Issue reported by Shi Lei. Reviewed-by:
Rich Salz <rsalz@openssl.org>
-
Richard Levitte authored
Reviewed-by:
Matt Caswell <matt@openssl.org>
-
- 21 Sep, 2016 9 commits
-
-
Matt Caswell authored
Certain warning alerts are ignored if they are received. This can mean that no progress will be made if one peer continually sends those warning alerts. Implement a count so that we abort the connection if we receive too many. Issue reported by Shi Lei. Reviewed-by:
Rich Salz <rsalz@openssl.org>
-
Dr. Stephen Henson authored
Grow TLS/DTLS 16 bytes more than strictly necessary as a precaution against OOB reads. In most cases this will have no effect because the message buffer will be large enough already. Reviewed-by:
Matt Caswell <matt@openssl.org>
-
Dr. Stephen Henson authored
Reviewed-by:
Matt Caswell <matt@openssl.org>
-
Dr. Stephen Henson authored
The overflow check will never be triggered because the the n2l3 result is always less than 2^24. Reviewed-by:
Matt Caswell <matt@openssl.org>
-
Rich Salz authored
Reviewed-by:
Richard Levitte <levitte@openssl.org> (cherry picked from commit 776e15f9)
-
Rich Salz authored
Reviewed-by:
Richard Levitte <levitte@openssl.org> (cherry picked from commit 6fcace45)
-
Richard Levitte authored
Reviewed-by:
Tim Hudson <tjh@openssl.org> (cherry picked from commit a19228b7)
-
Dr. Stephen Henson authored
In ssl3_get_client_certificate, ssl3_get_server_certificate and ssl3_get_certificate_request check we have enough room before reading a length. Thanks to Shi Lei (Gear Team, Qihoo 360 Inc.) for reporting these bugs. CVE-2016-6306 Reviewed-by:
Richard Levitte <levitte@openssl.org> Reviewed-by:
Matt Caswell <matt@openssl.org>
-
Matt Caswell authored
We should check the last BN_CTX_get() call to ensure that it isn't NULL before we try and use any of the allocated BIGNUMs. Issue reported by Shi Lei. Reviewed-by:
Richard Levitte <levitte@openssl.org> (cherry picked from commit 1ff7425d)
-
- 20 Sep, 2016 2 commits
-
-
Richard Levitte authored
Check arg count and print an error message. Reviewed-by:
Rich Salz <rsalz@openssl.org>
-
Marcus Meissner authored
This helps with program code linked against static builds accessing a uninitialized ->engine pointer. CLA: none; trivial Reviewed-by:
Tim Hudson <tjh@openssl.org> Reviewed-by:
Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1540)
-
- 15 Sep, 2016 2 commits
-
-
Dr. Stephen Henson authored
Reviewed-by:
Richard Levitte <levitte@openssl.org>
-
Matt Caswell authored
This reverts commit 15d81749 . There were some unexpected side effects to this commit, e.g. in SSLv3 a warning alert gets sent "no_certificate" if a client does not send a Certificate during Client Auth. With the above commit this causes the connection to abort, which is incorrect. There may be some other edge cases like this so we need to have a rethink on this. Reviewed-by:
Tim Hudson <tjh@openssl.org>
-