summaryrefslogtreecommitdiffstats
path: root/ssl
AgeCommit message (Collapse)Author
2014-08-19RT2724: Remove extra declarationJohn Fitzgibbon
Extra SSL_get_selected_srtp_profile() declaration in ssl/srtp.h causes -Werror builds to fail. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-08-18RT1815: More const'ness improvementsJustin Blanchard
Add a dozen more const declarations where appropriate. These are from Justin; while adding his patch, I noticed ASN1_BIT_STRING_check could be fixed, too. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2014-08-15Add support for Camellia HMAC-Based cipher suites from RFC6367Hubert Kario
While RFC6367 focuses on Camellia-GCM cipher suites, it also adds a few cipher suites that use SHA-2 based HMAC that can be very easily added. Tested against gnutls 3.3.5 PR#3443 Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-08-15Fixed out-of-bounds read errors in ssl3_get_key_exchange.Matt Caswell
PR#3450 Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-15RT3023: Redundant logical expressionsHans Wennborg
Remove some redundant logical expressions Reviewed-by: Emilia Kasper <emilia@silkandcyanide.net>
2014-08-15Revision of custom extension code.Dr. Stephen Henson
Move custom extension structures from SSL_CTX to CERT structure. This change means the form can be revised in future without binary compatibility issues. Also since CERT is part of SSL structures so per-SSL custom extensions could be supported in future as well as per SSL_CTX. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-15Include error messages on extension check failure.Dr. Stephen Henson
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-14make dependEmilia Kasper
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2014-08-09Fix SRP authentication ciphersuites.Dr. Stephen Henson
The addition of SRP authentication needs to be checked in various places to work properly. Specifically: A certificate is not sent. A certificate request must not be sent. Server key exchange message must not contain a signature. If appropriate SRP authentication ciphersuites should be chosen. Reviewed-by: Matt Caswell <matt@openssl.org>
2014-08-09RT 1988: Add "const" to SSL_use_RSAPrivateKey_ASN1Viktor Szakats
The "unsigned char *d" should be const. Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
2014-08-08RT 1505: Use SSL3_AL_FATAL not "2"Matthieu Crapet
Use SSL3_AL_FATAL instead of the literal constant "2" Every bit of cleanup helps. Reviewed-by: Matt Caswell <matt@openssl.org>
2014-08-06Check SRP parameters early.Dr. Stephen Henson
Check SRP parameters when they are received so we can send back an appropriate alert. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2014-08-06Fix SRP ciphersuite DoS vulnerability.Dr. Stephen Henson
If a client attempted to use an SRP ciphersuite and it had not been set up correctly it would crash with a null pointer read. A malicious server could exploit this in a DoS attack. Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon for reporting this issue. CVE-2014-2970 Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-08-06Fix race condition in ssl_parse_serverhello_tlsextGabor Tyukasz
CVE-2014-3509 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2014-08-06Fix DTLS anonymous EC(DH) denial of serviceEmilia Käsper
CVE-2014-3510 Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2014-08-06Fix protocol downgrade bug in case of fragmented packetsDavid Benjamin
CVE-2014-3511 Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Bodo Möller <bodo@openssl.org>
2014-08-06Remove some duplicate DTLS code.Adam Langley
In a couple of functions, a sequence number would be calculated twice. Additionally, in |dtls1_process_out_of_seq_message|, we know that |frag_len| <= |msg_hdr->msg_len| so the later tests for |frag_len < msg_hdr->msg_len| can be more clearly written as |frag_len != msg_hdr->msg_len|, since that's the only remaining case. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-06Applying same fix as in dtls1_process_out_of_seq_message. A truncated DTLS ↵Matt Caswell
fragment would cause *ok to be clear, but the return value would still be the number of bytes read. Problem identified by Emilia Käsper, based on previous issue/patch by Adam Langley. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-06Fix return code for truncated DTLS fragment.Adam Langley
Previously, a truncated DTLS fragment in |dtls1_process_out_of_seq_message| would cause *ok to be cleared, but the return value would still be the number of bytes read. This would cause |dtls1_get_message| not to consider it an error and it would continue processing as normal until the calling function noticed that *ok was zero. I can't see an exploit here because |dtls1_get_message| uses |s->init_num| as the length, which will always be zero from what I can see. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-06Fix memory leak from zero-length DTLS fragments.Adam Langley
The |pqueue_insert| function can fail if one attempts to insert a duplicate sequence number. When handling a fragment of an out of sequence message, |dtls1_process_out_of_seq_message| would not call |dtls1_reassemble_fragment| if the fragment's length was zero. It would then allocate a fresh fragment and attempt to insert it, but ignore the return value, leaking the fragment. This allows an attacker to exhaust the memory of a DTLS peer. Fixes CVE-2014-3507 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-06Fix DTLS handshake message size checks.Matt Caswell
In |dtls1_reassemble_fragment|, the value of |msg_hdr->frag_off+frag_len| was being checked against the maximum handshake message size, but then |msg_len| bytes were allocated for the fragment buffer. This means that so long as the fragment was within the allowed size, the pending handshake message could consume 16MB + 2MB (for the reassembly bitmap). Approx 10 outstanding handshake messages are allowed, meaning that an attacker could consume ~180MB per DTLS connection. In the non-fragmented path (in |dtls1_process_out_of_seq_message|), no check was applied. Fixes CVE-2014-3506 Wholly based on patch by Adam Langley with one minor amendment. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-06Added comment for the frag->reassembly == NULL case as per feedback from EmiliaMatt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-06Avoid double free when processing DTLS packets.Adam Langley
The |item| variable, in both of these cases, may contain a pointer to a |pitem| structure within |s->d1->buffered_messages|. It was being freed in the error case while still being in |buffered_messages|. When the error later caused the |SSL*| to be destroyed, the item would be double freed. Thanks to Wah-Teh Chang for spotting that the fix in 1632ef74 was inconsistent with the other error paths (but correct). Fixes CVE-2014-3505 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-07-24Add conditional unit testing interface.Dr. Stephen Henson
Don't call internal functions directly call them through SSL_test_functions(). This also makes unit testing work on Windows and platforms that don't export internal functions from shared libraries. By default unit testing is not enabled: it requires the compile time option "enable-unit-test". Reviewed-by: Geoff Thorpe <geoff@openssl.org>
2014-07-19Update heartbeat_test #includesMike Bland
ssl/ssl_locl.h now comes first to ensure that it will compile standalone. test/testutil.h is considered to be in the same directory as the test file, since the test file will be linked into test/ and built there. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-07-19Use testutil registry in heartbeat_testMike Bland
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-07-15Fix DTLS certificate requesting code.Dr. Stephen Henson
Use same logic when determining when to expect a client certificate for both TLS and DTLS. PR#3452
2014-07-14Use more common name for GOST key exchange.Dr. Stephen Henson
2014-07-13Add names of GOST algorithms.Peter Mosmans
PR#3440
2014-07-08Please Clang's sanitizer.Andy Polyakov
PR: #3424,#3423,#3422
2014-07-05s3_pkt.c: fix typo.Andy Polyakov
2014-07-05Reduce casting nastiness.Ben Laurie
2014-07-05Don't limit message sizes in ssl3_get_cert_verify.Dr. Stephen Henson
PR#319 (reoponed version).
2014-07-04Remove all RFC5878 code.Dr. Stephen Henson
Remove RFC5878 code. It is no longer needed for CT and has numerous bugs
2014-07-02Make disabling last cipher work.Thijs Alkemade
2014-07-02Fix possible buffer overrun.Ben Laurie
(cherry picked from commit 2db3ea29298bdc347f15fbfab6d5746022f05101) Conflicts: ssl/t1_lib.c
2014-07-01RT 1528; misleading debug print, "pre-master" should be "master key"Rich Salz
2014-07-01RT 1530; fix incorrect commentRich Salz
2014-07-01RT 1229; typo in comment "dont't"->"don't"Rich Salz
2014-07-01Fix warning.Dr. Stephen Henson
(cherry picked from commit c97ec5631bb08a2171a125008d2f0d2a75687aaa)
2014-06-30Make depend.Ben Laurie
2014-06-29More constification.Ben Laurie
2014-06-29Constification - mostly originally from Chromium.Ben Laurie
2014-06-29Fix memory leak.Dr. Stephen Henson
PR#2531
2014-06-28Don't disable state strings with no-ssl2Dr. Stephen Henson
Some state strings were erronously not compiled when no-ssl2 was set. PR#3295
2014-06-28Fix compilation with -DSSL_DEBUG -DTLS_DEBUG -DKSSL_DEBUGyogesh nagarkar
PR#3141
2014-06-27Remove redundant check.Ken Ballou
PR#3174
2014-06-27Add SHA256 Camellia ciphersuites from RFC5932PK
PR#2800
2014-06-27Don't advertise ECC ciphersuits in SSLv2 compatible client hello.Tomas Mraz
PR#3374
2014-06-22Fix off-by-one errors in ssl_cipher_get_evp()Miod Vallat
In the ssl_cipher_get_evp() function, fix off-by-one errors in index validation before accessing arrays. Bug discovered and fixed by Miod Vallat from the OpenBSD team. PR#3375