Skip to content

Commit 32d0abb

Browse files
authored
Merge branch 'wolfSSL:master' into master
2 parents 79235a4 + d1efccd commit 32d0abb

158 files changed

Lines changed: 44727 additions & 3343 deletions

File tree

Some content is hidden

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

.cyignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# wolfSSL folders
2+
$(SEARCH_wolfssl)/IDE
3+
$(SEARCH_wolfssl)/examples
4+
$(SEARCH_wolfssl)/linuxkm
5+
$(SEARCH_wolfssl)/mcapi
6+
$(SEARCH_wolfssl)/mplabx
7+
$(SEARCH_wolfssl)/mqx
8+
$(SEARCH_wolfssl)/tirtos
9+
$(SEARCH_wolfssl)/tests
10+
$(SEARCH_wolfssl)/testsuite
11+
$(SEARCH_wolfssl)/wolfcrypt/src/port/autosar
12+
$(SEARCH_wolfssl)/zephyr
13+
14+
# wolfSSL files
15+
$(SEARCH_wolfssl)/wolfcrypt/src/aes_asm.S
16+
$(SEARCH_wolfssl)/wolfcrypt/src/aes_xts_asm.S
17+
$(SEARCH_wolfssl)/wolfcrypt/src/aes_gcm_asm.S
18+
$(SEARCH_wolfssl)/wolfcrypt/src/aes_gcm_x86_asm.S
19+
$(SEARCH_wolfssl)/wolfcrypt/src/chacha_asm.S
20+
$(SEARCH_wolfssl)/wolfcrypt/src/fe_x25519_asm.S
21+
$(SEARCH_wolfssl)/wolfcrypt/src/poly1305_asm.S
22+
$(SEARCH_wolfssl)/wolfcrypt/src/sha256_asm.S
23+
$(SEARCH_wolfssl)/wolfcrypt/src/sha512_asm.S
24+
$(SEARCH_wolfssl)/wolfcrypt/src/sha3_asm.S
25+
$(SEARCH_wolfssl)/wolfcrypt/src/sm3_asm.S
26+
$(SEARCH_wolfssl)/wolfcrypt/src/sp_x86_64_asm.S
27+
$(SEARCH_wolfssl)/wolfcrypt/src/sp_sm2_x86_64_asm.S
28+
$(SEARCH_wolfssl)/wolfcrypt/src/wc_kyber_asm.S
29+
30+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/armv8-32-aes-asm.S
31+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/armv8-32-curve25519.S
32+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/armv8-32-sha256-asm.S
33+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/armv8-32-sha512-asm.S
34+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/armv8-curve25519.S
35+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/armv8-sha3-asm.S
36+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/armv8-sha512-asm.S
37+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/thumb2-aes-asm.S
38+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/thumb2-curve25519.S
39+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/thumb2-sha256-asm.S
40+
$(SEARCH_wolfssl)/wolfcrypt/src/port/arm/thumb2-sha512-asm.S

.github/workflows/krb5.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ jobs:
1111
# This should be a safe limit for the tests to run.
1212
timeout-minutes: 5
1313
steps:
14+
- name: workaround high-entropy ASLR
15+
# not needed after either an update to llvm or runner is done
16+
run: sudo sysctl vm.mmap_rnd_bits=28
17+
1418
- name: Build wolfSSL
1519
uses: wolfSSL/actions-build-autotools-project@v1
1620
with:
1721
path: wolfssl
18-
configure: --enable-krb CFLAGS='-fsanitize=address'
22+
configure: --enable-krb CC='gcc -fsanitize=address'
1923
install: true
2024

2125
- name: Upload built lib
@@ -61,6 +65,10 @@ jobs:
6165
run: |
6266
patch -p1 < $GITHUB_WORKSPACE/osp/krb5/Patch-for-Kerberos-5-${{ matrix.ref }}.patch
6367
68+
- name: workaround high-entropy ASLR
69+
# not needed after either an update to llvm or runner is done
70+
run: sudo sysctl vm.mmap_rnd_bits=28
71+
6472
- name: Build krb5
6573
working-directory: ./krb5/src
6674
run: |

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,7 @@ jobs:
4949
# TODO: Currently this test fails. Enable it once it becomes passing.
5050
# haproxy:
5151
# uses: ./.github/workflows/haproxy.yml
52+
ocsp:
53+
uses: ./.github/workflows/ocsp.yml
54+
no-malloc:
55+
uses: ./.github/workflows/no-malloc.yml

