Skip to content

Commit 27fb651

Browse files
MylesBorinstargos
authored andcommitted
deps: upgrade openssl sources to 1.1.1i
This updates all sources in deps/openssl/openssl by: $ cd deps/openssl/ $ rm -rf openssl $ tar zxf ~/tmp/openssl-1.1.1i.tar.gz $ mv openssl-1.1.1i openssl $ git add --all openssl $ git commit openssl PR-URL: #36520 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com>
1 parent 1f43aad commit 27fb651

File tree

373 files changed

+4265
-5667
lines changed

Some content is hidden

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

373 files changed

+4265
-5667
lines changed

deps/openssl/openssl/CHANGES

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

10+
Changes between 1.1.1h and 1.1.1i [8 Dec 2020]
11+
12+
*) Fixed NULL pointer deref in the GENERAL_NAME_cmp function
13+
This function could crash if both GENERAL_NAMEs contain an EDIPARTYNAME.
14+
If an attacker can control both items being compared then this could lead
15+
to a possible denial of service attack. OpenSSL itself uses the
16+
GENERAL_NAME_cmp function for two purposes:
17+
1) Comparing CRL distribution point names between an available CRL and a
18+
CRL distribution point embedded in an X509 certificate
19+
2) When verifying that a timestamp response token signer matches the
20+
timestamp authority name (exposed via the API functions
21+
TS_RESP_verify_response and TS_RESP_verify_token)
22+
(CVE-2020-1971)
23+
[Matt Caswell]
24+
25+
*) Add support for Apple Silicon M1 Macs with the darwin64-arm64-cc target.
26+
[Stuart Carnie]
27+
28+
*) The security callback, which can be customised by application code, supports
29+
the security operation SSL_SECOP_TMP_DH. This is defined to take an EVP_PKEY
30+
in the "other" parameter. In most places this is what is passed. All these
31+
places occur server side. However there was one client side call of this
32+
security operation and it passed a DH object instead. This is incorrect
33+
according to the definition of SSL_SECOP_TMP_DH, and is inconsistent with all
34+
of the other locations. Therefore this client side call has been changed to
35+
pass an EVP_PKEY instead.
36+
[Matt Caswell]
37+
38+
*) In 1.1.1h, an expired trusted (root) certificate was not anymore rejected
39+
when validating a certificate path. This check is restored in 1.1.1i.
40+
[David von Oheimb]
41+
42+
Changes between 1.1.1g and 1.1.1h [22 Sep 2020]
43+
44+
*) Certificates with explicit curve parameters are now disallowed in
45+
verification chains if the X509_V_FLAG_X509_STRICT flag is used.
46+
[Tomas Mraz]
47+
48+
*) The 'MinProtocol' and 'MaxProtocol' configuration commands now silently
49+
ignore TLS protocol version bounds when configuring DTLS-based contexts, and
50+
conversely, silently ignore DTLS protocol version bounds when configuring
51+
TLS-based contexts. The commands can be repeated to set bounds of both
52+
types. The same applies with the corresponding "min_protocol" and
53+
"max_protocol" command-line switches, in case some application uses both TLS
54+
and DTLS.
55+
56+
SSL_CTX instances that are created for a fixed protocol version (e.g.
57+
TLSv1_server_method()) also silently ignore version bounds. Previously
58+
attempts to apply bounds to these protocol versions would result in an
59+
error. Now only the "version-flexible" SSL_CTX instances are subject to
60+
limits in configuration files in command-line options.
61+
[Viktor Dukhovni]
62+
63+
*) Handshake now fails if Extended Master Secret extension is dropped
64+
on renegotiation.
65+
[Tomas Mraz]
66+
67+
*) Accidentally, an expired trusted (root) certificate is not anymore rejected
68+
when validating a certificate path.
69+
[David von Oheimb]
70+
71+
*) The Oracle Developer Studio compiler will start reporting deprecated APIs
72+
1073
Changes between 1.1.1f and 1.1.1g [21 Apr 2020]
1174

1275
*) Fixed segmentation fault in SSL_check_chain()
@@ -115,9 +178,6 @@
115178

116179
Changes between 1.1.1c and 1.1.1d [10 Sep 2019]
117180

118-
*) Implement BoringSSL's QUIC API
119-
[Todd Short]
120-
121181
*) Fixed a fork protection issue. OpenSSL 1.1.1 introduced a rewritten random
122182
number generator (RNG). This was intended to include protection in the
123183
event of a fork() system call in order to ensure that the parent and child

deps/openssl/openssl/Configurations/10-main.conf

