Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
eukarpov committed Oct 7, 2023
2 parents 7be03e7 + 79997a9 commit 0e501dd
Show file tree
Hide file tree
Showing 1,216 changed files with 16,409 additions and 3,785 deletions.
67 changes: 67 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,44 @@ OpenSSL 3.2

### Changes between 3.1 and 3.2 [xx XXX xxxx]

* Added a function to delete objects from store by URI - OSSL_STORE_delete()
and the corresponding provider-storemgmt API function
OSSL_FUNC_store_delete().

*Dmitry Belyavskiy*

* Added OSSL_FUNC_store_open_ex() provider-storemgmt API function to pass
a passphrase callback when opening a store.

*Simo Sorce*

* Changed the default salt length used by PBES2 KDF's (PBKDF2 and scrypt)
from 8 bytes to 16 bytes.
The PKCS5 (RFC 8018) standard uses a 64 bit salt length for PBE, and
recommends a minimum of 64 bits for PBES2. For FIPS compliance PBKDF2
requires a salt length of 128 bits. This affects OpenSSL command line
applications such as "genrsa" and "pkcs8" and API's such as
PEM_write_bio_PrivateKey() that are reliant on the default value.
The additional commandline option 'saltlen' has been added to the
OpenSSL command line applications for "pkcs8" and "enc" to allow the
salt length to be set to a non default value.

*Shane Lontis*

* Changed the default value of the `ess_cert_id_alg` configuration
option which is used to calculate the TSA's public key certificate
identifier. The default algorithm is updated to be sha256 instead
of sha1.

*Małgorzata Olszówka*

* Added optimization for SM2 algorithm on aarch64. It uses a huge precomputed
table for point multiplication of the base point, which increases the size of
libcrypto from 4.4 MB to 4.9 MB. A new configure option `no-sm2-precomp` has
been added to disable the precomputed table.

*Xu Yizhou*

* Added client side support for QUIC

*Hugo Landau*
Expand Down Expand Up @@ -284,7 +322,35 @@ OpenSSL 3.2
OpenSSL 3.1
-----------

<<<<<<< HEAD
### Changes between 3.1.1 and 3.1.2 [xx XXX xxxx]
=======
### Changes between 3.1.2 and 3.1.3 [xx XXX xxxx]

* Fix POLY1305 MAC implementation corrupting XMM registers on Windows.

The POLY1305 MAC (message authentication code) implementation in OpenSSL
does not save the contents of non-volatile XMM registers on Windows 64
platform when calculating the MAC of data larger than 64 bytes. Before
returning to the caller all the XMM registers are set to zero rather than
restoring their previous content. The vulnerable code is used only on newer
x86_64 processors supporting the AVX512-IFMA instructions.

The consequences of this kind of internal application state corruption can
be various - from no consequences, if the calling application does not
depend on the contents of non-volatile XMM registers at all, to the worst
consequences, where the attacker could get complete control of the
application process. However given the contents of the registers are just
zeroized so the attacker cannot put arbitrary values inside, the most likely
consequence, if any, would be an incorrect result of some application
dependent calculations or a crash leading to a denial of service.

([CVE-2023-4807])

*Bernd Edlinger*

### Changes between 3.1.1 and 3.1.2 [1 Aug 2023]
>>>>>>> master

* Fix excessive time spent checking DH q parameter value.

Expand Down Expand Up @@ -20067,6 +20133,7 @@ ndif

<!-- Links -->

