Skip to content

Commit

Permalink
deps: upgrade openssl sources to 1.1.1k+quic
Browse files Browse the repository at this point in the history
This updates all sources in deps/openssl/openssl by:
    $ git clone https://github.com/quictls/openssl
    $ cd openssl
    $ git checkout OpenSSL_1_1_1k+quic
    $ cd ../node/deps/openssl
    $ rm -rf openssl
    $ cp -R ../openssl openssl
    $ git add --all openssl
    $ git commit openssl
  • Loading branch information
hassaanp committed Mar 25, 2021
1 parent d1e2184 commit 0e37c99
Show file tree
Hide file tree
Showing 46 changed files with 802 additions and 208 deletions.
12 changes: 12 additions & 0 deletions deps/openssl/openssl/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.der binary
/fuzz/corpora/** binary
*.pfx binary

# For git archive
fuzz/corpora/** export-ignore
Configurations/*.norelease.conf export-ignore
.* export-ignore
util/mktar.sh export-ignore
boringssl export-ignore
krb5 export-ignore
pyca-cryptography export-ignore
14 changes: 14 additions & 0 deletions deps/openssl/openssl/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
Thank you for your pull request. Please review these requirements:
Contributors guide: https://github.com/openssl/openssl/blob/master/CONTRIBUTING
Other than that, provide a description above this comment if there isn't one already
If this fixes a github issue, make sure to have a line saying 'Fixes #XXXX' (without quotes) in the commit message.
-->

##### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
- [ ] documentation is added or updated
- [ ] tests are added or updated
147 changes: 147 additions & 0 deletions deps/openssl/openssl/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: GitHub CI

on: [pull_request, push]

# for some reason, this does not work:
# variables:
# BUILDOPTS: "-j4"

# not implemented for v1.1.1: HARNESS_JOBS: "${HARNESS_JOBS:-4}"

# for some reason, this does not work:
# before_script:
# - make="make -s"

jobs:
check_update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: config
run: ./config --strict-warnings && perl configdata.pm --dump
- name: make build_generated
run: make -s build_generated
- name: make update
run: make -s update
- name: git diff
run: git diff --exit-code

check_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: config
run: ./config --strict-warnings && perl configdata.pm --dump
- name: make build_generated
run: make -s build_generated
- name: make doc-nits
run: make doc-nits

basic_gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: config
run: ./config --strict-warnings && perl configdata.pm --dump
- name: make
run: make -s -j4
- name: make test
run: make test

basic_clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: config
run: CC=clang ./config --strict-warnings && perl configdata.pm --dump
- name: make
run: make -s -j4
- name: make test
run: make test

minimal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: config
run: ./config --strict-warnings no-shared no-dso no-pic no-aria no-async no-autoload-config no-blake2 no-bf no-camellia no-cast no-chacha no-cmac no-cms no-comp no-ct no-des no-dgram no-dh no-dsa no-dtls no-ec2m no-engine no-filenames no-gost no-idea no-mdc2 no-md4 no-multiblock no-nextprotoneg no-ocsp no-ocb no-poly1305 no-psk no-rc2 no-rc4 no-rmd160 no-seed no-siphash no-sm2 no-sm3 no-sm4 no-srp no-srtp no-ssl3 no-ssl3-method no-ts no-ui-console no-whirlpool no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT && perl configdata.pm --dump
- name: make
run: make -s -j4
- name: make test
run: make test

out-of-tree_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup build dir
run: |
set -eux
mkdir -p ${myblddir:=../_build/nest/a/little/more}
echo "mysrcdir=$(realpath .)" | tee -a $GITHUB_ENV
echo "myblddir=$(realpath $myblddir)" | tee -a $GITHUB_ENV
- name: config
run: set -eux ; cd ${{ env.myblddir }} && ${{ env.mysrcdir }}/config --strict-warnings && perl configdata.pm --dump
- name: make build_generated
run: set -eux; cd ${{ env.myblddir }} && make -s build_generated
- name: make update
run: set -eux; cd ${{ env.myblddir }} && make update
- name: make
run: set -eux; cd ${{ env.myblddir }} && make -s -j4
- name: make test (minimal subset)
run: set -eux; cd ${{ env.myblddir }} && make test TESTS='0[0-9]'

no-deprecated:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: config
run: ./config --strict-warnings no-deprecated && perl configdata.pm --dump
- name: make
run: make -s -j4
- name: make test
run: make test

sanitizers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: config
run: ./config --debug enable-asan enable-ubsan enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 && perl configdata.pm --dump
- name: make
run: make -s -j4
- name: make test
run: make test OPENSSL_TEST_RAND_ORDER=0

enable_non-default_options:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: config
run: ./config --strict-warnings no-ec enable-ssl-trace enable-zlib enable-zlib-dynamic enable-crypto-mdebug enable-crypto-mdebug-backtrace enable-egd && perl configdata.pm --dump
- name: make
run: make -s -j4
- name: make test
run: make test

legacy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: config
run: ./config -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-zlib enable-ec_nistp_64_gcc_128 && perl configdata.pm --dump
- name: make
run: make -s -j4
- name: make test
run: make test

buildtest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: config
run: ./config no-makedepend enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE && perl configdata.pm --dump
- name: make
run: make -s -j4
- name: make test
run: make test
11 changes: 11 additions & 0 deletions deps/openssl/openssl/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[submodule "boringssl"]
path = boringssl
url = https://boringssl.googlesource.com/boringssl

[submodule "pyca.cryptography"]
path = pyca-cryptography
url = https://github.com/pyca/cryptography.git

[submodule "krb5"]
path = krb5
url = https://github.com/krb5/krb5
15 changes: 15 additions & 0 deletions deps/openssl/openssl/.travis-apt-pin.preferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Package: clang-3.9
Pin: release o=Ubuntu
Pin-Priority: -1

Package: libclang-common-3.9-dev
Pin: release o=Ubuntu
Pin-Priority: -1

Package: libclang1-3.9
Pin: release o=Ubuntu
Pin-Priority: -1

Package: libllvm3.9v4
Pin: release o=Ubuntu
Pin-Priority: -1
3 changes: 3 additions & 0 deletions deps/openssl/openssl/.travis-create-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/sh

./util/mktar.sh --name=_srcdist
44 changes: 44 additions & 0 deletions deps/openssl/openssl/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,50 @@
https://github.com/openssl/openssl/commits/ and pick the appropriate
release branch.

Changes between 1.1.1j and 1.1.1k [25 Mar 2021]

*) Fixed a problem with verifying a certificate chain when using the
X509_V_FLAG_X509_STRICT flag. This flag enables additional security checks
of the certificates present in a certificate chain. It is not set by
default.

Starting from OpenSSL version 1.1.1h a check to disallow certificates in
the chain that have explicitly encoded elliptic curve parameters was added
as an additional strict check.

An error in the implementation of this check meant that the result of a
previous check to confirm that certificates in the chain are valid CA
certificates was overwritten. This effectively bypasses the check
that non-CA certificates must not be able to issue other certificates.

If a "purpose" has been configured then there is a subsequent opportunity
for checks that the certificate is a valid CA. All of the named "purpose"
values implemented in libcrypto perform this check. Therefore, where
a purpose is set the certificate chain will still be rejected even when the
strict flag has been used. A purpose is set by default in libssl client and
server certificate verification routines, but it can be overridden or
removed by an application.

In order to be affected, an application must explicitly set the
X509_V_FLAG_X509_STRICT verification flag and either not set a purpose
for the certificate verification or, in the case of TLS client or server
applications, override the default purpose.
(CVE-2021-3450)
[Tomáš Mráz]

*) Fixed an issue where an OpenSSL TLS server may crash if sent a maliciously
crafted renegotiation ClientHello message from a client. If a TLSv1.2
renegotiation ClientHello omits the signature_algorithms extension (where
it was present in the initial ClientHello), but includes a
signature_algorithms_cert extension then a NULL pointer dereference will
result, leading to a crash and a denial of service attack.

A server is only vulnerable if it has TLSv1.2 and renegotiation enabled
(which is the default configuration). OpenSSL TLS clients are not impacted
by this issue.
(CVE-2021-3449)
[Peter Kästle and Samuel Sapalski]

Changes between 1.1.1i and 1.1.1j [16 Feb 2021]

*) Fixed the X509_issuer_and_serial_hash() function. It attempts to
Expand Down
4 changes: 2 additions & 2 deletions deps/openssl/openssl/Configurations/unix-Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,8 @@ errors:
done )

ordinals:
( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mkdef.pl crypto update )
( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mkdef.pl ssl update )
$(PERL) $(SRCDIR)/util/mkdef.pl crypto update
$(PERL) $(SRCDIR)/util/mkdef.pl ssl update

test_ordinals:
( cd test; \
Expand Down
8 changes: 8 additions & 0 deletions deps/openssl/openssl/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
This file gives a brief overview of the major changes between each OpenSSL
release. For more details please read the CHANGES file.

Major changes between OpenSSL 1.1.1j and OpenSSL 1.1.1k [25 Mar 2021]

o Fixed a problem with verifying a certificate chain when using the
X509_V_FLAG_X509_STRICT flag (CVE-2021-3450)
o Fixed an issue where an OpenSSL TLS server may crash if sent a
maliciously crafted renegotiation ClientHello message from a client
(CVE-2021-3449)

Major changes between OpenSSL 1.1.1i and OpenSSL 1.1.1j [16 Feb 2021]

o Fixed a NULL pointer deref in the X509_issuer_and_serial_hash()
Expand Down
93 changes: 0 additions & 93 deletions deps/openssl/openssl/README

This file was deleted.

4 changes: 2 additions & 2 deletions deps/openssl/openssl/README-OpenSSL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

OpenSSL 1.1.1j 16 Feb 2021
OpenSSL 1.1.1k 25 Mar 2021

Copyright (c) 1998-2020 The OpenSSL Project
Copyright (c) 1998-2021 The OpenSSL Project
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
All rights reserved.

Expand Down
2 changes: 1 addition & 1 deletion deps/openssl/openssl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ How are you keeping current with OpenSSL?
-----------------------------------------
(In other words, "What about rebasing?")

Our plan it to always rebase on top of an upstream release tag. In particular:
Our plan is to always rebase on top of an upstream release tag. In particular:
- The changes for QUIC will always be at the tip of the branch -- you will know what
is from the original OpenSSL and what is for QUIC.
- New versions are quickly created once upstream creates a new tag.
Expand Down
Loading

0 comments on commit 0e37c99

Please sign in to comment.