summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-08-25RT1804: fix EXAMPLE in EVP_EncryptInit.podJan Schaumann
The EXAMPLE that used FILE and RC2 doesn't compile due to a few minor errors. Tweak to use IDEA and AES-128. Remove examples about RC2 and RC5. Reviewed-by: Emilia Kasper <emilia@openssl.org>
2014-08-24Typo fixes to evp documentation.Matt Caswell
This patch was submitted by user "Kox" via the wiki Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 2dd8cb3b9593f528d9537aa6a003d5c93df1e3c5)
2014-08-22RT3060: Limit the number of empty records.Adam Langley
Limit the number of empty records that will be processed consecutively in order to prevent ssl3_get_record from never returning. Reported by "oftc_must_be_destroyed" and George Kadianakis. Reviewed-by: Bodo Moeller <bodo@openssl.org> (cherry picked from commit 3aac17a82fbaf2bc23ee62f24611e5883d3e7b97)
2014-08-22RT3061: Don't SEGFAULT when trying to export a public DSA key as a private key.Adam Langley
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit e19c93811f0db499c98d2888f1c0c0ab65e6238a)
2014-08-22Improve EVP_PKEY_sign documentationEmilia Kasper
Clarify the intended use of EVP_PKEY_sign. Make the code example compile. Reviewed-by: Dr Stephen Henson <steve@openssl.org> (cherry picked from commit d64c533a207f7b6d86c3bc8ffb053e5f4d0c1ca0)
2014-08-21define inline for Visual StudioEmilia Kasper
In Visual Studio, inline is available in C++ only, however __inline is available for C, see http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dr Stephen Henson <steve@openssl.org> (cherry picked from commit f511b25a7370c775dc9fd6198dbacd1706cf242b)
2014-08-21Fix build when BSAES_ASM is defined but VPAES_ASM is notEmilia Kasper
Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit da92be4d68bec81030838e3228ef0238c565af85)
2014-08-19Add volatile qualifications to two blocks of inline asm to stop GCC fromAdam Langley
eliminating them as dead code. Both volatile and "memory" are used because of some concern that the compiler may still cache values across the asm block without it, and because this was such a painful debugging session that I wanted to ensure that it's never repeated. (cherry picked from commit 7753a3a68431aa81b82beea4c3f5374b41454679) Conflicts: crypto/bn/asm/x86_64-gcc.c Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-08-15Fixed out-of-bounds read errors in ssl3_get_key_exchange.Matt Caswell
PR#3450 Conflicts: ssl/s3_clnt.c Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-13Further improve/fix ec_GFp_simple_points_make_affine (ecp_smpl.c) andBodo Moeller
group_order_tests (ectest.c). Also fix the EC_POINTs_mul documentation (ec.h). Reviewed-by: emilia@openssl.org
2014-08-12Fix SRP ciphersuites.Dr. Stephen Henson
Add patch missed from backport of SRP ciphersuite fix. PR#3490 Reviewed-by: Kurt Roeckx <kurt@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> (cherry picked from commit 8f5a8805b82d1ae81168b11b7f1506db9e047dec) Conflicts: ssl/s3_clnt.c ssl/s3_lib.c
2014-08-09Test SRP authentication ciphersuites.Dr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 193c1c07165b0042abd217274a084b49459d4443)
2014-08-07Only use FIPS EC methods in FIPS mode.Dr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-08-06Prepare for 1.0.1j-devMatt Caswell
Reviewed-by: Stephen Henson <steve@openssl.org>
2014-08-06Prepare for 1.0.1i releaseOpenSSL_1_0_1iMatt Caswell
Reviewed-by: Stephen Henson <steve@openssl.org>
2014-08-06make updateMatt Caswell
Reviewed-by: Stephen Henson <steve@openssl.org>
2014-08-06update NEWSDr. Stephen Henson
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2014-08-06update CHANGESDr. Stephen Henson
Reviewed-by: Kurt Roeckx <kurt@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 buffer overrun vulnerability.Dr. Stephen Henson
Invalid parameters passed to the SRP code can be overrun an internal buffer. Add sanity check that g, A, B < N to SRP code. Thanks to Sean Devlin and Watson Ladd of Cryptography Services, NCC Group for reporting this issue. 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-5139 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 OID handling:Emilia Kasper
- Upon parsing, reject OIDs with invalid base-128 encoding. - Always NUL-terminate the destination buffer in OBJ_obj2txt printing function. CVE-2014-3508 Reviewed-by: Dr. Stephen Henson <steve@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Tim Hudson <tjh@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-08-01make updateDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-08-01Fix error discrepancy.Dr. Stephen Henson
We can't rename ssleay_rand_bytes to md_rand_bytes_lock as this will cause an error code discrepancy. Instead keep ssleay_rand_bytes and add an extra parameter: since ssleay_rand_bytes is not part of the public API this wont cause any binary compatibility issues. Reviewed-by: Kurt Roeckx <kurt@openssl.org > (cherry picked from commit 8068a675a7d1a657c54546f24e673e59e6707f03)
2014-08-01Update $default_depflags to match current defaults.Bodo Moeller
2014-08-01Simplify and fix ec_GFp_simple_points_make_affineBodo Moeller
(which didn't always handle value 0 correctly). Reviewed-by: emilia@openssl.org Conflicts: CHANGES
2014-07-30Avoid multiple lock using FIPS DRBG.Dr. Stephen Henson
Don't use multiple locks when SP800-90 DRBG is used outside FIPS mode. PR#3176 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit a3efe1b6e9d2aa2ce5661e4d4b97262eae743fa7)
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> (cherry picked from commit e0fc7961c4fbd27577fb519d9aea2dc788742715) Conflicts: ssl/Makefile util/mkdef.pl
2014-07-21"EC_POINT_invert" was checking "dbl" function pointer instead of "invert".Billy Brumley
PR#2569 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit cba11f57ce161fd301a72194827327128191de7e)
2014-07-22Remove old unused and unmaintained demonstration code.Tim Hudson
Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit 62352b8138018775a4c085a105fccd9cdcb6323f)
2014-07-21Minor documentation update removing "really" and aTim Hudson
statement of opinion rather than a fact. Reviewed-by: Dr. Stephen Henson <steve@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit c8d133e4b6f1ed1b7ad3c1a6d2c62f460e26c050)
2014-07-19Fix documentation for RSA_set_method(3)Dr. Stephen Henson
PR#1675 Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 197400c3f0d617d71ad8167b52fb73046d334320)
2014-07-17Fix typo, add reference.Jeffrey Walton
PR#3456 Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit d48e78f0cf22aaddb563f4bcfccf25b1a45ac8a4)
2014-07-16Disabled XTS mode in enc utility as it is not supportedMatt Caswell
PR#3442 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 2097a17c576f2395a10b05f14490688bc5f45a07)
2014-07-15Add Matt Caswell's fingerprint, and general update on the fingerprints file ↵Matt Caswell
to bring it up to date Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 3bd548192a03142c80cf8bc68659d79dea20a738)
2014-07-15Clarify -Verify and PSK.Dr. Stephen Henson
PR#3452 (cherry picked from commit ca2015a617842fed3d36ed4dcbbf8d5e27bc5216)
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 (cherry picked from commit c8d710dc5f83d69d802f941a4cc5895eb5fe3d65)
2014-07-15Don't allow -www etc options with DTLS.Dr. Stephen Henson
The options which emulate a web server don't make sense when doing DTLS. Exit with an error if an attempt is made to use them. PR#3453 (cherry picked from commit 58a2aaeade8bdecd0f9f0df41927f7cff3012547)
2014-07-15Add ECC extensions with DTLS.Dr. Stephen Henson
PR#3449