Skip to content

Commit 0cd883f

Browse files
shigekiMylesBorins
authored andcommitted
deps: upgrade openssl sources to 1.0.2o
This replaces all sources of openssl-1.0.2o.tar.gz into deps/openssl/openssl PR-URL: #19638 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
1 parent c39167d commit 0cd883f

File tree

250 files changed

+1387
-39509
lines changed

Some content is hidden

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

250 files changed

+1387
-39509
lines changed

deps/openssl/openssl/CHANGES

+20-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
https://github.com/openssl/openssl/commits/ and pick the appropriate
88
release branch.
99

10+
Changes between 1.0.2n and 1.0.2o [27 Mar 2018]
11+
12+
*) Constructed ASN.1 types with a recursive definition could exceed the stack
13+
14+
Constructed ASN.1 types with a recursive definition (such as can be found
15+
in PKCS7) could eventually exceed the stack given malicious input with
16+
excessive recursion. This could result in a Denial Of Service attack. There
17+
are no such structures used within SSL/TLS that come from untrusted sources
18+
so this is considered safe.
19+
20+
This issue was reported to OpenSSL on 4th January 2018 by the OSS-fuzz
21+
project.
22+
(CVE-2018-0739)
23+
[Matt Caswell]
24+
1025
Changes between 1.0.2m and 1.0.2n [7 Dec 2017]
1126

1227
*) Read/write after SSL object in error state
@@ -2012,8 +2027,11 @@
20122027
to work with OPENSSL_NO_SSL_INTERN defined.
20132028
[Steve Henson]
20142029

2015-
*) Add SRP support.
2016-
[Tom Wu <[email protected]> and Ben Laurie]
2030+
*) A long standing patch to add support for SRP from EdelWeb (Peter
2031+
Sylvester and Christophe Renou) was integrated.
2032+
[Christophe Renou <[email protected]>, Peter Sylvester
2033+
2034+
Ben Laurie]
20172035

20182036
*) Add functions to copy EVP_PKEY_METHOD and retrieve flags and id.
20192037
[Steve Henson]

deps/openssl/openssl/Configure

+15-9
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ my %table=(
354354
"hpux-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::-Wl,+s -ldld:DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
355355

356356
#### HP MPE/iX http://jazz.external.hp.com/src/openssl/
357-
"MPE/iX-gcc", "gcc:-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB::(unknown):MPE:-L/SYSLOG/PUB -lsyslog -lsocket -lcurses:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
357+
"MPE/iX-gcc", "gcc:-DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB::(unknown):MPE:-L/SYSLOG/PUB -lsyslog -lsocket -lcurses:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
358358

359359
# DEC Alpha OSF/1/Tru64 targets.
360360
#
@@ -1269,7 +1269,7 @@ my ($prelflags,$postlflags)=split('%',$lflags);
12691269
if (defined($postlflags)) { $lflags=$postlflags; }
12701270
else { $lflags=$prelflags; undef $prelflags; }
12711271

1272-
if ($target =~ /^mingw/ && `$cc --target-help 2>&1` !~ m/\-mno\-cygwin/m)
1272+
if ($target =~ /^mingw/ && `$cross_compile_prefix$cc --target-help 2>&1` !~ m/\-mno\-cygwin/m)
12731273
{
12741274
$cflags =~ s/\-mno\-cygwin\s*//;
12751275
$shared_ldflag =~ s/\-mno\-cygwin\s*//;
@@ -1661,18 +1661,25 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/)
16611661
$shlib_minor=$2;
16621662
}
16631663

1664-
my $ecc = $cc;
1665-
$ecc = "clang" if `$cc --version 2>&1` =~ /clang/;
1664+
my %predefined;
1665+
1666+
# collect compiler pre-defines from gcc or gcc-alike...
1667+
open(PIPE, "$cross_compile_prefix$cc -dM -E -x c /dev/null 2>&1 |");
1668+
while (<PIPE>) {
1669+
m/^#define\s+(\w+(?:\(\w+\))?)(?:\s+(.+))?/ or last;
1670+
$predefined{$1} = defined($2) ? $2 : "";
1671+
}
1672+
close(PIPE);
16661673

