Commit graph

11819 commits

Author SHA1 Message Date
Richard Levitte
c61bb1abaf make update
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-23 03:03:10 +02:00
Richard Levitte
f59186e436 Rearrange rsaz
A small rearrangement so the inclusion of rsaz_exp.h would be
unconditional, but what that header defines becomes conditional.

This solves the weirdness where rsaz_exp.h gets in and out of the
dependency list for bn_exp.c, depending on the present architecture.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-23 03:02:05 +02:00
Rich Salz
0abf610447 RT3907-fix
Typo in local variable name; introduced by previous fix.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit cc3f3fc2b1)
2015-06-22 20:50:20 -04:00
Rich Salz
57bd71b45b RT3907: avoid "local" in testssl script
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 75ba5c58c6)
2015-06-22 15:50:02 -04:00
Rich Salz
4475451164 RT3917: add cleanup on an error path
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 7fba8407cc)
2015-06-21 17:55:06 -04:00
Richard Levitte
220b9519eb Cleanup mttest.c : because we no longer use stdio here, don't include it
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 8ca96efd24)
2015-06-21 22:12:07 +02:00
Richard Levitte
710e28ef93 Add -ldl to the build of mttest.c
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit d62c98c81c)
2015-06-21 22:12:07 +02:00
Richard Levitte
05d20833e3 Cleanup mttest.c : do not try to output reference counts when threads are done
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 964626957f)
2015-06-21 22:12:07 +02:00
Richard Levitte
90ee3c1646 Cleanup mttest.c : better error reporting when certs are missing
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 7a1789d254)
2015-06-21 22:12:07 +02:00
Richard Levitte
7ef465050e Cleanup mttest.c : make ssl_method a pointer to const
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit f4c73bfe0a)

Conflicts:
	crypto/threads/mttest.c
2015-06-21 22:12:07 +02:00
Richard Levitte
8ca211707a Cleanup mttest.c : more output changes
More fprintf()s and printf()s to turn into BIO calls.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-21 22:12:07 +02:00
Richard Levitte
9007dfa203 Cleanup mttest.c : modernise output
Construct bio_err and bio_stdout from file handles instead of FILE
pointers, since the latter might not be implemented (when OPENSSL_NO_STDIO
is defined).
Convert all output to use BIO_printf.
Change lh_foo to lh_SSL_SESSION_foo.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit bb8abd6735)

Conflicts:
	crypto/threads/mttest.c
2015-06-21 22:12:07 +02:00
Richard Levitte
603bebc0e7 Cleanup mttest.c : modernise the threads setup
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 5c78e18352)

Conflicts:
	crypto/threads/mttest.c
2015-06-21 22:12:07 +02:00
Richard Levitte
56f0733145 Cleanup mttest.c : remove MS_CALLBACK
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit a3f9286556)
2015-06-21 22:12:07 +02:00
Rich Salz
8e6bb99979 RT1688: Add dependencies for parallel make
Backport to 1.0.1 and 1.0.2 to fix RT 3905

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-21 15:26:54 -04:00
Dr. Stephen Henson
8615d8b4ec typo: should be OPENSSL_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit bc9567cdc9)
2015-06-20 19:28:58 +01:00
Richard Levitte
4f0812cc28 Make preprocessor error into real preprocessor error
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(cherry picked from commit b4f0d1a4a8)
2015-06-16 13:13:49 +02:00
Richard Levitte
3bf9adaa2b Remove one extraneous parenthesis
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(cherry picked from commit 30cf91784b)
2015-06-16 13:13:48 +02:00
Matt Caswell
54ae378c9e Prepare for 1.0.2d-dev
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-12 16:14:35 +01:00
Matt Caswell
0ee5fcde06 Prepare for 1.0.2c release
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-12 16:10:40 +01:00
Matt Caswell
d4c1763858 Updated CHANGES and NEWS entries for new release
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-12 15:56:51 +01:00
Adam Langley
fe64245aa1 Allow a zero length extension block
It is valid for an extension block to be present in a ClientHello, but to
be of zero length.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-12 15:43:02 +01:00
Matt Caswell
1030f89f5e Fix ABI break with HMAC
Recent HMAC changes broke ABI compatibility due to a new field in HMAC_CTX.
This backs that change out, and does it a different way.

Thanks to Timo Teras for the concept.

Conflicts:
	crypto/hmac/hmac.c

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-12 14:08:54 +01:00
Matt Caswell
b6ed991731 Prepare for 1.0.2c-dev
Reviewed-by: Stephen Henson <steve@openssl.org>
2015-06-11 14:59:37 +01:00
Matt Caswell
7b560c174d Prepare for 1.0.2b release
Reviewed-by: Stephen Henson <steve@openssl.org>
2015-06-11 14:55:38 +01:00
Matt Caswell
c26bfada81 make update
Reviewed-by: Stephen Henson <steve@openssl.org>
2015-06-11 14:55:38 +01:00
Andy Polyakov
40b8eb792d bn/bn_gf2m.c: avoid infinite loop wich malformed ECParamters.
CVE-2015-1788

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 4924b37ee0)
2015-06-11 14:52:39 +01:00
Matt Caswell
ab17f6b746 Update CHANGES and NEWS
Updates to CHANGES and NEWS to take account of the latest security fixes.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-11 14:52:39 +01:00
Emilia Kasper
7bc2aee4f1 PKCS#7: Fix NULL dereference with missing EncryptedContent.
CVE-2015-1790

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-11 14:52:39 +01:00
Emilia Kasper
9bc3665ac9 Fix length checks in X509_cmp_time to avoid out-of-bounds reads.
Also tighten X509_cmp_time to reject more than three fractional
seconds in the time; and to reject trailing garbage after the offset.