.github/workflows/nginx.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ jobs:
174174
run: |
175175
echo "nginx_c_flags=-O0" >> $GITHUB_ENV
176176
177+
- name: workaround high-entropy ASLR
178+
# not needed after either an update to llvm or runner is done
179+
run: sudo sysctl vm.mmap_rnd_bits=28
180+
177181
- name: Build nginx with sanitizer
178182
working-directory: nginx
179183
run: |
@@ -203,4 +207,4 @@ jobs:
203207
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib \
204208
TMPDIR=$GITHUB_WORKSPACE TEST_NGINX_BINARY=../nginx/objs/nginx \
205209
prove ${{ matrix.sanitize-ok }}
206-
210+

.github/workflows/no-malloc.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: No Malloc Tests
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
make_check:
8+
strategy:
9+
matrix:
10+
config: [
11+
# Add new configs here
12+
'--enable-rsa --enable-keygen --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC"',
13+
]
14+
name: make check
15+
runs-on: ubuntu-latest
16+
# This should be a safe limit for the tests to run.
17+
timeout-minutes: 6
18+
steps:
19+
- uses: actions/checkout@v4
20+
name: Checkout wolfSSL
21+
22+
- name: Test wolfSSL
23+
run: |
24+
./autogen.sh
25+
./configure ${{ matrix.config }}
26+
make
27+
./wolfcrypt/test/testwolfcrypt
28+
29+
- name: Print errors
30+
if: ${{ failure() }}
31+
run: |
32+
if [ -f test-suite.log ] ; then
33+
cat test-suite.log
34+
fi

.github/workflows/ocsp.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: OCSP Test
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
ocsp_stapling:
8+
name: ocsp stapling
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 10
11+
steps:
12+
- name: Checkout wolfSSL
13+
uses: actions/checkout@v4
14+
15+
- name: Build wolfSSL
16+
run: autoreconf -ivf && ./configure --enable-ocsp --enable-ocspstapling && make
17+
18+
- name: Start OCSP responder 1
19+
run: openssl ocsp -port 22221 -ndays 1000 -index certs/ocsp/index-intermediate1-ca-issued-certs.txt -rsigner certs/ocsp/ocsp-responder-cert.pem -rkey certs/ocsp/ocsp-responder-key.pem -CA certs/ocsp/intermediate1-ca-cert.pem &
20+
21+
- name: Start OCSP responder 2
22+
run: openssl ocsp -port 22220 -ndays 1000 -index certs/ocsp/index-ca-and-intermediate-cas.txt -rsigner certs/ocsp/ocsp-responder-cert.pem -rkey certs/ocsp/ocsp-responder-key.pem -CA certs/ocsp/root-ca-cert.pem &
23+
24+
- name: Start TLS server
25+
run: ./examples/server/server -p 11111 -c ./certs/ocsp/server1-cert.pem -k ./certs/ocsp/server1-key.pem -d &
26+
27+
- name: Test Look Up
28+
run: ./examples/client/client -A ./certs/ocsp/root-ca-cert.pem -o

.github/workflows/openvpn.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
name: ${{ matrix.ref }}
3535
runs-on: ubuntu-latest
3636
# This should be a safe limit for the tests to run.
37-
timeout-minutes: 6
37+
timeout-minutes: 10
3838
needs: build_wolfssl
3939
steps:
4040
- name: Download lib
@@ -50,10 +50,14 @@ jobs:
5050
linux-libc-dev man2html libcmocka-dev python3-docutils \
5151
libtool automake autoconf libnl-genl-3-dev libnl-genl-3-200
5252
53+
- name: workaround high-entropy ASLR
54+
# not needed after either an update to llvm or runner is done
55+
run: sudo sysctl vm.mmap_rnd_bits=28
56+
5357
- if: ${{ matrix.ref != 'master' }}
5458
name: Build and test openvpn with fsanitize
5559
run: |
56-
echo 'extra_c_flags=CFLAGS="-fsanitize=address -fno-omit-frame-pointer -O2"' >> $GITHUB_ENV
60+
echo 'extra_c_flags=CC="gcc -fsanitize=address" CFLAGS="-fno-omit-frame-pointer -O2"' >> $GITHUB_ENV
5761
5862
- name: Build and test openvpn
5963
uses: wolfSSL/actions-build-autotools-project@v1

.gitignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,19 @@ snifftest
8282
output
8383
mcapi/test
8484
testsuite/testsuite
85-
tests/unit
8685
testsuite/testsuite.test
86+
testsuite/*.der
87+
testsuite/*.pem
88+
testsuite/*.raw
89+
testsuite/*.obj
90+
testsuite/*.pdb
91+
testsuite/*.idb
92+
tests/unit
8793
tests/unit.test
8894
tests/bio_write_test.txt
8995
tests/test-log-dump-to-file.txt
9096
tests/cert_cache.tmp
9197
test-write-dhparams.pem
92-
testsuite/*.der
93-
testsuite/*.pem
94-
testsuite/*.raw
9598
cert.der
9699
cert.pem
97100
certecc.der
@@ -402,7 +405,7 @@ XXX-fips-test
402405
# Generated user_settings_asm.h.
403406
user_settings_asm.h
404407

405-
# VisualGD
408+
# VisualGDB
406409
**/.visualgdb
407410

408411
# Espressif sdk config default should be saved in sdkconfig.defaults

CMakeLists.txt

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
2828
You must delete them, or cmake will refuse to work.")
2929
endif()
3030

31-
project(wolfssl VERSION 5.6.6 LANGUAGES C ASM)
31+
project(wolfssl VERSION 5.7.0 LANGUAGES C ASM)
3232

3333
# Set WOLFSSL_ROOT if not already defined
3434
if ("${WOLFSSL_ROOT}" STREQUAL "")
@@ -42,16 +42,19 @@ else()
4242
endif()
4343

4444
# shared library versioning
45-
# increment if interfaces have been added, removed or changed
46-
set(LIBTOOL_CURRENT 42)
47-
# increment if source code has changed set to zero if current is incremented
48-
set(LIBTOOL_REVISION 0)
49-
# increment if interfaces have been added set to zero if interfaces have been
50-
# removed or changed
51-
set(LIBTOOL_AGE 0)
45+
# increment if interfaces have been removed or changed
46+
set(WOLFSSL_LIBRARY_VERSION_FIRST 42)
5247

53-
math(EXPR LIBTOOL_SO_VERSION "${LIBTOOL_CURRENT} - ${LIBTOOL_AGE}")
54-
set(LIBTOOL_FULL_VERSION ${LIBTOOL_SO_VERSION}.${LIBTOOL_AGE}.${LIBTOOL_REVISION})
48+
# increment if interfaces have been added
49+
# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented
50+
set(WOLFSSL_LIBRARY_VERSION_SECOND 1)
51+
52+
# increment if source code has changed
53+
# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented or
54+
# WOLFSSL_LIBRARY_VERSION_SECOND is incremented
55+
set(WOLFSSL_LIBRARY_VERSION_THIRD 0)
56+
57+
set(LIBTOOL_FULL_VERSION ${WOLFSSL_LIBRARY_VERSION_FIRST}.${WOLFSSL_LIBRARY_VERSION_SECOND}.${WOLFSSL_LIBRARY_VERSION_THIRD})
5558