16671674
if ($strict_warnings)
16681675
{
16691676
my $wopt;
1670-
die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ or $ecc =~ /clang$/);
1677+
die "ERROR --strict-warnings requires gcc or clang" unless defined($predefined{__GNUC__});
16711678
foreach $wopt (split /\s+/, $gcc_devteam_warn)
16721679
{
16731680
$cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/)
16741681
}
1675-
if ($ecc eq "clang")
1682+
if (defined($predefined{__clang__}))
16761683
{
16771684
foreach $wopt (split /\s+/, $clang_devteam_warn)
16781685
{
@@ -1723,15 +1730,14 @@ while (<IN>)
17231730
s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/;
17241731
s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/;
17251732
s/^RC=\s*/RC= \$\(CROSS_COMPILE\)/;
1726-
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc eq "gcc";
1733+
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $predefined{__GNUC__} >= 3;
17271734
}
17281735
else {
17291736
s/^CC=.*$/CC= $cc/;
17301737
s/^AR=\s*ar/AR= $ar/;
17311738
s/^RANLIB=.*/RANLIB= $ranlib/;
17321739
s/^RC=.*/RC= $windres/;
1733-
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
1734-
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang";
1740+
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $predefined{__GNUC__} >= 3;
17351741
}
17361742
s/^CFLAG=.*$/CFLAG= $cflags/;
17371743
s/^DEPFLAG=.*$/DEPFLAG=$depflags/;

deps/openssl/openssl/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
---------------
1313

1414
/* ====================================================================
15-
* Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved.
15+
* Copyright (c) 1998-2018 The OpenSSL Project. All rights reserved.
1616
*
1717
* Redistribution and use in source and binary forms, with or without
1818
* modification, are permitted provided that the following conditions

deps/openssl/openssl/MacOS/Randomizer.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ void CRandomizer::AddCurrentMouse (void)
266266

267267
if (labs (mLastMouse.h - mouseLoc.h) > kMouseResolution/2 &&
268268
labs (mLastMouse.v - mouseLoc.v) > kMouseResolution/2)
269-
AddBytes (&mouseLoc, sizeof (mouseLoc),
269+
AddBytes (&mouseLoc, sizeof(mouseLoc),
270270
kMousePositionEntropy);
271271

272272
if (mLastMouse.h == mouseLoc.h && mLastMouse.v == mouseLoc.v)
@@ -286,7 +286,7 @@ void CRandomizer::AddCurrentMouse (void)
286286
(kTypicalMouseIdleTicks/(double)lastCheck);
287287
if (entropy < 0.0)
288288
entropy = 0.0;
289-
AddBytes (&mMouseStill, sizeof (mMouseStill), entropy);
289+
AddBytes (&mMouseStill, sizeof(mMouseStill), entropy);
290290
mMouseStill = 0;
291291
}
292292
mLastMouse = mouseLoc;
@@ -299,7 +299,7 @@ void CRandomizer::AddAbsoluteSystemStartupTime (void)
299299
GetDateTime (&now);
300300
now -= TickCount() / 60; // Time in ticks since machine
301301
// startup
302-
AddBytes (&now, sizeof (now), kSysStartupEntropy);
302+
AddBytes (&now, sizeof(now), kSysStartupEntropy);
303303
}
304304

305305
void CRandomizer::AddTimeSinceMachineStartup (void)
@@ -314,7 +314,7 @@ void CRandomizer::AddAppRunningTime (void)
314314
ProcessSerialNumber PSN;
315315
ProcessInfoRec ProcessInfo;
316316

317-
ProcessInfo.processInfoLength = sizeof (ProcessInfoRec);
317+
ProcessInfo.processInfoLength = sizeof(ProcessInfoRec);
318318
ProcessInfo.processName = nil;
319319
ProcessInfo.processAppSpec = nil;
320320

@@ -324,7 +324,7 @@ void CRandomizer::AddAppRunningTime (void)
324324
// Now add the amount of time in ticks that the current process
325325
// has been active
326326

327-
AddBytes (&ProcessInfo, sizeof (ProcessInfoRec),
327+
AddBytes (&ProcessInfo, sizeof(ProcessInfoRec),
328328
kApplicationUpTimeEntropy);
329329
}
330330

@@ -353,7 +353,7 @@ void CRandomizer::AddStartupVolumeInfo (void)
353353
// unpredictable, so might as well toss the whole block in. See
354354
// comments for entropy estimate justifications.
355355

356-
AddBytes (&pb, sizeof (pb),
356+
AddBytes (&pb, sizeof(pb),
357357
kVolumeBytesEntropy +
358358
log2l (((pb.ioVTotalBytes.hi - pb.ioVFreeBytes.hi)
359359
* 4294967296.0D +
@@ -419,7 +419,7 @@ void CRandomizer::AddBytes (void *data, long size, double entropy)
419419
void CRandomizer::AddNow (double millisecondUncertainty)
420420
{
421421
long time = SysTimer();
422-
AddBytes (&time, sizeof (time), log2l (millisecondUncertainty *
422+
AddBytes (&time, sizeof(time), log2l (millisecondUncertainty *
423423
mTimebaseTicksPerMillisec));
424424
}
425425

deps/openssl/openssl/Makefile

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

7-
VERSION=1.0.2n
7+
VERSION=1.0.2o
88
MAJOR=1
99
MINOR=0.2
1010
SHLIB_VERSION_NUMBER=1.0.0
@@ -73,7 +73,7 @@ NM= nm
7373
PERL= /usr/bin/perl
7474
TAR= tar
7575
TARFLAGS= --no-recursion
76-
MAKEDEPPROG=makedepend
76+
MAKEDEPPROG= cc
7777
LIBDIR=lib
7878

7979
# We let the C compiler driver to take care of .s files. This is done in

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.2n
7+
VERSION=1.0.2o
88
MAJOR=1
99
MINOR=0.2
1010
SHLIB_VERSION_NUMBER=1.0.0

deps/openssl/openssl/NEWS

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
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.2n and OpenSSL 1.0.2o [27 Mar 2018]
9+
10+
o Constructed ASN.1 types with a recursive definition could exceed the
11+
stack (CVE-2018-0739)
12+
813
Major changes between OpenSSL 1.0.2m and OpenSSL 1.0.2n [7 Dec 2017]
914

1015
o Read/write after SSL object in error state (CVE-2017-3737)

deps/openssl/openssl/README

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

2-
OpenSSL 1.0.2n 7 Dec 2017
2+
OpenSSL 1.0.2o 27 Mar 2018
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

+3-12
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,11 @@ 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+
RAND_screen();
137128
#endif
138129

139130
if (file == NULL)
140-
file = RAND_file_name(buffer, sizeof buffer);
131+
file = RAND_file_name(buffer, sizeof(buffer));
141132
else if (RAND_egd(file) > 0) {
142133
/*
143134
* we try if the given filename is an EGD socket. if it is, we don't
@@ -212,7 +203,7 @@ int app_RAND_write_file(const char *file, BIO *bio_e)
212203
return 0;
213204

214205
if (file == NULL)
215-
file = RAND_file_name(buffer, sizeof buffer);
206+
file = RAND_file_name(buffer, sizeof(buffer));
216207
if (file == NULL || !RAND_write_file(file)) {
217208
BIO_printf(bio_e, "unable to write 'random state'\n");
218209
return 0;

0 commit comments

Comments
 (0)