summaryrefslogtreecommitdiffstats
path: root/ssl
AgeCommit message (Collapse)Author
2015-01-22Rerun util/openssl-format-source -v -c .OpenSSL_1_0_2-post-auto-reformatMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22More tweaks for comments due indent issuesOpenSSL_1_0_2-pre-auto-reformatMatt Caswell
Conflicts: ssl/ssl_ciph.c ssl/ssl_locl.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Tweaks for comments due to indent's inability to handle themMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Move more comments that confuse indentMatt Caswell
Conflicts: crypto/dsa/dsa.h demos/engines/ibmca/hw_ibmca.c ssl/ssl_locl.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Fix indent comment corruption issueMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Fix strange formatting by indentMatt Caswell
Conflicts: crypto/hmac/hmac.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22indent has problems with comments that are on the right hand side of a line.Matt Caswell
Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Conflicts: crypto/bn/bn.h crypto/ec/ec_lcl.h crypto/rsa/rsa.h demos/engines/ibmca/hw_ibmca.c ssl/ssl.h ssl/ssl3.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22More indent fixes for STACK_OFMatt Caswell
Conflicts: ssl/s3_lib.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Fix source where indent will not be able to copeMatt Caswell
Conflicts: apps/ciphers.c ssl/s3_pkt.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Additional comment changes for reformat of 1.0.2Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Further comment amendments to preserve formatting prior to source reformatMatt Caswell
(cherry picked from commit 4a7fa26ffd65bf36beb8d1cb8f29fc0ae203f5c5) Conflicts: crypto/x509v3/pcy_tree.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22mark all block comments that need format preserving so thatTim Hudson
indent will not alter them when reformatting comments (cherry picked from commit 1d97c8435171a7af575f73c526d79e1ef0ee5960) Conflicts: crypto/bn/bn_lcl.h crypto/bn/bn_prime.c crypto/engine/eng_all.c crypto/rc4/rc4_utl.c crypto/sha/sha.h ssl/kssl.c ssl/t1_lib.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-08A memory leak can occur in dtls1_buffer_record if either of the calls toMatt Caswell
ssl3_setup_buffers or pqueue_insert fail. The former will fail if there is a malloc failure, whilst the latter will fail if attempting to add a duplicate record to the queue. This should never happen because duplicate records should be detected and dropped before any attempt to add them to the queue. Unfortunately records that arrive that are for the next epoch are not being recorded correctly, and therefore replays are not being detected. Additionally, these "should not happen" failures that can occur in dtls1_buffer_record are not being treated as fatal and therefore an attacker could exploit this by sending repeated replay records for the next epoch, eventually causing a DoS through memory exhaustion. Thanks to Chris Mueller for reporting this issue and providing initial analysis and a patch. Further analysis and the final patch was performed by Matt Caswell from the OpenSSL development team. CVE-2015-0206 Reviewed-by: Dr Stephen Henson <steve@openssl.org> (cherry picked from commit 652ff0f4796eecd8729b4690f2076d1c7ccb2862)
2015-01-08Unauthenticated DH client certificate fix.Dr. Stephen Henson
Fix to prevent use of DH client certificates without sending certificate verify message. If we've used a client certificate to generate the premaster secret ssl3_get_client_key_exchange returns 2 and ssl3_get_cert_verify is never called. We can only skip the certificate verify message in ssl3_get_cert_verify if the client didn't send a certificate. Thanks to Karthikeyan Bhargavan for reporting this issue. CVE-2015-0205 Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-08Follow on from CVE-2014-3571. This fixes the code that was the original sourceMatt Caswell
of the crash due to p being NULL. Steve's fix prevents this situation from occuring - however this is by no means obvious by looking at the code for dtls1_get_record. This fix just makes things look a bit more sane. Reviewed-by: Dr Stephen Henson <steve@openssl.org>
2015-01-08Fix crash in dtls1_get_record whilst in the listen state where you get twoDr. Stephen Henson
separate reads performed - one for the header and one for the body of the handshake record. CVE-2014-3571 Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-07fix error discrepancyDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 4a4d4158572fd8b3dc641851b8378e791df7972d)
2015-01-07VMS fixups for 1.0.2Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-01-06Only inherit the session ID context in SSL_set_SSL_CTX if the existingEmilia Kasper
context was also inherited (matches that of the existing SSL_CTX). Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit ac8e9cbe14b59dacfe4ac52bc5ff06f8003e9b01)
2015-01-06Only allow ephemeral RSA keys in export ciphersuites.Dr. Stephen Henson
OpenSSL clients would tolerate temporary RSA keys in non-export ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which enabled this server side. Remove both options as they are a protocol violation. Thanks to Karthikeyan Bhargavan for reporting this issue. (CVE-2015-0204) Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-05ECDH downgrade bug fix.Dr. Stephen Henson
Fix bug where an OpenSSL client would accept a handshake using an ephemeral ECDH ciphersuites with the server key exchange message omitted. Thanks to Karthikeyan Bhargavan for reporting this issue. CVE-2014-3572 Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit b15f8769644b00ef7283521593360b7b2135cb63)
2015-01-05Ensure that the session ID context of an SSL* is updatedAdam Langley
when its SSL_CTX is updated. From BoringSSL commit https://boringssl.googlesource.com/boringssl/+/a5dc545bbcffd9c24cebe65e9ab5ce72d4535e3a Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 61aa44ca99473f9cabdfb2d3b35abd0b473437d1)
2015-01-05Additional fix required for no-srtp to workMatt Caswell
RT3638 Reviewed-by: Emilia Käsper <emilia@openssl.org>
2015-01-05Fix building with no-srtpPiotr Sikora
RT3638 Reviewed-by: Emilia Käsper <emilia@openssl.org> Conflicts: ssl/t1_lib.c
2015-01-02Update SGC flag comment.Dr. Stephen Henson
Since SGC has been removed from OpenSSL 1.0.2 the SSL3_FLAGS_SGC_RESTART_DONE is no longer used. However the #define is retained for compatibility. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-02Remove MS SGCDr. Stephen Henson
MS Server gated cryptography is obsolete and dates from the time of export restrictions on strong encryption and is only used by ancient versions of MSIE. Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 63eab8a620944a990ab3985620966ccd9f48d681)
2015-01-02Clear existing extension state.Dr. Stephen Henson
When parsing ClientHello clear any existing extension state from SRP login and SRTP profile. Thanks to Karthikeyan Bhargavan for reporting this issue. Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 4f605ccb779e32a770093d687e0554e0bbb137d3) Conflicts: ssl/t1_lib.c
2014-12-17Clear warnings/errors within TLS_DEBUG code sectionsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2014-12-17Clear warnings/errors within KSSL_DEBUG code sectionsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2014-12-17Clear warnings/errors within CIPHER_DEBUG code sectionsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2014-12-17Clear warnings/errors within CIPHER_DEBUG code sectionsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2014-12-17Premaster secret handling fixesAdam Langley
From BoringSSL - Send an alert when the client key exchange isn't correctly formatted. - Reject overly short RSA ciphertexts to avoid a (benign) out-of-bounds memory access. Reviewed-by: Kurt Roeckx <kurt@openssl.org> (cherry picked from commit 4aecfd4d9f366c849c9627ab666d1b1addc024e6)
2014-12-16Check return value of ssl3_output_cert_chainDr. Stephen Henson
(cherry picked from commit 66f96fe2d519147097c118d4bf60704c69ed0635) Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-16The dtls1_output_cert_chain function no longer exists so remove it fromMatt Caswell
ssl_locl.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-16Don't set client_version to the ServerHello version.Adam Langley
The client_version needs to be preserved for the RSA key exchange. This change also means that renegotiation will, like TLS, repeat the old client_version rather than advertise only the final version. (Either way, version change on renego is not allowed.) This is necessary in TLS to work around an SChannel bug, but it's not strictly necessary in DTLS. (From BoringSSL) Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit ec1af3c4195c1dfecdd9dc7458850ab1b8b951e0)
2014-12-16Add more meaningful OPENSSL_NO_ECDH error message for suite b modeMatt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit db812f2d70f0695fd53b386fe5e870bef8ca3c22)
2014-12-16Add OPENSSL_NO_ECDH guardsMatt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit af6e2d51bfeabbae827030d4c9d58a8f7477c4a0)
2014-12-16Remove extraneous white space, and add some bracesMatt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 55e530265a7ea8f264717a4e37338cc04eca2007)
2014-12-16DTLS fixes for signed/unsigned issuesMatt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 1904d21123849a65dafde1705e6dd5b7c2f420eb)
2014-12-13Fix memory leak in s2_srvr.c if BUF_MEM_grow failsMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2014-12-13Fixed memory leak if BUF_MEM_grow failsMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2014-12-08Fixed memory leak in the event of a failure of BUF_MEM_growMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 41bf25013032da0eeb111ce3c8fc0946c0e61c41)
2014-12-08Fix memory leak in SSL_new if errors occur.Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 76e6509085ea96df0ca542568ee2596343711307)
2014-12-05Clarify the return values for SSL_get_shared_curve.Emilia Kasper
Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 376e2ca3e3525290619602dc6013c97c9653c037)
2014-12-05Add extra checks for odd-length EC curve lists.Emilia Kasper
Odd-length lists should be rejected everywhere upon parsing. Nevertheless, be extra careful and add guards against off-by-one reads. Also, drive-by replace inexplicable double-negation with an explicit comparison. Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-05Make 'make update' succeed and run itEmilia Kasper
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
2014-12-05Reject elliptic curve lists of odd lengths.Emilia Kasper
The Supported Elliptic Curves extension contains a vector of NamedCurves of 2 bytes each, so the total length must be even. Accepting odd-length lists was observed to lead to a non-exploitable one-byte out-of-bounds read in the latest development branches (1.0.2 and master). Released versions of OpenSSL are not affected. Thanks to Felix Groebert of the Google Security Team for reporting this issue. Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 33d5ba862939ff8db70a9e36fc9a326fab3e8d98)
2014-12-04Remove incorrect code inadvertently introduced through commit 59669b6ab.Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-03Remove "#if 0" codeMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 4bb8eb9ce4f794fecf020a15b54e8505fced0edf)