Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a1771d0

Browse files
committed
Import OpenSSL 3.0.10
1 parent c61ef50 commit a1771d0

File tree

144 files changed

+2416
-1190
lines changed

Some content is hidden

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

144 files changed

+2416
-1190
lines changed

CHANGES.md

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,64 @@ breaking changes, and mappings for the large list of deprecated functions.
2828

2929
[Migration guide]: https://github.com/openssl/openssl/tree/master/doc/man7/migration_guide.pod
3030

31+
### Changes between 3.0.9 and 3.0.10 [1 Aug 2023]
32+
33+
* Fix excessive time spent checking DH q parameter value.
34+
35+
The function DH_check() performs various checks on DH parameters. After
36+
fixing CVE-2023-3446 it was discovered that a large q parameter value can
37+
also trigger an overly long computation during some of these checks.
38+
A correct q value, if present, cannot be larger than the modulus p
39+
parameter, thus it is unnecessary to perform these checks if q is larger
40+
than p.
41+
42+
If DH_check() is called with such q parameter value,
43+
DH_CHECK_INVALID_Q_VALUE return flag is set and the computationally
44+
intensive checks are skipped.
45+
46+
([CVE-2023-3817])
47+
48+
*Tomáš Mráz*
49+
50+
* Fix DH_check() excessive time with over sized modulus.
51+
52+
The function DH_check() performs various checks on DH parameters. One of
53+
those checks confirms that the modulus ("p" parameter) is not too large.
54+
Trying to use a very large modulus is slow and OpenSSL will not normally use
55+
a modulus which is over 10,000 bits in length.
56+
57+
However the DH_check() function checks numerous aspects of the key or
58+
parameters that have been supplied. Some of those checks use the supplied
59+
modulus value even if it has already been found to be too large.
60+
61+
A new limit has been added to DH_check of 32,768 bits. Supplying a
62+
key/parameters with a modulus over this size will simply cause DH_check() to
63+
fail.
64+
65+
([CVE-2023-3446])
66+
67+
*Matt Caswell*
68+
69+
* Do not ignore empty associated data entries with AES-SIV.
70+
71+
The AES-SIV algorithm allows for authentication of multiple associated
72+
data entries along with the encryption. To authenticate empty data the
73+
application has to call `EVP_EncryptUpdate()` (or `EVP_CipherUpdate()`)
74+
with NULL pointer as the output buffer and 0 as the input buffer length.
75+
The AES-SIV implementation in OpenSSL just returns success for such call
76+
instead of performing the associated data authentication operation.
77+
The empty data thus will not be authenticated. ([CVE-2023-2975])
78+
79+
Thanks to Juerg Wullschleger (Google) for discovering the issue.
80+
81+
The fix changes the authentication tag value and the ciphertext for
82+
applications that use empty associated data entries with AES-SIV.
83+
To decrypt data encrypted with previous versions of OpenSSL the application
84+
has to skip calls to `EVP_DecryptUpdate()` for empty associated data
85+
entries.
86+
87+
*Tomáš Mráz*
88+
3189
### Changes between 3.0.8 and 3.0.9 [30 May 2023]
3290

3391
* Mitigate for the time it takes for `OBJ_obj2txt` to translate gigantic
@@ -42,7 +100,7 @@ breaking changes, and mappings for the large list of deprecated functions.
42100
IDENTIFIER to canonical numeric text form if the size of that OBJECT
43101
IDENTIFIER is 586 bytes or less, and fail otherwise.
44102

45-
The basis for this restriction is RFC 2578 (STD 58), section 3.5. OBJECT
103+
The basis for this restriction is [RFC 2578 (STD 58), section 3.5]. OBJECT
46104
IDENTIFIER values, which stipulates that OBJECT IDENTIFIERS may have at
47105
most 128 sub-identifiers, and that the maximum value that each sub-
48106
identifier may have is 2^32-1 (4294967295 decimal).
@@ -52,8 +110,6 @@ breaking changes, and mappings for the large list of deprecated functions.
52110
these restrictions may occupy is 32 * 128 / 7, which is approximately 586
53111
bytes.
54112

55-
Ref: https://datatracker.ietf.org/doc/html/rfc2578#section-3.5
56-
57113
*Richard Levitte*
58114

59115
* Fixed buffer overread in AES-XTS decryption on ARM 64 bit platforms which
@@ -19652,6 +19708,10 @@ ndif
1965219708

1965319709
<!-- Links -->
1965419710

19711+
[CVE-2023-3817]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3817
19712+
[CVE-2023-3446]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3446
19713+
[CVE-2023-2975]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-2975
19714+
[RFC 2578 (STD 58), section 3.5]: https://datatracker.ietf.org/doc/html/rfc2578#section-3.5
1965519715
[CVE-2023-2650]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-2650
1965619716
[CVE-2023-1255]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-1255
1965719717
[CVE-2023-0466]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-0466

