Skip to content

Commit e9084a3

Browse files
RafaelGSSdanielleadams
authored andcommitted
deps: upgrade openssl sources to OpenSSL_1_1_1p+quic
This updates all sources in deps/openssl/openssl by: $ git clone https://github.com/quictls/openssl $ cd openssl $ git checkout OpenSSL_1_1_1p+quic $ cd ../node/deps/openssl $ rm -rf openssl $ cp -R ../openssl openssl $ rm -rf openssl/.git* openssl/.travis* $ git add --all openssl $ git commit openssl PR-URL: #43535 Refs: https://mta.openssl.org/pipermail/openssl-announce/2022-June/000228.html Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Danielle Adams <[email protected]>
1 parent 0284901 commit e9084a3

Some content is hidden

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

56 files changed

+1312
-840
lines changed

deps/openssl/openssl/CHANGES

+35-9
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,44 @@
77
https://github.com/openssl/openssl/commits/ and pick the appropriate
88
release branch.
99

10+
Changes between 1.1.1o and 1.1.1p [21 Jun 2022]
11+
12+
*) In addition to the c_rehash shell command injection identified in
13+
CVE-2022-1292, further bugs where the c_rehash script does not
14+
properly sanitise shell metacharacters to prevent command injection have been
15+
fixed.
16+
17+
When the CVE-2022-1292 was fixed it was not discovered that there
18+
are other places in the script where the file names of certificates
19+
being hashed were possibly passed to a command executed through the shell.
20+
21+
This script is distributed by some operating systems in a manner where
22+
it is automatically executed. On such operating systems, an attacker
23+
could execute arbitrary commands with the privileges of the script.
24+
25+
Use of the c_rehash script is considered obsolete and should be replaced
26+
by the OpenSSL rehash command line tool.
27+
(CVE-2022-2068)
28+
[Daniel Fiala, Tomáš Mráz]
29+
30+
*) When OpenSSL TLS client is connecting without any supported elliptic
31+
curves and TLS-1.3 protocol is disabled the connection will no longer fail
32+
if a ciphersuite that does not use a key exchange based on elliptic
33+
curves can be negotiated.
34+
[Tomáš Mráz]
35+
1036
Changes between 1.1.1n and 1.1.1o [3 May 2022]
1137

1238
*) Fixed a bug in the c_rehash script which was not properly sanitising shell
13-
metacharacters to prevent command injection. This script is distributed by
14-
some operating systems in a manner where it is automatically executed. On
15-
such operating systems, an attacker could execute arbitrary commands with the
16-
privileges of the script.
17-
18-
Use of the c_rehash script is considered obsolete and should be replaced
19-
by the OpenSSL rehash command line tool.
20-
(CVE-2022-1292)
21-
[Tomáš Mráz]
39+
metacharacters to prevent command injection. This script is distributed
40+
by some operating systems in a manner where it is automatically executed.
41+
On such operating systems, an attacker could execute arbitrary commands
42+
with the privileges of the script.
43+
44+
Use of the c_rehash script is considered obsolete and should be replaced
45+
by the OpenSSL rehash command line tool.
46+
(CVE-2022-1292)
47+
[Tomáš Mráz]
2248

2349
Changes between 1.1.1m and 1.1.1n [15 Mar 2022]
2450

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

+7
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,13 @@ my %targets = (
995995
perlasm_scheme => "linux64",
996996
},
997997