[CVE-2023-4807]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-4807
[CVE-2023-3817]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3817
[CVE-2023-3446]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3446
[CVE-2023-2975]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-2975
Expand Down
11 changes: 7 additions & 4 deletions Configurations/10-main.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ sub vc_win64a_info {
$vc_win64a_info = { AS => "nasm",
ASFLAGS => "-g",
asflags => "-Ox -f win64 -DNEAR",
asoutflag => "-o " };
asoutflag => "-o ",
perlasm_scheme => "nasm" };
} elsif ($disabled{asm}) {
# assembler is still used to compile uplink shim
$vc_win64a_info = { AS => "ml64",
ASFLAGS => "/nologo /Zi",
asflags => "/c /Cp /Cx",
asoutflag => "/Fo" };
asoutflag => "/Fo",
perlasm_scheme => "masm" };
} else {
$die->("NASM not found - make sure it's installed and available on %PATH%\n");
$vc_win64a_info = { AS => "{unknown}",
ASFLAGS => "",
asflags => "",
asoutflag => "" };
asoutflag => "",
perlasm_scheme => "auto" };
}
}
return $vc_win64a_info;
Expand Down Expand Up @@ -1565,7 +1568,7 @@ my %targets = (
sys_id => "WIN64A",
uplink_arch => 'x86_64',
asm_arch => 'x86_64',
perlasm_scheme => "auto",
perlasm_scheme => sub { vc_win64a_info()->{perlasm_scheme} },
multilib => "-x64",
},
"VC-WIN32" => {
Expand Down
1 change: 1 addition & 0 deletions Configurations/50-nonstop.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
'_XOPEN_SOURCE',
'_XOPEN_SOURCE_EXTENDED=1',
'_TANDEM_SOURCE',
'__NSK_OPTIONAL_TYPES__',
'B_ENDIAN'),
perl => '/usr/bin/perl',
shared_target => 'nonstop-shared',
Expand Down
3 changes: 2 additions & 1 deletion Configurations/50-win-hybridcrt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
sub remove_from_flags {
my ($toRemove, $flags) = @_;

return $flags =~ s/$toRemove//r;
$flags =~ s/$toRemove//;
return $flags;
}