CVE-2015-1789

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-11 14:52:39 +01:00
Dr. Stephen Henson
aa5ab40860 Fix infinite loop in CMS
Fix loop in do_free_upto if cmsbio is NULL: this will happen when attempting
to verify and a digest is not recognised. Reported by Johannes Bauer.

CVE-2015-1792

Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-11 14:52:39 +01:00
Richard Levitte
8aa556e1c3 make update
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-11 15:51:16 +02:00
Richard Levitte
5ef5b9ffa9 Correction of make depend merge error
$(PROGS) was mistakenly removed, adding it back.

Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-11 15:51:16 +02:00
Matt Caswell
d44f89c990 More ssl_session_dup fixes
Fix error handling in ssl_session_dup, as well as incorrect setting up of
the session ticket. Follow on from CVE-2015-1791.

Thanks to LibreSSL project for reporting these issues.

Conflicts:
	ssl/ssl_sess.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-06-11 10:04:00 +01:00
Andy Polyakov
c35e138a58 e_aes_cbc_hmac_sha*.c: address linker warning about OPENSSL_ia32cap_P size mismatch.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit f0fa5c8306)
2015-06-11 10:14:01 +02:00
Kurt Roeckx
57e477b9ec Only allow a temporary rsa key exchange when they key is larger than 512.
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR #838
2015-06-11 00:06:06 +02:00
Kurt Roeckx
39a298a1c0 Properly check certificate in case of export ciphers.
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR #838
2015-06-11 00:06:06 +02:00
Andy Polyakov
1fdf36f511 gcm.c: address linker warning about OPENSSL_ia32cap_P size mismatch.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 75c4827dfe)
2015-06-10 23:58:07 +02:00
Matt Caswell
9dcab127e1 DTLS handshake message fragments musn't span packets
It should not be possible for DTLS message fragments to span multiple
packets. However previously if the message header fitted exactly into one
packet, and the fragment body was in the next packet then this would work.
Obviously this would fail if packets get re-ordered mid-flight.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-06-10 12:10:18 +01:00
Matt Caswell
3e8f9dc1a0 Fix leak in HMAC error path
In the event of an error in the HMAC function, leaks can occur because the
HMAC_CTX does not get cleaned up.

Thanks to the BoringSSL project for reporting this issue.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit e43a13c807)
2015-06-10 11:06:05 +01:00
Matt Caswell
7cb79c7afb EC_POINT_is_on_curve does not return a boolean
The function EC_POINT_is_on_curve does not return a boolean value.
It returns 1 if the point is on the curve, 0 if it is not, and -1
on error. Many usages within OpenSSL were incorrectly using this
function and therefore not correctly handling error conditions.

With thanks to the Open Crypto Audit Project for reporting this issue.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(cherry picked from commit 68886be7e2)
2015-06-10 10:49:06 +01:00
Matt Caswell
d272599277 Tighten extension handling
This adds additional checks to the processing of extensions in a ClientHello
to ensure that either no extensions are present, or if they are then they
take up the exact amount of space expected.

With thanks to the Open Crypto Audit Project for reporting this issue.

Reviewed-by: Stephen Henson <steve@openssl.org>

Conflicts:
	ssl/t1_lib.c
2015-06-10 10:24:49 +01:00
Matt Caswell
b3c02473f7 Fix memory leaks in BIO_dup_chain()
This fixes a memory leak that can occur whilst duplicating a BIO chain if
the call to CRYPTO_dup_ex_data() fails. It also fixes a second memory leak
where if a failure occurs after successfully creating the first BIO in the
chain, then the beginning of the new chain was not freed.

With thanks to the Open Crypto Audit Project for reporting this issue.

Reviewed-by: Stephen Henson <steve@openssl.org>

Conflicts:
	crypto/bio/bio_lib.c
2015-06-10 10:24:49 +01:00
Matt Caswell
23cd01ef61 Replace memset with OPENSSL_cleanse()
BUF_MEM_free() attempts to cleanse memory using memset immediately prior
to a free. This is at risk of being optimised away by the compiler, so
replace with a call to OPENSSL_cleanse() instead.

With thanks to the Open Crypto Audit Project for reporting this issue.

Reviewed-by: Stephen Henson <steve@openssl.org>
2015-06-10 10:24:30 +01:00
Matt Caswell
dcad51bc13 Fix Kerberos issue in ssl_session_dup
The fix for CVE-2015-1791 introduced an error in ssl_session_dup for
Kerberos.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-06-10 09:37:01 +01:00
Richard Levitte
80d586d97f When making libcrypto from apps or test, make sure to include engines
For librypto to be complete, the stuff in both crypto/ and engines/
have to be built.  Doing 'make test' or 'make apps' from a clean
source tree failed to do so.
Corrected by using the new 'build_libcrypto' in the top Makefile.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit acaff3b797)
2015-06-10 02:09:49 +02:00
Richard Levitte
cbfec68a79 Add and rearrange building of libraries
There's a need for a target that will build all of libcrypto, so let's
add 'build_libcrypto' that does this.  For ortogonality, let's also
add 'build_libssl'.  Have both also depend on 'libcrypto.pc' and
'libssl.pc' so those get built together with the libraries.
This makes 'all' depend on fewer things directly.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 177b5f9c82)

Conflicts:
	Makefile.org
2015-06-10 02:09:39 +02:00
Jeffrey Walton
31909e7968 Explicitly mention PKCS5_PBKDF2_HMAC in EVP doc.
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 82c4d79318)
2015-06-08 20:21:23 -04:00
Dr. Stephen Henson
34cdff92e9 return correct NID for undefined object
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 0fb9990480)
2015-06-08 21:46:42 +01:00
Emilia Kasper
05627d57e5 Use CRYPTO_memcmp in s3_cbc.c
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-08 15:04:28 +02:00