998+
"BSD-aarch64" => {
999+
inherit_from => [ "BSD-generic64", asm("aarch64_asm") ],
1000+
lib_cppflags => add("-DL_ENDIAN"),
1001+
bn_ops => "SIXTY_FOUR_BIT_LONG",
1002+
perlasm_scheme => "linux64",
1003+
},
1004+
9981005
"bsdi-elf-gcc" => {
9991006
inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
10001007
CC => "gcc",

deps/openssl/openssl/NEWS

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
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.1o and OpenSSL 1.1.1p [21 Jun 2022]
9+
10+
o Fixed additional bugs in the c_rehash script which was not properly
11+
sanitising shell metacharacters to prevent command injection
12+
(CVE-2022-2068)
13+
814
Major changes between OpenSSL 1.1.1n and OpenSSL 1.1.1o [3 May 2022]
915

1016
o Fixed a bug in the c_rehash script which was not properly sanitising

deps/openssl/openssl/README-OpenSSL.md

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

2-
OpenSSL 1.1.1o 3 May 2022
2+
OpenSSL 1.1.1p 21 Jun 2022
33

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

deps/openssl/openssl/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ What This Is
44
This is a fork of [OpenSSL](https://www.openssl.org) to enable QUIC. In addition
55
to the website, the official source distribution is at
66
<https://github.com/openssl/openssl>. The OpenSSL `README` can be found at
7-
[README-OpenSSL.md](https://github.com/quictls/openssl/blob/OpenSSL_1_1_1o%2Bquic/README-OpenSSL.md).
7+
[README-OpenSSL.md](https://github.com/quictls/openssl/blob/OpenSSL_1_1_1p%2Bquic/README-OpenSSL.md).
88

99
This fork adds APIs that can be used by QUIC implementations for connection
1010
handshakes. Quoting the IETF Working group

deps/openssl/openssl/apps/s_server.c

+44-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
2+
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
33
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
44
* Copyright 2005 Nokia. All rights reserved.
55
*
@@ -2236,6 +2236,30 @@ static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
22362236
SSL_CTX_sess_get_cache_size(ssl_ctx));
22372237
}
22382238

2239+
static long int count_reads_callback(BIO *bio, int cmd, const char *argp,
2240+
int argi, long int argl, long int ret)
2241+
{
2242+
unsigned int *p_counter = (unsigned int *)BIO_get_callback_arg(bio);
2243+
2244+
switch (cmd) {
2245+
case BIO_CB_READ: /* No break here */
2246+
case BIO_CB_GETS:
2247+
if (p_counter != NULL)
2248+
++*p_counter;
2249+
break;
2250+
default:
2251+
break;
2252+
}
2253+
2254+
if (s_debug) {
2255+
BIO_set_callback_arg(bio, (char *)bio_s_out);
2256+
ret = bio_dump_callback(bio, cmd, argp, argi, argl, ret);
2257+
BIO_set_callback_arg(bio, (char *)p_counter);
2258+
}
2259+
2260+
return ret;
2261+
}
2262+
22392263
static int sv_body(int s, int stype, int prot, unsigned char *context)
22402264
{
22412265
char *buf = NULL;
@@ -2353,10 +2377,7 @@ static int sv_body(int s, int stype, int prot, unsigned char *context)
23532377
SSL_set_accept_state(con);
23542378
/* SSL_set_fd(con,s); */
23552379

2356-
if (s_debug) {
2357-
BIO_set_callback(SSL_get_rbio(con), bio_dump_callback);
2358-
BIO_set_callback_arg(SSL_get_rbio(con), (char *)bio_s_out);
2359-
}
2380+
BIO_set_callback(SSL_get_rbio(con), count_reads_callback);
23602381
if (s_msg) {
23612382
#ifndef OPENSSL_NO_SSL_TRACE
23622383
if (s_msg == 2)
@@ -2648,7 +2669,25 @@ static int sv_body(int s, int stype, int prot, unsigned char *context)
26482669
*/
26492670
if ((!async || !SSL_waiting_for_async(con))
26502671
&& !SSL_is_init_finished(con)) {
2672+
/*
2673+
* Count number of reads during init_ssl_connection.
2674+
* It helps us to distinguish configuration errors from errors
2675+
* caused by a client.
2676+
*/
2677+
unsigned int read_counter = 0;
2678+
2679+
BIO_set_callback_arg(SSL_get_rbio(con), (char *)&read_counter);
26512680
i = init_ssl_connection(con);
2681+
BIO_set_callback_arg(SSL_get_rbio(con), NULL);
2682+
2683+
/*
2684+
* If initialization fails without reads, then
2685+
* there was a fatal error in configuration.
2686+
*/
2687+
if (i <= 0 && read_counter == 0) {
2688+
ret = -1;
2689+
goto err;
2690+
}
26522691

26532692
if (i < 0) {
26542693
ret = 0;

deps/openssl/openssl/config

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved.
2+
# Copyright 1998-2022 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
@@ -709,6 +709,7 @@ case "$GUESSOS" in
709709
ia64-*-*bsd*) OUT="BSD-ia64" ;;
710710
x86_64-*-dragonfly*) OUT="BSD-x86_64" ;;
711711
amd64-*-*bsd*) OUT="BSD-x86_64" ;;
712+
arm64-*-*bsd*) OUT="BSD-aarch64" ;;
712713
*86*-*-*bsd*) # mimic ld behaviour when it's looking for libc...
713714
if [ -L /usr/lib/libc.so ]; then # [Free|Net]BSD
714715
libc=/usr/lib/libc.so

0 commit comments

Comments
 (0)