summaryrefslogtreecommitdiffstats
path: root/ssl
AgeCommit message (Collapse)Author
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
2014-06-22Revert "Fix off-by-one errors in ssl_cipher_get_evp()"Matt Caswell
This reverts commit abfb989fe0b749ad61f1aa4cdb0ea4f952fc13e0. Incorrect attribution
2014-06-22Fixed Windows compilation failureMatt Caswell
2014-06-17Fix signed/unsigned comparisons.Felix Laurie von Massenbach
2014-06-14Accept CCS after sending finished.Dr. Stephen Henson
Allow CCS after finished has been sent by client: at this point keys have been correctly set up so it is OK to accept CCS from server. Without this renegotiation can sometimes fail. PR#3400
2014-06-13Fixed incorrect return code handling in ssl3_final_finish_mac.Matt Caswell
Based on an original patch by Joel Sing (OpenBSD) who also originally identified the issue.
2014-06-13Revert "Fixed incorrect return code handling in ssl3_final_finish_mac"Matt Caswell
This reverts commit 2f1dffa88e1b120add4f0b3a794fbca65aa7768d. Missing attribution.
2014-06-12Fix off-by-one errors in ssl_cipher_get_evp()Kurt Cancemi
In the ssl_cipher_get_evp() function, fix off-by-one errors in index validation before accessing arrays. PR#3375
2014-06-12Added OPENSSL_assert check as per PR#3377 reported by Rainer Jung ↵Matt Caswell
<rainer.jung@kippdata.de>
2014-06-11Enable multi-block support by default.Andy Polyakov
2014-06-10Fixed incorrect return code handling in ssl3_final_finish_macMatt Caswell
2014-06-10Create test/testutil.h for unit test helper macrosMike Bland
Defines SETUP_TEST_FIXTURE and EXECUTE_TEST, and updates ssl/heartbeat_test.c using these macros. SETUP_TEST_FIXTURE makes use of the new TEST_CASE_NAME macro, defined to use __func__ or __FUNCTION__ on platforms that support those symbols, or to use the file name and line number otherwise. This should fix several reported build problems related to lack of C99 support.
2014-06-10Fix null pointer errors.Dr. Stephen Henson
PR#3394
2014-06-09SRP ciphersuite correction.Dr. Stephen Henson
SRP ciphersuites do not have no authentication. They have authentication based on SRP. Add new SRP authentication flag and cipher string.
2014-06-09Update strength_bits for 3DES.Dr. Stephen Henson
Fix strength_bits to 112 for 3DES.
2014-06-07Make tls_session_secret_cb work with CVE-2014-0224 fix.Dr. Stephen Henson
If application uses tls_session_secret_cb for session resumption set the CCS_OK flag.