This version fixes a few security issues related to DTLS and handshake message length. It also defines the size of psBool_t to be equivalent to bool on both x86 and ARM platforms.
TLS:
Fixed vulenerabilities and bugs related to DTLS discovered by Jakub Botwicz (Samsung R&D Poland).
Limited handshake message length.
Crypto
This version fixes an out of bounds read in ASN.1 handling found by Tyler Nighswander (ForAllSecure).
This version adds a compile-time option that allows TLS 1.3 only builds, adds new getter APIs and fixes several bugs.
TLS:
Allow TLS 1.3 only builds by introducing the USE_TLS_1_3_ONLY compile-time option. This significantly reduces the minimum code footprint of TLS 1.3 builds. The example configuration tls13-minimal makes use of the new compile-time option.
Add the matrixSslGetUserPtr API. This getter API should be used instead of raw access to ssl->userPtr.
Added the matrixSslGetNegotiatedCiphersuite and matrixSslGetActiveCiphersuite APIs.
Added the matrixSslGetMasterSecret API. This API requires the ENABLE_MASTER_SECRET_EXPORT compile-time option, which is disabled by default.
Completely remove support for TLS record compression (unifdef USE_ZLIB_COMPRESSION). TLS record compression is almost never used in practice due to serious vulnerabilities associated with the feature (see e.g. the CRIME attack).
Fixed a bug where decrypting an alert in TLS 1.3 could cause matrixSslProcessed data to erroneously indicate that there is more application data to process.
Allow storing the unparsed certificate DER octets (in the unparsedBin member of psX509Cert_t) even in TLS 1.3.
Fix segfault when receiving a server certificate without the commonName component.
Fixed handshake failure with some clients that attempted to use a TLS 1.2 session ticket in a TLS 1.3 connection.
Fix build error with the USE_EXT_CERTIFICATE_VERIFY_SIGNING compile-time option.
Fix sslTest failure when using the USE_EXT_CERTIFICATE_VERIFY_SIGNING compile-time option.
Fix a bug that caused the server to sometimes select a TLS 1.3 ciphersuite even when TLS 1.2 or below had been negotiated.
Add Ed25519 test keys and certificates.
Add Ed25519 testing to sslTest. (Note that Ed25519 is only supported in TLS 1.3.)
Crypto:
(FIPS Edition only): Fix a bug that prevented verification of RSA-SHA-1 signatures in FIPS mode. FIPS 140-2 allows verification of SHA-1 based signatures, but forbids generating such signatures.
Store the order of DN attributes in certificate subject and issuer fields.
Add an option to the psX509GetOnelineDN API that allows printing the DN attributes in the original order they were encoded in the parsed certificate.
Fix parsing of Ed25519 certificates.
Fix parsing of ECDSA-SHA224 certificates.
TLS:
(RoT Edition only): Added support for Inside Secure VaultIP (Root-of-Trust) crypto provider.
Improved the separation of private and public TLS header files for better private-public separation. The public headers now of the form matrixsslApi*.h, while private headers are of the form matrixssllib_*.h.
Added client-side support for X25519 in TLS 1.2.
Added client-side support for RSASSA-PSS signatures in TLS 1.2.
Added support for RSASSA-PSS key/cert pairs.
Fix vulnerabilities reported by Robert Święcki (discovered using Hongfuzzer): a server-side heap buffer read overflow when parsing maliciously crafted ClientHello extensions and a segfault in TLS 1.2 GCM decryption of maliciously crafted records with small ciphertext.
Added the simpleClient.c and simpleServer.c example applications. These are intended as minimalistic examples of how to use the top-level TLS API.
Fixed bugs in matrixSslSessOptsServerTlsVersionRange and matrixSslSessOptsClientTlsVersionRange.
Fixed bug that caused non-insitu app data encryption to fail in tls13EncodeAppData when using the matrixSslEncodeToOutdata API instead of the more standard matrixSslGetWriteBuf + matrixSslEncodeWritebuf pattern.
Added new minimal example configurations: tls12-minimal, tls12-minimal-client-ecc, tls13-minimal, tls13-minimal-client-ecc
When performing TLS 1.2 renegotiation, re-send the original ClientHello cipher list.
Added the USE_LENIENT_TLS_RECORD_VERSION_MATCHING compatibility option.
This version fixes a critical vulnerability in RSA signature verification. A maliciously crafted certificate can be used to trigger a stack buffer overflow, allowing potential remote code execution attacks. The vulnerability only affects version 4.0.1 and the standard Matrix Crypto provider. Other providers, such as the FIPS crypto provider, are not affected by the bug. Thanks to Tavis Ormandy for reporting this.
This version improves the security of RSA PKCS #1.5 signature verification and adds better support for run-time security configuration.
TLS:
Added a run-time security callback feature (matrixSslRegisterSecurityCallback). The security callback can allow or deny a cryptographic operation based on the operation type and the key size. Currently only authentication and key exchange operations are supported. The default security callback supports pre-defined security profiles (matrixSslSetSecurityProfile).
Added an example security profile: WPA3 1.0 Enterprise 192-bit mode restrictions for EAP-TLS.
Added support for the TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 ciphersuite.
Changed the way how protocol version IDs are stored internally and rewrote most of the version negotiation code. This is almost entirely an internal code refactoring. To the API user, the only visible change is that version selection APIs now take in an argument of type psProtocolVersion_t instead of int32_t. See the API reference guide for details.
Refactored ServerKeyExchange signature generation and verification code.
Crypto:
Changed from a parsing-based to a comparison-based approach in DigestInfo validation when verifying RSA PKCS #1.5 signatures. There are no known practical attacks against the old code, but the comparison-based approach is theoretically more sound. Thanks to Sze Yiu Chau from Purdue University for pointing this out.
(MatrixSSL FIPS Edition only:) Fix DH key exchange when using DH parameter files containing optional privateValueLength argument.
psX509AuthenticateCert now uses the common psVerifySig API for signature verification. Previously, CRLs and certificates used different code paths for signature verification.
This version adds support for RFC 8446 (TLS 1.3), new APIs for configuring session options as well as fixes to security vulnerabilities.
TLS:
Crypto:
X.509 and PKCS standards
Other changes
Known issues