Configure

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,7 @@ my @disable_cascades = (
597597

598598
"crypto-mdebug" => [ "crypto-mdebug-backtrace" ],
599599

600-
# If no modules, then no dynamic engines either
601-
"module" => [ "dynamic-engine" ],
600+
"module" => [ "dynamic-engine", "fips" ],
602601

603602
# Without shared libraries, dynamic engines aren't possible.
604603
# This is due to them having to link with libcrypto and register features
@@ -616,8 +615,6 @@ my @disable_cascades = (
616615
# or modules.
617616
"pic" => [ "shared", "module" ],
618617

619-
"module" => [ "fips", "dso" ],
620-
621618
"engine" => [ "dynamic-engine", grep(/eng$/, @disablables) ],
622619
"dynamic-engine" => [ "loadereng" ],
623620
"hw" => [ "padlockeng" ],

INSTALL.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -796,14 +796,22 @@ By default OpenSSL will attempt to stay in memory until the process exits.
796796
This is so that libcrypto and libssl can be properly cleaned up automatically
797797
via an `atexit()` handler. The handler is registered by libcrypto and cleans
798798
up both libraries. On some platforms the `atexit()` handler will run on unload of
799-
libcrypto (if it has been dynamically loaded) rather than at process exit. This
800-
option can be used to stop OpenSSL from attempting to stay in memory until the
799+
libcrypto (if it has been dynamically loaded) rather than at process exit.
800+
801+
This option can be used to stop OpenSSL from attempting to stay in memory until the
801802
process exits. This could lead to crashes if either libcrypto or libssl have
802803
already been unloaded at the point that the atexit handler is invoked, e.g. on a
803804
platform which calls `atexit()` on unload of the library, and libssl is unloaded
804-
before libcrypto then a crash is likely to happen. Applications can suppress
805-
running of the `atexit()` handler at run time by using the
806-
`OPENSSL_INIT_NO_ATEXIT` option to `OPENSSL_init_crypto()`.
805+
before libcrypto then a crash is likely to happen.
806+
807+
Note that shared library pinning is not automatically disabled for static builds,
808+
i.e., `no-shared` does not imply `no-pinshared`. This may come as a surprise when
809+
linking libcrypto statically into a shared third-party library, because in this
810+
case the shared library will be pinned. To prevent this behaviour, you need to
811+
configure the static build using `no-shared` and `no-pinshared` together.
812+
813+
Applications can suppress running of the `atexit()` handler at run time by
814+
using the `OPENSSL_INIT_NO_ATEXIT` option to `OPENSSL_init_crypto()`.
807815
See the man page for it for further details.
808816

809817
### no-posix-io

NEWS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ OpenSSL Releases
1818
OpenSSL 3.0
1919
-----------
2020

21+
### Major changes between OpenSSL 3.0.9 and OpenSSL 3.0.10 [1 Aug 2023]
22+
23+
* Fix excessive time spent checking DH q parameter value ([CVE-2023-3817])
24+
* Fix DH_check() excessive time with over sized modulus ([CVE-2023-3446])
25+
* Do not ignore empty associated data entries with AES-SIV ([CVE-2023-2975])
26+
2127
### Major changes between OpenSSL 3.0.8 and OpenSSL 3.0.9 [30 May 2023]
2228

2329
* Mitigate for very slow `OBJ_obj2txt()` performance with gigantic OBJECT
@@ -1442,6 +1448,9 @@ OpenSSL 0.9.x
14421448

14431449
<!-- Links -->
14441450

1451+
[CVE-2023-3817]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3817
1452+
[CVE-2023-3446]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3446
1453+
[CVE-2023-2975]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-2975
14451454
[CVE-2023-2650]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-2650
14461455
[CVE-2023-1255]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-1255
14471456
[CVE-2023-0466]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-0466

README-FIPS.md

Lines changed: 89 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ OpenSSL FIPS support
22
====================
33

44
This release of OpenSSL includes a cryptographic module that can be
5-
FIPS 140-2 validated. The module is implemented as an OpenSSL provider.
5+
FIPS validated. The module is implemented as an OpenSSL provider.
66
A provider is essentially a dynamically loadable module which implements
77
cryptographic algorithms, see the [README-PROVIDERS](README-PROVIDERS.md) file
88
for further details.
@@ -28,8 +28,16 @@ resp. `fips.dll` (on Windows). The FIPS provider does not get built and
2828
installed automatically. To enable it, you need to configure OpenSSL using
2929
the `enable-fips` option.
3030

31-
Installing the FIPS module
32-
==========================
31+
Installing the FIPS provider
32+
============================
33+
34+
In order to be FIPS compliant you must only use FIPS validated source code.
35+
Refer to <https://www.openssl.org/source/> for information related to
36+
which versions are FIPS validated. The instructions given below build OpenSSL
37+
just using the FIPS validated source code.
38+
39+
If you want to use a validated FIPS provider, but also want to use the latest
40+
OpenSSL release to build everything else, then refer to the next section.
3341

3442
The following is only a guide.
3543
Please read the Security Policy for up to date installation instructions.
@@ -63,19 +71,93 @@ the installation by doing the following two things:
6371

6472
- Runs the FIPS module self tests
6573
- Generates the so-called FIPS module configuration file containing information
66-
about the module such as the self test status, and the module checksum.
74+
about the module such as the module checksum (and for OpenSSL 3.0 the
75+
self test status).
6776

6877
The FIPS module must have the self tests run, and the FIPS module config file
69-
output generated on every machine that it is to be used on. You must not copy
70-
the FIPS module config file output data from one machine to another.
78+
output generated on every machine that it is to be used on. For OpenSSL 3.0,
79+
you must not copy the FIPS module config file output data from one machine to another.
7180

7281
On Unix the `openssl fipsinstall` command will be invoked as follows by default:
7382

7483
$ openssl fipsinstall -out /usr/local/ssl/fipsmodule.cnf -module /usr/local/lib/ossl-modules/fips.so
7584

7685
If you configured OpenSSL to be installed to a different location, the paths will
7786
vary accordingly. In the rare case that you need to install the fipsmodule.cnf
78-
to non-standard location, you can execute the `openssl fipsinstall` command manually.
87+
to a non-standard location, you can execute the `openssl fipsinstall` command manually.
88+
89+
Installing the FIPS provider and using it with the latest release
90+
=================================================================
91+
92+
This normally requires you to download 2 copies of the OpenSSL source code.
93+
94+
Download and build a validated FIPS provider
95+
--------------------------------------------
96+
97+
Refer to <https://www.openssl.org/source/> for information related to
98+
which versions are FIPS validated. For this example we use OpenSSL 3.0.0.
99+
100+
$ wget https://www.openssl.org/source/openssl-3.0.0.tar.gz
101+
$ tar -xf openssl-3.0.0.tar.gz
102+
$ cd openssl-3.0.0
103+
$ ./Configure enable-fips
104+
$ make
105+
$ cd ..
106+
107+
Download and build the latest release of OpenSSL
108+
------------------------------------------------
109+
110+
We use OpenSSL 3.1.0 here, (but you could also use the latest 3.0.X)
111+
112+
$ wget https://www.openssl.org/source/openssl-3.1.0.tar.gz
113+
$ tar -xf openssl-3.1.0.tar.gz
114+
$ cd openssl-3.1.0
115+
$ ./Configure enable-fips
116+
$ make
117+
118+
Use the OpenSSL FIPS provider for testing
119+
-----------------------------------------
120+
121+
We do this by replacing the artifact for the OpenSSL 3.1.0 FIPS provider.
122+
Note that the OpenSSL 3.1.0 FIPS provider has not been validated
123+
so it must not be used for FIPS purposes.
124+
125+
$ cp ../openssl-3.0.0/providers/fips.so providers/.
126+
$ cp ../openssl-3.0.0/providers/fipsmodule.cnf providers/.
127+
// Note that for OpenSSL 3.0 that the `fipsmodule.cnf` file should not
128+
// be copied across multiple machines if it contains an entry for
129+
// `install-status`. (Otherwise the self tests would be skipped).
130+
131+
// Validate the output of the following to make sure we are using the
132+
// OpenSSL 3.0.0 FIPS provider
133+
$ ./util/wrap.pl -fips apps/openssl list -provider-path providers \
134+
-provider fips -providers
135+
136+
// Now run the current tests using the OpenSSL 3.0 FIPS provider.
137+
$ make tests
138+
139+
Copy the FIPS provider artifacts (`fips.so` & `fipsmodule.cnf`) to known locations
140+
-------------------------------------------------------------------------------------
141+
142+
$ cd ../openssl-3.0.0
143+
$ sudo make install_fips
144+
145+
Check that the correct FIPS provider is being used
146+
--------------------------------------------------
147+
148+
$./util/wrap.pl -fips apps/openssl list -provider-path providers \
149+
-provider fips -providers
150+
151+
// This should produce the following output
152+
Providers:
153+
base
154+
name: OpenSSL Base Provider
155+
version: 3.1.0
156+
status: active
157+
fips
158+
name: OpenSSL FIPS Provider
159+
version: 3.0.0
160+
status: active
79161

80162
Using the FIPS Module in applications
81163
=====================================

VERSION.dat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MAJOR=3
22
MINOR=0
3-
PATCH=9
3+
PATCH=10
44
PRE_RELEASE_TAG=
55
BUILD_METADATA=
6-
RELEASE_DATE="30 May 2023"
6+
RELEASE_DATE="1 Aug 2023"
77
SHLIB_VERSION=3

0 commit comments

Comments
 (0)