my %targets = (
Expand Down
31 changes: 20 additions & 11 deletions Configurations/descrip.mms.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@
# format, relative to the directory where the .c file is located. The logic
# is that any inclusion, merged with one of these relative directories, will
# find the requested inclusion file.
foreach (grep /\[\.crypto\.async\.arch\].*\.o$/, keys %{$unified_info{sources}}) {
# In the regexps, it's advisable to always start the file name with .*?, as
# the C source to OBJ file translation adds stuff at the beginning of the,
# name, such as [.ssl]bio_ssl.c -> [.ssl]libssl-shlib-bio_ssl.OBJ
foreach (grep /\[\.crypto\.async\.arch\].*?\.o$/, keys %{$unified_info{sources}}) {
my $obj = platform->obj($_);
push @{$unified_info{includes_extra}->{$obj}}, qw(../);
}
Expand All @@ -229,15 +232,14 @@
# like "record/record.h". Adding "./" as an inclusion directory helps
# making this sort of header from these directories.
push @{$unified_info{includes_extra}->{$obj}}, qw(./);
}
foreach (grep /\[\.ssl\].*?ssl_lib\.o$/, keys %{$unified_info{sources}}) {
my $obj = platform->obj($_);
# Some files in [.ssl] include "quic/quic_local.h", which in turn
# includes "../ssl_local.h". Adding "./quic" as an inclusion directory
# helps making this sort of header from these directories.

# Additionally, an increasing amount of files in [.ssl] include
# "quic/quic_local.h", which in turn includes "../ssl_local.h". Adding
# "./quic" as an inclusion directory helps making this sort of header
# from these directories.
push @{$unified_info{includes_extra}->{$obj}}, qw(./quic);
}
foreach (grep /\[\.ssl\.(?:record|statem)\].*?\.o$/, keys %{$unified_info{sources}}) {
foreach (grep /\[\.ssl\.(?:quic|record|statem)\].*?\.o$/, keys %{$unified_info{sources}}) {
my $obj = platform->obj($_);
# Most of the files in [.ssl.record] and [.ssl.statem] include
# "../ssl_local.h", which includes things like "record/record.h".
Expand All @@ -251,8 +253,10 @@
# Most of the files in [.ssl.record.methods] include "../../ssl_local.h"
# which includes things like "record/record.h". Adding "../../" as an
# inclusion directory helps making this sort of header from these
# directories.
push @{$unified_info{includes_extra}->{$obj}}, qw(../../);
# directories. But this gets worse; through a series of inclusions,
# all of them based on the relative directory of the object file, there's
# a need to deal with an inclusion of "../ssl_local.h" as well.
push @{$unified_info{includes_extra}->{$obj}}, qw(../../), qw(../);
}
foreach (grep /\[\.test\].*?\.o$/, keys %{$unified_info{sources}}) {
my $obj = platform->obj($_);
Expand All @@ -264,10 +268,15 @@
# directly, but that would end up with more whack-a-mole of this sort, so
# nah, we do it broadly.
push @{$unified_info{includes_extra}->{$obj}}, qw(../ssl/record/methods);
# Similarly, some include "../ssl/ssl_local.h", and somewhere down the
# line, "quic/quic_local.h" gets included, which includes "../ssl_local.h"
# The problem is fixed by adding ../ssl/quic too.
push @{$unified_info{includes_extra}->{$obj}}, qw(../ssl/quic);
}
foreach (grep /\[\.test\.helpers\].*?\.o$/, keys %{$unified_info{sources}}) {
my $obj = platform->obj($_);
push @{$unified_info{includes_extra}->{$obj}}, qw(../../ssl);
push @{$unified_info{includes_extra}->{$obj}},
qw(../../ssl ../../ssl/quic);
}

# This makes sure things get built in the order they need
Expand Down
2 changes: 1 addition & 1 deletion Configurations/shared-info.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env perl
# -*- mode: perl; -*-
# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
# Copyright 2016-2023 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
Expand Down
4 changes: 2 additions & 2 deletions Configurations/unix-Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ doc-nits: build_generated_pods ## Evaluate OpenSSL documentation
# Finally, there's a Node.js version, which we haven't tried, that
# can be found at https://github.com/DavidAnson/markdownlint
md-nits: ## Evaluate markdown files via "mdl"
mdl -s util/markdownlint.rb .
mdl -s $(SRCDIR)/util/markdownlint.rb .

# Test coverage is a good idea for the future
#coverage: $(PROGRAMS) $(TESTPROGRAMS)
Expand Down Expand Up @@ -1264,7 +1264,7 @@ providers/fips.module.sources.new: configdata.pm
crypto/*cap.c; do \
echo "$$x"; \
done \
) | sort | uniq > providers/fips.module.sources.new
) | grep -v sm2p256 | sort | uniq > providers/fips.module.sources.new
rm -rf sources-tmp

# Set to -force to force a rebuild
Expand Down
2 changes: 1 addition & 1 deletion Configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env perl
# -*- mode: perl; -*-
# Copyright 2016-2022 The OpenSSL Project Authors. All Rights Reserved.
# Copyright 2016-2023 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
Expand Down
10 changes: 8 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ OpenSSL 3.2
OpenSSL 3.1
-----------

### Major changes between OpenSSL 3.1.1 and OpenSSL 3.1.2 [under development]
### Major changes between OpenSSL 3.1.2 and OpenSSL 3.1.3 [under development]

* Fix POLY1305 MAC implementation corrupting XMM registers on Windows
([CVE-2023-4807])

### Major changes between OpenSSL 3.1.1 and OpenSSL 3.1.2 [1 Aug 2023]

* Fix excessive time spent checking DH q parameter value ([CVE-2023-3817])
* Fix DH_check() excessive time with over sized modulus ([CVE-2023-3446])
Expand Down Expand Up @@ -115,7 +120,7 @@ OpenSSL 3.0
* Fixed a bug where the RC4-MD5 ciphersuite incorrectly used the
AAD data as the MAC key ([CVE-2022-1434])
* Fix a bug in the OPENSSL_LH_flush() function that breaks reuse of the memory
occuppied by the removed hash table entries ([CVE-2022-1473])
occupied by the removed hash table entries ([CVE-2022-1473])

### Major changes between OpenSSL 3.0.1 and OpenSSL 3.0.2 [15 Mar 2022]

Expand Down Expand Up @@ -1482,6 +1487,7 @@ OpenSSL 0.9.x

<!-- Links -->

[CVE-2023-4807]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-4807
[CVE-2023-3817]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3817
[CVE-2023-3446]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3446
[CVE-2023-2975]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-2975
Expand Down
2 changes: 1 addition & 1 deletion VERSION.dat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MAJOR=3
MINOR=2
PATCH=0
PRE_RELEASE_TAG=dev
PRE_RELEASE_TAG=alpha3-dev
BUILD_METADATA=
RELEASE_DATE=""
SHLIB_VERSION=3
2 changes: 1 addition & 1 deletion apps/asn1parse.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down
2 changes: 1 addition & 1 deletion apps/ca.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down
8 changes: 4 additions & 4 deletions apps/cmp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2007-2022 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2007-2023 The OpenSSL Project Authors. All Rights Reserved.
* Copyright Nokia 2007-2019
* Copyright Siemens AG 2015-2019
*
Expand Down Expand Up @@ -1571,7 +1571,7 @@ static int setup_request_ctx(OSSL_CMP_CTX *ctx, ENGINE *engine)
if (opt_csr != NULL) {
CMP_err1("no -newkey option given with private key for POPO, -csr option only provides public key%s",
opt_key == NULL ? "" :
", and -key option superseded by by -csr");
", and -key option superseded by -csr");
return 0;
}
if (opt_key == NULL) {
Expand Down Expand Up @@ -2648,7 +2648,7 @@ static int get_opts(int argc, char **argv)
}
break;
case OPT_CSR:
opt_csr = opt_arg();
opt_csr = opt_str();
break;
case OPT_OUT_TRUSTED:
opt_out_trusted = opt_str();
Expand Down Expand Up @@ -2681,7 +2681,7 @@ static int get_opts(int argc, char **argv)
opt_issuer = opt_str();
break;
case OPT_SERIAL:
opt_serial = opt_arg();
opt_serial = opt_str();
break;
case OPT_CERTFORM:
opt_certform_s = opt_str();
Expand Down
2 changes: 1 addition & 1 deletion apps/cms.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2008-2022 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down
6 changes: 4 additions & 2 deletions apps/dgst.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down Expand Up @@ -321,6 +321,8 @@ int dgst_main(int argc, char **argv)
sigkey = app_keygen(mac_ctx, mac_name, 0, 0 /* not verbose */);
/* Verbose output would make external-tests gost-engine fail */
EVP_PKEY_CTX_free(mac_ctx);
if (sigkey == NULL)
goto end;
}

