Skip to content

Commit 4a9da21

Browse files
shigekirvagg
authored andcommitted
deps: upgrade openssl sources to 1.0.1u
This just replaces all sources of openssl-1.0.1u.tar.gz into deps/openssl/openssl. PR-URL: #8718 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Myles Borins <mborins@us.ibm.com>
1 parent 1ba6d16 commit 4a9da21

File tree

177 files changed

+1651
-38121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+1651
-38121
lines changed

deps/openssl/openssl/CHANGES

+161-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,166 @@
22
OpenSSL CHANGES
33
_______________
44

5+
Changes between 1.0.1t and 1.0.1u [22 Sep 2016]
6+
7+
*) OCSP Status Request extension unbounded memory growth
8+
9+
A malicious client can send an excessively large OCSP Status Request
10+
extension. If that client continually requests renegotiation, sending a
11+
large OCSP Status Request extension each time, then there will be unbounded
12+
memory growth on the server. This will eventually lead to a Denial Of
13+
Service attack through memory exhaustion. Servers with a default
14+
configuration are vulnerable even if they do not support OCSP. Builds using
15+
the "no-ocsp" build time option are not affected.
16+
17+
This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.)
18+
(CVE-2016-6304)
19+
[Matt Caswell]
20+
21+
*) In order to mitigate the SWEET32 attack, the DES ciphers were moved from
22+
HIGH to MEDIUM.
23+
24+
This issue was reported to OpenSSL Karthikeyan Bhargavan and Gaetan
25+
Leurent (INRIA)
26+
(CVE-2016-2183)
27+
[Rich Salz]
28+
29+
*) OOB write in MDC2_Update()
30+
31+
An overflow can occur in MDC2_Update() either if called directly or
32+
through the EVP_DigestUpdate() function using MDC2. If an attacker
33+
is able to supply very large amounts of input data after a previous
34+
call to EVP_EncryptUpdate() with a partial block then a length check
35+
can overflow resulting in a heap corruption.
36+
37+
The amount of data needed is comparable to SIZE_MAX which is impractical
38+
on most platforms.
39+
40+
This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.)
41+
(CVE-2016-6303)
42+
[Stephen Henson]
43+
44+
*) Malformed SHA512 ticket DoS
45+
46+
If a server uses SHA512 for TLS session ticket HMAC it is vulnerable to a
47+
DoS attack where a malformed ticket will result in an OOB read which will
48+
ultimately crash.
49+
50+
The use of SHA512 in TLS session tickets is comparatively rare as it requires
51+
a custom server callback and ticket lookup mechanism.
52+
53+
This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.)
54+
(CVE-2016-6302)
55+
[Stephen Henson]
56+
57+
*) OOB write in BN_bn2dec()
58+
59+
The function BN_bn2dec() does not check the return value of BN_div_word().
60+
This can cause an OOB write if an application uses this function with an
61+
overly large BIGNUM. This could be a problem if an overly large certificate
62+
or CRL is printed out from an untrusted source. TLS is not affected because
63+
record limits will reject an oversized certificate before it is parsed.
64+
65+
This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.)
66+
(CVE-2016-2182)
67+
[Stephen Henson]
68+
69+
*) OOB read in TS_OBJ_print_bio()
70+
71+
The function TS_OBJ_print_bio() misuses OBJ_obj2txt(): the return value is
72+
the total length the OID text representation would use and not the amount
73+
of data written. This will result in OOB reads when large OIDs are
74+
presented.
75+
76+
This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.)
77+
(CVE-2016-2180)
78+
[Stephen Henson]
79+
80+
*) Pointer arithmetic undefined behaviour
81+
82+
Avoid some undefined pointer arithmetic
83+
84+
A common idiom in the codebase is to check limits in the following manner:
85+
"p + len > limit"
86+
87+
Where "p" points to some malloc'd data of SIZE bytes and
88+
limit == p + SIZE
89+
90+
"len" here could be from some externally supplied data (e.g. from a TLS
91+
message).
92+
93+
The rules of C pointer arithmetic are such that "p + len" is only well
94+
defined where len <= SIZE. Therefore the above idiom is actually
95+
undefined behaviour.
96+
97+
For example this could cause problems if some malloc implementation
98+
provides an address for "p" such that "p + len" actually overflows for
99+
values of len that are too big and therefore p + len < limit.
100+
101+
This issue was reported to OpenSSL by Guido Vranken
102+
(CVE-2016-2177)
103+
[Matt Caswell]
104+
105+
*) Constant time flag not preserved in DSA signing
106+
107+
Operations in the DSA signing algorithm should run in constant time in
108+
order to avoid side channel attacks. A flaw in the OpenSSL DSA
109+
implementation means that a non-constant time codepath is followed for
110+
certain operations. This has been demonstrated through a cache-timing
111+
attack to be sufficient for an attacker to recover the private DSA key.
112+
113+
This issue was reported by César Pereida (Aalto University), Billy Brumley
114+
(Tampere University of Technology), and Yuval Yarom (The University of
115+
Adelaide and NICTA).
116+
(CVE-2016-2178)
117+
[César Pereida]
118+
119+
*) DTLS buffered message DoS
120+
121+
In a DTLS connection where handshake messages are delivered out-of-order
122+
those messages that OpenSSL is not yet ready to process will be buffered
123+
for later use. Under certain circumstances, a flaw in the logic means that
124+
those messages do not get removed from the buffer even though the handshake
125+
has been completed. An attacker could force up to approx. 15 messages to
126+
remain in the buffer when they are no longer required. These messages will
127+
be cleared when the DTLS connection is closed. The default maximum size for
128+
a message is 100k. Therefore the attacker could force an additional 1500k
129+
to be consumed per connection. By opening many simulataneous connections an
130+
attacker could cause a DoS attack through memory exhaustion.
131+
132+
This issue was reported to OpenSSL by Quan Luo.
133+
(CVE-2016-2179)
134+
[Matt Caswell]
135+
136+
*) DTLS replay protection DoS
137+
138+
A flaw in the DTLS replay attack protection mechanism means that records
139+
that arrive for future epochs update the replay protection "window" before
140+
the MAC for the record has been validated. This could be exploited by an
141+
attacker by sending a record for the next epoch (which does not have to
142+
decrypt or have a valid MAC), with a very large sequence number. This means
143+
that all subsequent legitimate packets are dropped causing a denial of
144+
service for a specific DTLS connection.
145+
146+
This issue was reported to OpenSSL by the OCAP audit team.
147+
(CVE-2016-2181)
148+
[Matt Caswell]
149+
150+
*) Certificate message OOB reads
151+
152+
In OpenSSL 1.0.2 and earlier some missing message length checks can result
153+
in OOB reads of up to 2 bytes beyond an allocated buffer. There is a
154+
theoretical DoS risk but this has not been observed in practice on common
155+
platforms.
156+
157+
The messages affected are client certificate, client certificate request
158+
and server certificate. As a result the attack can only be performed
159+
against a client or a server which enables client authentication.
160+
161+
This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.)
162+
(CVE-2016-6306)
163+
[Stephen Henson]
164+
5165
Changes between 1.0.1s and 1.0.1t [3 May 2016]
6166