+8-8
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ my %targets = (
741741
inherit_from => [ "linux-generic32", asm("mips64_asm") ],
742742
cflags => add("-mabi=n32"),
743743
cxxflags => add("-mabi=n32"),
744-
bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
744+
bn_ops => "RC4_CHAR",
745745
perlasm_scheme => "n32",
746746
multilib => "32",
747747
},
@@ -1125,7 +1125,7 @@ my %targets = (
11251125
CFLAGS => picker(debug => "-O0 -g",
11261126
release => "-O"),
11271127
cflags => add(threads("-pthread")),
1128-
ex_libs => threads("-pthread"),
1128+
ex_libs => add(threads("-pthread")),
11291129
bn_ops => "BN_LLONG RC4_CHAR",
11301130
perlasm_scheme => "aix32",
11311131
shared_ldflag => add_before("-shared -static-libgcc"),
@@ -1138,7 +1138,7 @@ my %targets = (
11381138
CFLAGS => picker(debug => "-O0 -g",
11391139
release => "-O"),
11401140
cflags => combine("-maix64", threads("-pthread")),
1141-
ex_libs => threads("-pthread"),
1141+
ex_libs => add(threads("-pthread")),
11421142
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
11431143
perlasm_scheme => "aix64",
11441144
shared_ldflag => add_before("-shared -static-libgcc"),
@@ -1154,7 +1154,7 @@ my %targets = (
11541154
cflags => combine("-q32 -qmaxmem=16384 -qro -qroconst",
11551155
threads("-qthreaded")),
11561156
cppflags => threads("-D_THREAD_SAFE"),
1157-
ex_libs => threads("-lpthreads"),
1157+
ex_libs => add(threads("-lpthreads")),
11581158
bn_ops => "BN_LLONG RC4_CHAR",
11591159
perlasm_scheme => "aix32",
11601160
shared_cflag => "-qpic",
@@ -1169,7 +1169,7 @@ my %targets = (
11691169
cflags => combine("-q64 -qmaxmem=16384 -qro -qroconst",
11701170
threads("-qthreaded")),
11711171
cppflags => threads("-D_THREAD_SAFE"),
1172-
ex_libs => threads("-lpthreads"),
1172+
ex_libs => add(threads("-lpthreads")),
11731173
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
11741174
perlasm_scheme => "aix64",
11751175
dso_scheme => "dlfcn",
@@ -1365,9 +1365,9 @@ my %targets = (
13651365
}
13661366
push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
13671367
if (defined(env('PORTSDK_LIBPATH')));
1368-
push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
1369-
if (env('TARGETCPU') eq "X86");
1370-
return @ex_libs;
1368+
push @ex_libs, '/nodefaultlib coredll.lib corelibc.lib'
1369+
if (env('TARGETCPU') =~ /^X86|^ARMV4[IT]/);
1370+
return join(" ", @ex_libs);
13711371
}),
13721372
},
13731373

deps/openssl/openssl/Configurations/windows-makefile.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ CNF_CPPFLAGS={- our $cppfags2 =
211211
join(' ', $target{cppflags} || (),
212212
(map { '-D'.quotify1($_) } @{$target{defines}},
213213
@{$config{defines}}),
214-
(map { '-I'.quotify1($_) } @{$target{includes}},
215-
@{$config{includes}}),
214+
(map { '-I'.'"'.$_.'"' } @{$target{includes}},
215+
@{$config{includes}}),
216216
@{$config{cppflags}}) -}
217217
CNF_CFLAGS={- join(' ', $target{cflags} || (),
218218
@{$config{cflags}}) -}

deps/openssl/openssl/Configure

+36-5
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,22 @@ sub resolve_config;
217217
# Unified build supports separate build dir
218218
my $srcdir = catdir(absolutedir(dirname($0))); # catdir ensures local syntax
219219
my $blddir = catdir(absolutedir(".")); # catdir ensures local syntax
220+
221+
# File::Spec::Unix doesn't detect case insensitivity, so we make sure to
222+
# check if the source and build directory are really the same, and make
223+
# them so. This avoids all kinds of confusion later on.
224+
# We must check @File::Spec::ISA rather than using File::Spec->isa() to
225+
# know if File::Spec ended up loading File::Spec::Unix.
226+
$srcdir = $blddir
227+
if (grep(/::Unix$/, @File::Spec::ISA)
228+
&& samedir($srcdir, $blddir));
229+
220230
my $dofile = abs2rel(catfile($srcdir, "util/dofile.pl"));
221231

222232
my $local_config_envname = 'OPENSSL_LOCAL_CONFIG_DIR';
223233

224-
$config{sourcedir} = abs2rel($srcdir);
225-
$config{builddir} = abs2rel($blddir);
234+
$config{sourcedir} = abs2rel($srcdir, $blddir);
235+
$config{builddir} = abs2rel($blddir, $blddir);
226236

227237
# Collect reconfiguration information if needed
228238
my @argvcopy=@ARGV;
@@ -391,7 +401,6 @@ my @disablables = (
391401
"poly1305",
392402
"posix-io",
393403
"psk",
394-
"quic",
395404
"rc2",
396405
"rc4",
397406
"rc5",
@@ -508,8 +517,6 @@ my @disable_cascades = (
508517
sub { !$disabled{"unit-test"} } => [ "heartbeats" ],
509518

510519
sub { !$disabled{"msan"} } => [ "asm" ],
511-
512-
"tls1_3" => [ "quic" ],
513520
);
514521

515522
# Avoid protocol support holes. Also disable all versions below N, if version
@@ -1052,6 +1059,9 @@ if (scalar(@seed_sources) == 0) {
10521059
print "Using os-specific seed configuration\n";
10531060
push @seed_sources, 'os';
10541061
}
1062+
if (scalar(grep { $_ eq 'egd' } @seed_sources) > 0) {
1063+
delete $disabled{'egd'};
1064+
}
10551065
if (scalar(grep { $_ eq 'none' } @seed_sources) > 0) {
10561066
die "Cannot seed with none and anything else" if scalar(@seed_sources) > 1;
10571067
warn <<_____ if scalar(@seed_sources) == 1;
@@ -3427,6 +3437,27 @@ sub absolutedir {
34273437
return realpath($dir);
34283438
}
34293439

3440+
# Check if all paths are one and the same, using stat. They must both exist
3441+
# We need this for the cases when File::Spec doesn't detect case insensitivity
3442+
# (File::Spec::Unix assumes case sensitivity)
3443+
sub samedir {
3444+
die "samedir expects two arguments\n" unless scalar @_ == 2;
3445+
3446+
my @stat0 = stat($_[0]); # First argument
3447+
my @stat1 = stat($_[1]); # Second argument
3448+
3449+
die "Couldn't stat $_[0]" unless @stat0;
3450+
die "Couldn't stat $_[1]" unless @stat1;
3451+
3452+
# Compare device number
3453+
return 0 unless ($stat0[0] == $stat1[0]);
3454+
# Compare "inode". The perl manual recommends comparing as
3455+
# string rather than as number.
3456+
return 0 unless ($stat0[1] eq $stat1[1]);
3457+
3458+
return 1; # All the same
3459+
}
3460+
34303461
sub quotify {
34313462
my %processors = (
34323463
perl => sub { my $x = shift;

deps/openssl/openssl/INSTALL

-3
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,6 @@
456456
no-psk
457457
Don't build support for Pre-Shared Key based ciphersuites.
458458

459-
no-quic
460-
Don't build with support for QUIC.
461-
462459
no-rdrand
463460
Don't use hardware RDRAND capabilities.
464461

deps/openssl/openssl/NEWS

+12
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
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.1.1h and OpenSSL 1.1.1i [8 Dec 2020]
9+
10+
o Fixed NULL pointer deref in GENERAL_NAME_cmp (CVE-2020-1971)
11+
12+
Major changes between OpenSSL 1.1.1g and OpenSSL 1.1.1h [22 Sep 2020]
13+
14+
o Disallow explicit curve parameters in verifications chains when
15+
X509_V_FLAG_X509_STRICT is used
16+
o Enable 'MinProtocol' and 'MaxProtocol' to configure both TLS and DTLS
17+
contexts
18+
o Oracle Developer Studio will start reporting deprecation warnings
19+
820
Major changes between OpenSSL 1.1.1f and OpenSSL 1.1.1g [21 Apr 2020]
921

1022
o Fixed segmentation fault in SSL_check_chain() (CVE-2020-1967)

deps/openssl/openssl/NOTES.ANDROID

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
-------------------
77

88
Beside basic tools like perl and make you'll need to download the Android
9-
NDK. It's available for Linux, Mac OS X and Windows, but only Linux
10-
version was actually tested. There is no reason to believe that Mac OS X
9+
NDK. It's available for Linux, macOS and Windows, but only Linux
10+
version was actually tested. There is no reason to believe that macOS
1111
wouldn't work. And as for Windows, it's unclear which "shell" would be
1212
suitable, MSYS2 might have best chances. NDK version should play lesser
1313
role, the goal is to support a range of most recent versions.

deps/openssl/openssl/NOTES.PERL

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109

110110
$ cpan -f -i Text::Template
111111

112-
Note: on VMS, you must quote any argument that contains upper case
112+
Note: on VMS, you must quote any argument that contains uppercase
113113
characters, so the lines above would be:
114114

115115
$ cpan -i "Text::Template"

deps/openssl/openssl/NOTES.VMS

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
An ANSI C compiled is needed among other things. This means that
1919
VAX C is not and will not be supported.
2020

21-
We have only tested with DEC C (a.k.a HP VMS C / VSI C) and require
21+
We have only tested with DEC C (aka HP VMS C / VSI C) and require
2222
version 7.1 or later. Compiling with a different ANSI C compiler may
2323
require some work.
2424

deps/openssl/openssl/NOTES.WIN

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
and require --cross-compile-prefix option. While on MSYS[2] it's solved
1313
rather by placing gcc that produces "MinGW binary" code 1st on $PATH.
1414
This is customarily source of confusion. "Hosted" applications "live" in
15-
emulated file system name space with POSIX-y root, mount points, /dev
15+
emulated filesystem name space with POSIX-y root, mount points, /dev
1616
and even /proc. Confusion is intensified by the fact that MSYS2 shell
1717
(or rather emulated execve(2) call) examines the binary it's about to
1818
start, and if it's found *not* to be linked with MSYS2 POSIX-y thing,
19-
command line arguments that look like file names get translated from
19+
command line arguments that look like filenames get translated from
2020
emulated name space to "native". For example '/c/some/where' becomes
2121
'c:\some\where', '/dev/null' - 'nul'. This creates an illusion that
2222
there is no difference between MSYS2 shell and "MinGW binary", but
@@ -26,7 +26,7 @@
2626
it's referred to in quotes here, as "MinGW binary", it's just as
2727
"native" as it can get.)
2828

29-
Visual C++ builds, a.k.a. VC-*
29+
Visual C++ builds, aka VC-*
3030
==============================
3131

3232
Requirement details
@@ -47,7 +47,7 @@
4747
the other hand oldest one is known not to work. Everything between
4848
falls into best-effort category.
4949

50-
- Netwide Assembler, a.k.a. NASM, available from https://www.nasm.us,
50+
- Netwide Assembler, aka NASM, available from https://www.nasm.us,
5151
is required. Note that NASM is the only supported assembler. Even
5252
though Microsoft provided assembler is NOT supported, contemporary
5353
64-bit version is exercised through continuous integration of
@@ -132,7 +132,7 @@
132132
If you link with static OpenSSL libraries then you're expected to
133133
additionally link your application with WS2_32.LIB, GDI32.LIB,
134134
ADVAPI32.LIB, CRYPT32.LIB and USER32.LIB. Those developing
135-
non-interactive service applications might feel concerned about
135+
noninteractive service applications might feel concerned about
136136
linking with GDI32.LIB and USER32.LIB, as they are justly associated
137137
with interactive desktop, which is not available to service
138138
processes. The toolkit is designed to detect in which context it's

deps/openssl/openssl/README

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

2-
OpenSSL 1.1.1g 21 Apr 2020
2+
OpenSSL 1.1.1i 8 Dec 2020
33

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

deps/openssl/openssl/apps/ca.c

100644100755
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
2+
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
33
*
44
* Licensed under the OpenSSL license (the "License"). You may not use
55
* this file except in compliance with the License. You can obtain a copy
@@ -1862,8 +1862,8 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509,
18621862
row[DB_exp_date][tm->length] = '\0';
18631863
row[DB_rev_date] = NULL;
18641864
row[DB_file] = OPENSSL_strdup("unknown");
1865-
if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) ||
1866-
(row[DB_file] == NULL) || (row[DB_name] == NULL)) {
1865+
if ((row[DB_type] == NULL) || (row[DB_file] == NULL)
1866+
|| (row[DB_name] == NULL)) {
18671867
BIO_printf(bio_err, "Memory allocation failure\n");
18681868
goto end;
18691869
}

deps/openssl/openssl/apps/cms.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved.
2+
* Copyright 2008-2020 The OpenSSL Project Authors. All Rights Reserved.
33
*
44
* Licensed under the OpenSSL license (the "License"). You may not use
55
* this file except in compliance with the License. You can obtain a copy
@@ -545,9 +545,11 @@ int cms_main(int argc, char **argv)
545545
if (key_param == NULL || key_param->idx != keyidx) {
546546
cms_key_param *nparam;
547547
nparam = app_malloc(sizeof(*nparam), "key param buffer");
548-
nparam->idx = keyidx;
549-
if ((nparam->param = sk_OPENSSL_STRING_new_null()) == NULL)
548+
if ((nparam->param = sk_OPENSSL_STRING_new_null()) == NULL) {
549+
OPENSSL_free(nparam);
550550
goto end;
551+
}
552+
nparam->idx = keyidx;
551553
nparam->next = NULL;
552554
if (key_first == NULL)
553555
key_first = nparam;

0 commit comments

Comments
 (0)