if (hmac_key != NULL) {
Expand Down Expand Up @@ -513,7 +515,7 @@ static void show_digests(const OBJ_NAME *name, void *arg)
* in the '*sum' checksum programs. This aims to preserve backward
* compatibility.
*/
static const char *newline_escape_filename(const char *file, int * backslash)
static const char *newline_escape_filename(const char *file, int *backslash)
{
size_t i, e = 0, length = strlen(file), newline_count = 0, mem_len = 0;
char *file_cpy = NULL;
Expand Down
4 changes: 3 additions & 1 deletion apps/dhparam.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down Expand Up @@ -233,6 +233,8 @@ int dhparam_main(int argc, char **argv)
}

tmppkey = app_paramgen(ctx, alg);
if (tmppkey == NULL)
goto end;
EVP_PKEY_CTX_free(ctx);
ctx = NULL;
if (dsaparam) {
Expand Down
2 changes: 1 addition & 1 deletion apps/dsa.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down
4 changes: 3 additions & 1 deletion apps/dsaparam.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down Expand Up @@ -232,6 +232,8 @@ int dsaparam_main(int argc, char **argv)
goto end;
}
pkey = app_keygen(ctx, "DSA", numbits, verbose);
if (pkey == NULL)
goto end;
assert(private);
if (outformat == FORMAT_ASN1)
i = i2d_PrivateKey_bio(out, pkey);
Expand Down
Loading

0 comments on commit 0e501dd

Please sign in to comment.