7167
*) Prevent padding oracle in AES-NI CBC MAC check
@@ -8195,7 +8355,7 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k
81958355

81968356
*) Source code cleanups: use const where appropriate, eliminate casts,
81978357
use void * instead of char * in lhash.
8198-
[Ulf Möller]
8358+
[Ulf Möller]
81998359

82008360
*) Bugfix: ssl3_send_server_key_exchange was not restartable
82018361
(the state was not changed to SSL3_ST_SW_KEY_EXCH_B, and because of

deps/openssl/openssl/CONTRIBUTING

+65-28
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,75 @@
1-
HOW TO CONTRIBUTE TO OpenSSL
2-
----------------------------
1+
HOW TO CONTRIBUTE TO PATCHES OpenSSL
2+
------------------------------------
33

4-
Development is coordinated on the openssl-dev mailing list (see
5-
http://www.openssl.org for information on subscribing). If you
6-
would like to submit a patch, send it to rt@openssl.org with
7-
the string "[PATCH]" in the subject. Please be sure to include a
8-
textual explanation of what your patch does.
9-
10-
You can also make GitHub pull requests. If you do this, please also send
11-
mail to rt@openssl.org with a brief description and a link to the PR so
12-
that we can more easily keep track of it.
4+
(Please visit https://www.openssl.org/community/getting-started.html for
5+
other ideas about how to contribute.)
136

7+
Development is coordinated on the openssl-dev mailing list (see the
8+
above link or https://mta.openssl.org for information on subscribing).
149
If you are unsure as to whether a feature will be useful for the general
15-
OpenSSL community please discuss it on the openssl-dev mailing list first.
16-
Someone may be already working on the same thing or there may be a good
17-
reason as to why that feature isn't implemented.
10+
OpenSSL community you might want to discuss it on the openssl-dev mailing
11+
list first. Someone may be already working on the same thing or there
12+
may be a good reason as to why that feature isn't implemented.
1813

19-
Patches should be as up to date as possible, preferably relative to the
20-
current Git or the last snapshot. They should follow our coding style
21-
(see https://www.openssl.org/policies/codingstyle.html) and compile without
22-
warnings using the --strict-warnings flag. OpenSSL compiles on many varied
23-
platforms: try to ensure you only use portable features.
14+
The best way to submit a patch is to make a pull request on GitHub.
15+
(It is not necessary to send mail to rt@openssl.org to open a ticket!)
16+
If you think the patch could use feedback from the community, please
17+
start a thread on openssl-dev.
2418

25-
Our preferred format for patch files is "git format-patch" output. For example
26-
to provide a patch file containing the last commit in your local git repository
27-
use the following command:
19+
You can also submit patches by sending it as mail to rt@openssl.org.
20+
Please include the word "PATCH" and an explanation of what the patch
21+
does in the subject line. If you do this, our preferred format is "git
22+
format-patch" output. For example to provide a patch file containing the
23+
last commit in your local git repository use the following command:
2824

29-
# git format-patch --stdout HEAD^ >mydiffs.patch
25+
% git format-patch --stdout HEAD^ >mydiffs.patch
3026

3127
Another method of creating an acceptable patch file without using git is as
3228
follows:
3329

34-
# cd openssl-work
35-
# [your changes]
36-
# ./Configure dist; make clean
37-
# cd ..
38-
# diff -ur openssl-orig openssl-work > mydiffs.patch
30+
% cd openssl-work
31+
...make your changes...
32+
% ./Configure dist; make clean
33+
% cd ..
34+
% diff -ur openssl-orig openssl-work >mydiffs.patch
35+
36+
Note that pull requests are generally easier for the team, and community, to
37+
work with. Pull requests benefit from all of the standard GitHub features,
38+
including code review tools, simpler integration, and CI build support.
39+
40+
No matter how a patch is submitted, the following items will help make
41+
the acceptance and review process faster:
42+
43+
1. Anything other than trivial contributions will require a contributor
44+
licensing agreement, giving us permission to use your code. See
45+
https://www.openssl.org/policies/cla.html for details.
46+
47+
2. All source files should start with the following text (with
48+
appropriate comment characters at the start of each line and the
49+
year(s) updated):
50+
51+
Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved.
52+
53+
Licensed under the OpenSSL license (the "License"). You may not use
54+
this file except in compliance with the License. You can obtain a copy
55+
in the file LICENSE in the source distribution or at
56+
https://www.openssl.org/source/license.html
57+
58+
3. Patches should be as current as possible. When using GitHub, please
59+
expect to have to rebase and update often. Note that we do not accept merge
60+
commits. You will be asked to remove them before a patch is considered
61+
acceptable.
62+
63+
4. Patches should follow our coding style (see
64+
https://www.openssl.org/policies/codingstyle.html) and compile without
65+
warnings. Where gcc or clang is availble you should use the
66+
--strict-warnings Configure option. OpenSSL compiles on many varied
67+
platforms: try to ensure you only use portable features.
68+
69+
5. When at all possible, patches should include tests. These can either be
70+
added to an existing test, or completely new. Please see test/README
71+
for information on the test framework.
72+
73+
6. New features or changed functionality must include documentation. Please
74+
look at the "pod" files in doc/apps, doc/crypto and doc/ssl for examples of
75+
our style.

deps/openssl/openssl/Configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ my @experimental = ();
741741

742742
# This is what $depflags will look like with the above defaults
743743
# (we need this to see if we should advise the user to run "make depend"):
744-
my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST";
744+
my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL2 -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST -DOPENSSL_NO_WEAK_SSL_CIPHERS";
745745

746746
# Explicit "no-..." options will be collected in %disabled along with the defaults.
747747
# To remove something from %disabled, use "enable-foo" (unless it's experimental).

deps/openssl/openssl/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Makefile for OpenSSL
55
##
66

7-
VERSION=1.0.1t
7+
VERSION=1.0.1u
88
MAJOR=1
99
MINOR=0.1
1010
SHLIB_VERSION_NUMBER=1.0.0

deps/openssl/openssl/Makefile.bak

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Makefile for OpenSSL
55
##
66

7-
VERSION=1.0.1t
7+
VERSION=1.0.1u
88
MAJOR=1
99
MINOR=0.1
1010
SHLIB_VERSION_NUMBER=1.0.0

deps/openssl/openssl/NEWS

+14
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
This file gives a brief overview of the major changes between each OpenSSL
66
release. For more details please read the CHANGES file.
77

8+
Major changes between OpenSSL 1.0.1t and OpenSSL 1.0.1u [22 Sep 2016]
9+
10+
o OCSP Status Request extension unbounded memory growth (CVE-2016-6304)
11+
o SWEET32 Mitigation (CVE-2016-2183)
12+
o OOB write in MDC2_Update() (CVE-2016-6303)
13+
o Malformed SHA512 ticket DoS (CVE-2016-6302)
14+
o OOB write in BN_bn2dec() (CVE-2016-2182)
15+
o OOB read in TS_OBJ_print_bio() (CVE-2016-2180)
16+
o Pointer arithmetic undefined behaviour (CVE-2016-2177)
17+
o Constant time flag not preserved in DSA signing (CVE-2016-2178)
18+
o DTLS buffered message DoS (CVE-2016-2179)
19+
o DTLS replay protection DoS (CVE-2016-2181)
20+
o Certificate message OOB reads (CVE-2016-6306)
21+
822
Major changes between OpenSSL 1.0.1s and OpenSSL 1.0.1t [3 May 2016]
923

1024
o Prevent padding oracle in AES-NI CBC MAC check (CVE-2016-2107)

deps/openssl/openssl/README

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
OpenSSL 1.0.1t 3 May 2016
2+
OpenSSL 1.0.1u 22 Sep 2016
33

44
Copyright (c) 1998-2015 The OpenSSL Project
55
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson

deps/openssl/openssl/apps/app_rand.c

+4-10
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,10 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn)
124124
char buffer[200];
125125

126126
#ifdef OPENSSL_SYS_WINDOWS
127-
/*
128-
* allocate 2 to dont_warn not to use RAND_screen() via
129-
* -no_rand_screen option in s_client
130-
*/
131-
if (dont_warn != 2) {
132-
BIO_printf(bio_e, "Loading 'screen' into random state -");
133-
BIO_flush(bio_e);
134-
RAND_screen();
135-
BIO_printf(bio_e, " done\n");
136-
}
127+
BIO_printf(bio_e, "Loading 'screen' into random state -");
128+
BIO_flush(bio_e);
129+
RAND_screen();
130+
BIO_printf(bio_e, " done\n");
137131
#endif
138132

139133
if (file == NULL)

deps/openssl/openssl/apps/apps.c

+2
Original file line numberDiff line numberDiff line change
@@ -2241,6 +2241,8 @@ int args_verify(char ***pargs, int *pargc,
22412241
flags |= X509_V_FLAG_CHECK_SS_SIGNATURE;
22422242
else if (!strcmp(arg, "-no_alt_chains"))
22432243
flags |= X509_V_FLAG_NO_ALT_CHAINS;
2244+
else if (!strcmp(arg, "-allow_proxy_certs"))
2245+
flags |= X509_V_FLAG_ALLOW_PROXY_CERTS;
22442246
else
22452247
return 0;
22462248

deps/openssl/openssl/apps/enc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ int MAIN(int argc, char **argv)
509509
BIO_printf(bio_err, "invalid hex salt value\n");
510510
goto end;
511511
}
512-
} else if (RAND_pseudo_bytes(salt, sizeof salt) < 0)
512+
} else if (RAND_bytes(salt, sizeof salt) <= 0)
513513
goto end;
514514
/*
515515
* If -P option then don't bother writing

deps/openssl/openssl/apps/passwd.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p,
416416
if (*salt_malloc_p == NULL)
417417
goto err;
418418
}
419-
if (RAND_pseudo_bytes((unsigned char *)*salt_p, 2) < 0)
419+
if (RAND_bytes((unsigned char *)*salt_p, 2) <= 0)
420420
goto err;
421421
(*salt_p)[0] = cov_2char[(*salt_p)[0] & 0x3f]; /* 6 bits */
422422
(*salt_p)[1] = cov_2char[(*salt_p)[1] & 0x3f]; /* 6 bits */
@@ -437,7 +437,7 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p,
437437
if (*salt_malloc_p == NULL)
438438
goto err;
439439
}
440-
if (RAND_pseudo_bytes((unsigned char *)*salt_p, 8) < 0)
440+
if (RAND_bytes((unsigned char *)*salt_p, 8) <= 0)
441441
goto err;
442442

443443
for (i = 0; i < 8; i++)

0 commit comments

Comments
 (0)