5659
set(WOLFSSL_DEFINITIONS)
5760
set(WOLFSSL_LINK_LIBS)
@@ -1213,6 +1216,14 @@ if(WOLFSSL_OPENSSH OR
12131216
override_cache(WOLFSSL_DES3 "yes")
12141217
endif()
12151218

1219+
# DES3 TLS Suites
1220+
set(WOLFSSL_DES3_TLS_SUITES_STRING "Enable DES3 TLS cipher suites (default: disabled)")
1221+
add_option("WOLFSSL_DES3_TLS_SUITES" ${WOLFSSL_DES3_TLS_SUITES_STRING} "no" "yes;no")
1222+
1223+
if(NOT WOLFSSL_DES3_TLS_SUITES)
1224+
list(APPEND WOLFSSL_DEFINITIONS "-DNO_DES3_TLS_SUITES")
1225+
endif()
1226+
12161227
# ARC4
12171228
set(WOLFSSL_ARC4_HELP_STRING "Enable ARC4 (default: disabled)")
12181229
add_option("WOLFSSL_ARC4" ${WOLFSSL_ARC4_HELP_STRING} "no" "yes;no")
@@ -2210,7 +2221,7 @@ endif()
22102221

22112222
set_target_properties(wolfssl
22122223
PROPERTIES
2213-
SOVERSION ${LIBTOOL_SO_VERSION}
2224+
SOVERSION ${WOLFSSL_LIBRARY_VERSION_FIRST}
22142225
VERSION ${LIBTOOL_FULL_VERSION}
22152226
)
22162227

ChangeLog.md

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,97 @@
1-
# wolfSSL Release X.Y.Z (TBD)
1+
# wolfSSL Release 5.7.0 (Mar 20, 2024)
2+
3+
Release 5.7.0 has been developed according to wolfSSL's development and QA
4+
process (see link below) and successfully passed the quality criteria.
5+
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
6+
7+
NOTE: * --enable-heapmath is being deprecated and will be removed by end of 2024
8+
9+
NOTE: In future releases, --enable-des3 (which is disabled by default) will be insufficient in itself to enable DES3 in TLS cipher suites. A new option, --enable-des3-tls-suites, will need to be supplied in addition. This option should only be used in backward compatibility scenarios, as it is inherently insecure.
210

311
NOTE: This release switches the default ASN.1 parser to the new ASN template code. If the original ASN.1 code is preferred define `WOLFSSL_ASN_ORIGINAL` to use it. See PR #7199.
412

13+
14+
## Vulnerabilities
15+
* [High] CVE-2024-0901 Potential denial of service and out of bounds read. Affects TLS 1.3 on the server side when accepting a connection from a malicious TLS 1.3 client. If using TLS 1.3 on the server side it is recommended to update the version of wolfSSL used. Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7099
16+
17+
18+
* [Med] CVE-2024-1545 Fault Injection vulnerability in RsaPrivateDecryption function that potentially allows an attacker that has access to the same system with a victims process to perform a Rowhammer fault injection. Thanks to Junkai Liang, Zhi Zhang, Xin Zhang, Qingni Shen for the report (Peking University, The University of Western Australia)."
19+
Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7167
20+
21+
22+
* [Med] Fault injection attack with EdDSA signature operations. This affects ed25519 sign operations where the system could be susceptible to Rowhammer attacks. Thanks to Junkai Liang, Zhi Zhang, Xin Zhang, Qingni Shen for the report (Peking University, The University of Western Australia).
23+
Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7212
24+
25+
26+
## New Feature Additions
27+
28+
* Added --enable-experimental configure flag to gate out features that are currently experimental. Now liboqs, kyber, lms, xmss, and dual-alg-certs require the --enable-experimental flag.
29+
30+
### POST QUANTUM SUPPORT ADDITIONS
31+
* Experimental framework for using wolfSSL’s XMSS implementation (PR 7161)
32+
* Experimental framework for using wolfSSL’s LMS implementation (PR 7283)
33+
* Experimental wolfSSL Kyber implementation and assembly optimizations, enabled with --enable-experimental --enable-kyber (PR 7318)
34+
* Experimental support for post quantum dual key/signature certificates. A few known issues and sanitizer checks are in progress with this feature. Enabled with the configure flags --enable-experimental --enable-dual-alg-certs (PR 7112)
35+
* CryptoCb support for PQC algorithms (PR 7110)
36+
37+
### OTHER FEATURE ADDITIONS
38+
* The Linux kernel module now supports registration of AES-GCM, AES-XTS, AES-CBC, and AES-CFB with the kernel cryptosystem through the new --enable-linuxkm-lkcapi-register option, enabling automatic use of wolfCrypt implementations by the dm-crypt/luks and ESP subsystems. In particular, wolfCrypt AES-XTS with –enable-aesni is faster than the native kernel implementation.
39+
* CryptoCb hook to one-shot CMAC functions (PR 7059)
40+
* BER content streaming support for PKCS7_VerifySignedData and sign/encrypt operations (PR 6961 & 7184)
41+
* IoT-Safe SHA-384 and SHA-512 support (PR 7176)
42+
* I/O callbacks for content and output with PKCS7 bundle sign/encrypt to reduce peak memory usage (PR 7272)
43+
* Microchip PIC24 support and example project (PR 7151)
44+
* AutoSAR shim layer for RNG, SHA256, and AES (PR 7296)
45+
* wolfSSL_CertManagerUnloadIntermediateCerts API to clear intermediate certs added to certificate store (PR 7245)
46+
* Implement SSL_get_peer_signature_nid and SSL_get_peer_signature_type_nid (PR 7236)
47+
48+
49+
## Enhancements and Optimizations
50+
51+
* Remove obsolete user-crypto functionality and Intel IPP support (PR 7097)
52+
* Support for RSA-PSS signatures with CRL use (PR 7119)
53+
* Enhancement for AES-GCM use with Xilsecure on Microblaze (PR 7051)
54+
* Support for crypto cb only build with ECC and NXP CAAM (PR 7269)
55+
* Improve liboqs integration adding locking and init/cleanup functions (PR 7026)
56+
* Prevent memory access before clientSession->serverRow and clientSession->serverIdx are sanitized (PR 7096)
57+
* Enhancements to reproducible build (PR 7267)
58+
* Update Arduino example TLS Client/Server and improve support for ESP32 (PR 7304 & 7177)
59+
* XC32 compiler version 4.x compatibility (PR 7128)
60+
* Porting for build on PlayStation 3 and 4 (PR 7072)
61+
* Improvements for Espressif use; SHA HW/SW selection and use on ESP32-C2/ESP8684, wolfSSL_NewThread() type, component cmake fix, and update TLS client example for ESP8266 (PR 7081, 7173, 7077, 7148, 7240)
62+
* Allow crypto callbacks with SHA-1 HW (PR 7087)
63+
* Update OpenSSH port to version 9.6p1(PR 7203)
64+
* ARM Thumb2 enhancements, AES-GCM support for GCM_SMALL, alignment fix on key, fix for ASM clobber list (PR 7291,7301,7221)
65+
* Expand heap hint support for static memory build with more x509 functions (PR 7136)
66+
* Improving ARMv8 ChaCha20 ASM (alignment) (PR 7182)
67+
* Unknown extension callback wolfSSL_CertManagerSetUnknownExtCallback added to CertManager (PR 7194)
68+
* Implement wc_rng_new_ex for use with devID’s with crypto callback (PR 7271)
69+
* Allow reading 0-RTT data after writing 0.5-RTT data (PR 7102)
70+
* Send alert on bad PSK binder error (PR 7235)
71+
* Enhancements to CMake build files for use with cross compiling (PR 7188)
72+
73+
74+
## Fixes
75+
76+
* Fix for checking result of MAC verify when no AAD is used with AES-GCM and Xilinx Xilsecure (PR 7051)
77+
* Fix for Aria sign use (PR 7082)
78+
* Fix for invalid `dh_ffdhe_test` test case using Intel QuickAssist (PR 7085)
79+
* Fixes for TI AES and SHA on TM4C with HW acceleration and add full AES GCM and CCM support with TLS (PR 7018)
80+
* Fixes for STM32 PKA use with ECC (PR 7098)
81+
* Fixes for TLS 1.3 with crypto callbacks to offload KDF / HMAC operation (PR 7070)
82+
* Fix include path for FSP 3.5 on Renesas RA6M4 (PR 7101)
83+
* Siphash x64 asm fix for use with older compilers (PR 7299)
84+
* Fix for SGX build with SP (PR 7308)
85+
* Fix to Make it mandatory that the cookie is sent back in new ClientHello when seen in a HelloRetryRequest with (PR 7190)
86+
* Fix for wrap around behavior with BIO pairs (PR 7169)
87+
* OCSP fixes for parsing of response correctly when there was a revocation reason and returning correct error value with date checks (PR 7241 & 7255)
88+
* Fix build with `NO_STDIO_FILESYSTEM` and improve checks for `XGETENV` (PR 7150)
89+
* Fix for DTLS sequence number and cookie when downgrading DTLS version (PR 7214)
90+
* Fix for write_dup use with chacha-poly cipher suites (PR 7206)
91+
* Fix for multiple handshake messages in one record failing with OUT_OF_ORDER_E when downgrading from TLS 1.3 to TLS 1.2 (PR 7141)
92+
* Fix for AES ECB build with Thumb and alignment (PR 7094)
93+
* Fix for negotiate handshake until the end in wolfSSL_read/wolfSSL_write if hitting an edge case with want read/write (PR 7237)
94+
595
# wolfSSL Release 5.6.6 (Dec 19, 2023)
696

797
Release 5.6.6 has been developed according to wolfSSL's development and QA

0 commit comments

Comments
 (0)