1817466cbSJens Wiklandermbed TLS ChangeLog (Sorted per branch, date) 2817466cbSJens Wiklander 3*7901324dSJerome Forissier= mbed TLS 2.27.0 branch released 2021-07-07 4*7901324dSJerome Forissier 5*7901324dSJerome ForissierAPI changes 6*7901324dSJerome Forissier * Update AEAD output size macros to bring them in line with the PSA Crypto 7*7901324dSJerome Forissier API version 1.0 spec. This version of the spec parameterizes them on the 8*7901324dSJerome Forissier key type used, as well as the key bit-size in the case of 9*7901324dSJerome Forissier PSA_AEAD_TAG_LENGTH. 10*7901324dSJerome Forissier The old versions of these macros were renamed and deprecated as follows: 11*7901324dSJerome Forissier - PSA_AEAD_TAG_LENGTH -> PSA_AEAD_TAG_LENGTH_1_ARG 12*7901324dSJerome Forissier - PSA_AEAD_ENCRYPT_OUTPUT_SIZE -> PSA_AEAD_ENCRYPT_OUTPUT_SIZE_2_ARG 13*7901324dSJerome Forissier - PSA_AEAD_DECRYPT_OUTPUT_SIZE -> PSA_AEAD_DECRYPT_OUTPUT_SIZE_2_ARG 14*7901324dSJerome Forissier - PSA_AEAD_UPDATE_OUTPUT_SIZE -> PSA_AEAD_UPDATE_OUTPUT_SIZE_2_ARG 15*7901324dSJerome Forissier - PSA_AEAD_FINISH_OUTPUT_SIZE -> PSA_AEAD_FINISH_OUTPUT_SIZE_1_ARG 16*7901324dSJerome Forissier - PSA_AEAD_VERIFY_OUTPUT_SIZE -> PSA_AEAD_VERIFY_OUTPUT_SIZE_1_ARG 17*7901324dSJerome Forissier * Implement one-shot cipher functions, psa_cipher_encrypt and 18*7901324dSJerome Forissier psa_cipher_decrypt, according to the PSA Crypto API 1.0.0 19*7901324dSJerome Forissier specification. 20*7901324dSJerome Forissier 21*7901324dSJerome ForissierRequirement changes 22*7901324dSJerome Forissier * The library now uses the %zu format specifier with the printf() family of 23*7901324dSJerome Forissier functions, so requires a toolchain that supports it. This change does not 24*7901324dSJerome Forissier affect the maintained LTS branches, so when contributing changes please 25*7901324dSJerome Forissier bear this in mind and do not add them to backported code. 26*7901324dSJerome Forissier 27*7901324dSJerome ForissierFeatures 28*7901324dSJerome Forissier * Add mbedtls_rsa_rsassa_pss_sign_ext() function allowing to generate a 29*7901324dSJerome Forissier signature with a specific salt length. This function allows to validate 30*7901324dSJerome Forissier test cases provided in the NIST's CAVP test suite. Contributed by Cédric 31*7901324dSJerome Forissier Meuter in PR #3183. 32*7901324dSJerome Forissier * Added support for built-in driver keys through the PSA opaque crypto 33*7901324dSJerome Forissier driver interface. Refer to the documentation of 34*7901324dSJerome Forissier MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS for more information. 35*7901324dSJerome Forissier * Implement psa_sign_message() and psa_verify_message(). 36*7901324dSJerome Forissier * The new function mbedtls_mpi_random() generates a random value in a 37*7901324dSJerome Forissier given range uniformly. 38*7901324dSJerome Forissier * Implement psa_mac_compute() and psa_mac_verify() as defined in the 39*7901324dSJerome Forissier PSA Cryptograpy API 1.0.0 specification. 40*7901324dSJerome Forissier * MBEDTLS_ECP_MAX_BITS is now determined automatically from the configured 41*7901324dSJerome Forissier curves and no longer needs to be configured explicitly to save RAM. 42*7901324dSJerome Forissier 43*7901324dSJerome ForissierSecurity 44*7901324dSJerome Forissier * Fix a bias in the generation of finite-field Diffie-Hellman-Merkle (DHM) 45*7901324dSJerome Forissier private keys and of blinding values for DHM and elliptic curves (ECP) 46*7901324dSJerome Forissier computations. Reported by FlorianF89 in #4245. 47*7901324dSJerome Forissier * Fix a potential side channel vulnerability in ECDSA ephemeral key generation. 48*7901324dSJerome Forissier An adversary who is capable of very precise timing measurements could 49*7901324dSJerome Forissier learn partial information about the leading bits of the nonce used for the 50*7901324dSJerome Forissier signature, allowing the recovery of the private key after observing a 51*7901324dSJerome Forissier large number of signature operations. This completes a partial fix in 52*7901324dSJerome Forissier Mbed TLS 2.20.0. 53*7901324dSJerome Forissier * It was possible to configure MBEDTLS_ECP_MAX_BITS to a value that is 54*7901324dSJerome Forissier too small, leading to buffer overflows in ECC operations. Fail the build 55*7901324dSJerome Forissier in such a case. 56*7901324dSJerome Forissier * An adversary with access to precise enough information about memory 57*7901324dSJerome Forissier accesses (typically, an untrusted operating system attacking a secure 58*7901324dSJerome Forissier enclave) could recover an RSA private key after observing the victim 59*7901324dSJerome Forissier performing a single private-key operation. Found and reported by 60*7901324dSJerome Forissier Zili KOU, Wenjian HE, Sharad Sinha, and Wei ZHANG. 61*7901324dSJerome Forissier * An adversary with access to precise enough timing information (typically, a 62*7901324dSJerome Forissier co-located process) could recover a Curve25519 or Curve448 static ECDH key 63*7901324dSJerome Forissier after inputting a chosen public key and observing the victim performing the 64*7901324dSJerome Forissier corresponding private-key operation. Found and reported by Leila Batina, 65*7901324dSJerome Forissier Lukas Chmielewski, Björn Haase, Niels Samwel and Peter Schwabe. 66*7901324dSJerome Forissier 67*7901324dSJerome ForissierBugfix 68*7901324dSJerome Forissier * Add printf function attributes to mbedtls_debug_print_msg to ensure we 69*7901324dSJerome Forissier get printf format specifier warnings. 70*7901324dSJerome Forissier * Fix premature fopen() call in mbedtls_entropy_write_seed_file which may 71*7901324dSJerome Forissier lead to seed file corruption in the case where the path to the seed file is 72*7901324dSJerome Forissier equal to MBEDTLS_PLATFORM_STD_NV_SEED_FILE. Contributed by Victor 73*7901324dSJerome Forissier Krasnoshchok in #3616. 74*7901324dSJerome Forissier * PSA functions other than psa_open_key now return PSA_ERROR_INVALID_HANDLE 75*7901324dSJerome Forissier rather than PSA_ERROR_DOES_NOT_EXIST for an invalid handle, bringing them 76*7901324dSJerome Forissier in line with version 1.0.0 of the specification. Fix #4162. 77*7901324dSJerome Forissier * PSA functions creating a key now return PSA_ERROR_INVALID_ARGUMENT rather 78*7901324dSJerome Forissier than PSA_ERROR_INVALID_HANDLE when the identifier specified for the key 79*7901324dSJerome Forissier to create is not valid, bringing them in line with version 1.0.0 of the 80*7901324dSJerome Forissier specification. Fix #4271. 81*7901324dSJerome Forissier * Fix some cases in the bignum module where the library constructed an 82*7901324dSJerome Forissier unintended representation of the value 0 which was not processed 83*7901324dSJerome Forissier correctly by some bignum operations. This could happen when 84*7901324dSJerome Forissier mbedtls_mpi_read_string() was called on "-0", or when 85*7901324dSJerome Forissier mbedtls_mpi_mul_mpi() and mbedtls_mpi_mul_int() was called with one of 86*7901324dSJerome Forissier the arguments being negative and the other being 0. Fixes #4643. 87*7901324dSJerome Forissier * Fix a bug in ECDSA that would cause it to fail when the hash is all-bits 88*7901324dSJerome Forissier zero. Fixes #1792 89*7901324dSJerome Forissier * Fix a compilation error when MBEDTLS_ECP_RANDOMIZE_MXZ_ALT is 90*7901324dSJerome Forissier defined. Fixes #4217. 91*7901324dSJerome Forissier * Fix an incorrect error code when parsing a PKCS#8 private key. 92*7901324dSJerome Forissier * In a TLS client, enforce the Diffie-Hellman minimum parameter size 93*7901324dSJerome Forissier set with mbedtls_ssl_conf_dhm_min_bitlen() precisely. Before, the 94*7901324dSJerome Forissier minimum size was rounded down to the nearest multiple of 8. 95*7901324dSJerome Forissier * In library/net_sockets.c, _POSIX_C_SOURCE and _XOPEN_SOURCE are 96*7901324dSJerome Forissier defined to specific values. If the code is used in a context 97*7901324dSJerome Forissier where these are already defined, this can result in a compilation 98*7901324dSJerome Forissier error. Instead, assume that if they are defined, the values will 99*7901324dSJerome Forissier be adequate to build Mbed TLS. 100*7901324dSJerome Forissier * The cipher suite TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384 was not available 101*7901324dSJerome Forissier when SHA-1 was disabled and was offered when SHA-1 was enabled but SHA-384 102*7901324dSJerome Forissier was disabled. Fix the dependency. Fixes #4472. 103*7901324dSJerome Forissier * Do not offer SHA384 cipher suites when SHA-384 is disabled. Fixes #4499. 104*7901324dSJerome Forissier * With MBEDTLS_PSA_CRYPTO_C disabled, some functions were getting built 105*7901324dSJerome Forissier nonetheless, resulting in undefined reference errors when building a 106*7901324dSJerome Forissier shared library. Reported by Guillermo Garcia M. in #4411. 107*7901324dSJerome Forissier * Fix test suite code on platforms where int32_t is not int, such as 108*7901324dSJerome Forissier Arm Cortex-M. Fixes #4530. 109*7901324dSJerome Forissier * Fix some issues affecting MBEDTLS_ARIA_ALT implementations: a misplaced 110*7901324dSJerome Forissier directive in a header and a missing initialization in the self-test. 111*7901324dSJerome Forissier * Fix a missing initialization in the Camellia self-test, affecting 112*7901324dSJerome Forissier MBEDTLS_CAMELLIA_ALT implementations. 113*7901324dSJerome Forissier * Restore the ability to configure PSA via Mbed TLS options to support RSA 114*7901324dSJerome Forissier key pair operations but exclude RSA key generation. When MBEDTLS_GENPRIME 115*7901324dSJerome Forissier is not defined PSA will no longer attempt to use mbedtls_rsa_gen_key(). 116*7901324dSJerome Forissier Fixes #4512. 117*7901324dSJerome Forissier * Fix a regression introduced in 2.24.0 which broke (D)TLS CBC ciphersuites 118*7901324dSJerome Forissier (when the encrypt-then-MAC extension is not in use) with some ALT 119*7901324dSJerome Forissier implementations of the underlying hash (SHA-1, SHA-256, SHA-384), causing 120*7901324dSJerome Forissier the affected side to wrongly reject valid messages. Fixes #4118. 121*7901324dSJerome Forissier * Remove outdated check-config.h check that prevented implementing the 122*7901324dSJerome Forissier timing module on Mbed OS. Fixes #4633. 123*7901324dSJerome Forissier * Fix PSA_ALG_TLS12_PRF and PSA_ALG_TLS12_PSK_TO_MS being too permissive 124*7901324dSJerome Forissier about missing inputs. 125*7901324dSJerome Forissier * Fix mbedtls_net_poll() and mbedtls_net_recv_timeout() often failing with 126*7901324dSJerome Forissier MBEDTLS_ERR_NET_POLL_FAILED on Windows. Fixes #4465. 127*7901324dSJerome Forissier * Fix a resource leak in a test suite with an alternative AES 128*7901324dSJerome Forissier implementation. Fixes #4176. 129*7901324dSJerome Forissier * Fix a crash in mbedtls_mpi_debug_mpi on a bignum having 0 limbs. This 130*7901324dSJerome Forissier could notably be triggered by setting the TLS debug level to 3 or above 131*7901324dSJerome Forissier and using a Montgomery curve for the key exchange. Reported by lhuang04 132*7901324dSJerome Forissier in #4578. Fixes #4608. 133*7901324dSJerome Forissier * psa_verify_hash() was relying on implementation-specific behavior of 134*7901324dSJerome Forissier mbedtls_rsa_rsassa_pss_verify() and was causing failures in some _ALT 135*7901324dSJerome Forissier implementations. This reliance is now removed. Fixes #3990. 136*7901324dSJerome Forissier * Disallow inputs of length different from the corresponding hash when 137*7901324dSJerome Forissier signing or verifying with PSA_ALG_RSA_PSS (The PSA Crypto API mandates 138*7901324dSJerome Forissier that PSA_ALG_RSA_PSS uses the same hash throughout the algorithm.) 139*7901324dSJerome Forissier * Fix a null pointer dereference when mbedtls_mpi_exp_mod() was called with 140*7901324dSJerome Forissier A=0 represented with 0 limbs. Up to and including Mbed TLS 2.26, this bug 141*7901324dSJerome Forissier could not be triggered by code that constructed A with one of the 142*7901324dSJerome Forissier mbedtls_mpi_read_xxx functions (including in particular TLS code) since 143*7901324dSJerome Forissier those always built an mpi object with at least one limb. 144*7901324dSJerome Forissier Credit to OSS-Fuzz. Fixes #4641. 145*7901324dSJerome Forissier * Fix mbedtls_mpi_gcd(G,A,B) when the value of B is zero. This had no 146*7901324dSJerome Forissier effect on Mbed TLS's internal use of mbedtls_mpi_gcd(), but may affect 147*7901324dSJerome Forissier applications that call mbedtls_mpi_gcd() directly. Fixes #4642. 148*7901324dSJerome Forissier * The PSA API no longer allows the creation or destruction of keys with a 149*7901324dSJerome Forissier read-only lifetime. The persistence level PSA_KEY_PERSISTENCE_READ_ONLY 150*7901324dSJerome Forissier can now only be used as intended, for keys that cannot be modified through 151*7901324dSJerome Forissier normal use of the API. 152*7901324dSJerome Forissier * When MBEDTLS_PSA_CRYPTO_SPM is enabled, crypto_spe.h was not included 153*7901324dSJerome Forissier in all the right places. Include it from crypto_platform.h, which is 154*7901324dSJerome Forissier the natural place. Fixes #4649. 155*7901324dSJerome Forissier * mbedtls_pk_sign() and mbedtls_pk_verify() and their extended and 156*7901324dSJerome Forissier restartable variants now always honor the specified hash length if 157*7901324dSJerome Forissier nonzero. Before, for RSA, hash_len was ignored in favor of the length of 158*7901324dSJerome Forissier the specified hash algorithm. 159*7901324dSJerome Forissier * Fix which alert is sent in some cases to conform to the 160*7901324dSJerome Forissier applicable RFC: on an invalid Finished message value, an 161*7901324dSJerome Forissier invalid max_fragment_length extension, or an 162*7901324dSJerome Forissier unsupported extension used by the server. 163*7901324dSJerome Forissier * Correct (change from 12 to 13 bytes) the value of the macro describing the 164*7901324dSJerome Forissier maximum nonce length returned by psa_aead_generate_nonce(). 165*7901324dSJerome Forissier 166*7901324dSJerome ForissierChanges 167*7901324dSJerome Forissier * Add extra printf compiler warning flags to builds. 168*7901324dSJerome Forissier * Fix memsan build false positive in x509_crt.c with Clang 11 169*7901324dSJerome Forissier * Fix the setting of the read timeout in the DTLS sample programs. 170*7901324dSJerome Forissier * Remove the AES sample application programs/aes/aescrypt2 which shows 171*7901324dSJerome Forissier bad cryptographic practice. Fix #1906. 172*7901324dSJerome Forissier * Alternative implementations of CMAC may now opt to not support 3DES as a 173*7901324dSJerome Forissier CMAC block cipher, and still pass the CMAC self test. 174*7901324dSJerome Forissier * Remove configs/config-psa-crypto.h, which was identical to the default 175*7901324dSJerome Forissier configuration except for having some extra cryptographic mechanisms 176*7901324dSJerome Forissier enabled and for unintended differences. This configuration was primarily 177*7901324dSJerome Forissier intended to demonstrate the PSA API, and lost most of its usefulness when 178*7901324dSJerome Forissier MBEDTLS_PSA_CRYPTO_C became enabled by default. 179*7901324dSJerome Forissier * When building the test suites with GNU make, invoke python3 or python, not 180*7901324dSJerome Forissier python2, which is no longer supported upstream. 181*7901324dSJerome Forissier * When using session cache based session resumption on the server, 182*7901324dSJerome Forissier double-check that custom session cache implementations return 183*7901324dSJerome Forissier sessions which are consistent with the negotiated ciphersuite 184*7901324dSJerome Forissier and compression method. 185*7901324dSJerome Forissier * Fix build failure on MinGW toolchain when __USE_MING_ANSI_STDIO is on. 186*7901324dSJerome Forissier When that flag is on, standard GNU C printf format specifiers 187*7901324dSJerome Forissier should be used. 188*7901324dSJerome Forissier * Reduce the default value of MBEDTLS_ECP_WINDOW_SIZE. This reduces RAM usage 189*7901324dSJerome Forissier during ECC operations at a negligible performance cost. 190*7901324dSJerome Forissier * mbedtls_mpi_read_binary(), mbedtls_mpi_read_binary_le() and 191*7901324dSJerome Forissier mbedtls_mpi_read_string() now construct an mbedtls_mpi object with 0 limbs 192*7901324dSJerome Forissier when their input has length 0. Note that this is an implementation detail 193*7901324dSJerome Forissier and can change at any time, so this change should be transparent, but it 194*7901324dSJerome Forissier may result in mbedtls_mpi_write_binary() or mbedtls_mpi_write_string() 195*7901324dSJerome Forissier now writing an empty string where it previously wrote one or more 196*7901324dSJerome Forissier zero digits when operating from values constructed with an mpi_read 197*7901324dSJerome Forissier function and some mpi operations. 198*7901324dSJerome Forissier * Implicitly add PSA_KEY_USAGE_SIGN_MESSAGE key usage policy flag when 199*7901324dSJerome Forissier PSA_KEY_USAGE_SIGN_HASH flag is set and PSA_KEY_USAGE_VERIFY_MESSAGE flag 200*7901324dSJerome Forissier when PSA_KEY_USAGE_VERIFY_HASH flag is set. This usage flag extension 201*7901324dSJerome Forissier is also applied when loading a key from storage. 202*7901324dSJerome Forissier 203*7901324dSJerome Forissier= mbed TLS 2.26.0 branch released 2021-03-08 204*7901324dSJerome Forissier 205*7901324dSJerome ForissierAPI changes 206*7901324dSJerome Forissier * Renamed the PSA Crypto API output buffer size macros to bring them in line 207*7901324dSJerome Forissier with version 1.0.0 of the specification. 208*7901324dSJerome Forissier * The API glue function mbedtls_ecc_group_of_psa() now takes the curve size 209*7901324dSJerome Forissier in bits rather than bytes, with an additional flag to indicate if the 210*7901324dSJerome Forissier size may have been rounded up to a whole number of bytes. 211*7901324dSJerome Forissier * Renamed the PSA Crypto API AEAD tag length macros to bring them in line 212*7901324dSJerome Forissier with version 1.0.0 of the specification. 213*7901324dSJerome Forissier 214*7901324dSJerome ForissierDefault behavior changes 215*7901324dSJerome Forissier * In mbedtls_rsa_context objects, the ver field was formerly documented 216*7901324dSJerome Forissier as always 0. It is now reserved for internal purposes and may take 217*7901324dSJerome Forissier different values. 218*7901324dSJerome Forissier 219*7901324dSJerome ForissierNew deprecations 220*7901324dSJerome Forissier * PSA_KEY_EXPORT_MAX_SIZE, PSA_HASH_SIZE, PSA_MAC_FINAL_SIZE, 221*7901324dSJerome Forissier PSA_BLOCK_CIPHER_BLOCK_SIZE, PSA_MAX_BLOCK_CIPHER_BLOCK_SIZE and 222*7901324dSJerome Forissier PSA_ALG_TLS12_PSK_TO_MS_MAX_PSK_LEN have been renamed, and the old names 223*7901324dSJerome Forissier deprecated. 224*7901324dSJerome Forissier * PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH 225*7901324dSJerome Forissier have been renamed, and the old names deprecated. 226*7901324dSJerome Forissier 227*7901324dSJerome ForissierFeatures 228*7901324dSJerome Forissier * The PSA crypto subsystem can now use HMAC_DRBG instead of CTR_DRBG. 229*7901324dSJerome Forissier CTR_DRBG is used by default if it is available, but you can override 230*7901324dSJerome Forissier this choice by setting MBEDTLS_PSA_HMAC_DRBG_MD_TYPE at compile time. 231*7901324dSJerome Forissier Fix #3354. 232*7901324dSJerome Forissier * Automatic fallback to a software implementation of ECP when 233*7901324dSJerome Forissier MBEDTLS_ECP_xxx_ALT accelerator hooks are in use can now be turned off 234*7901324dSJerome Forissier through setting the new configuration flag MBEDTLS_ECP_NO_FALLBACK. 235*7901324dSJerome Forissier * The PSA crypto subsystem can now be configured to use less static RAM by 236*7901324dSJerome Forissier tweaking the setting for the maximum amount of keys simultaneously in RAM. 237*7901324dSJerome Forissier MBEDTLS_PSA_KEY_SLOT_COUNT sets the maximum number of volatile keys that 238*7901324dSJerome Forissier can exist simultaneously. It has a sensible default if not overridden. 239*7901324dSJerome Forissier * Partial implementation of the PSA crypto driver interface: Mbed TLS can 240*7901324dSJerome Forissier now use an external random generator instead of the library's own 241*7901324dSJerome Forissier entropy collection and DRBG code. Enable MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG 242*7901324dSJerome Forissier and see the documentation of mbedtls_psa_external_get_random() for details. 243*7901324dSJerome Forissier * Applications using both mbedtls_xxx and psa_xxx functions (for example, 244*7901324dSJerome Forissier applications using TLS and MBEDTLS_USE_PSA_CRYPTO) can now use the PSA 245*7901324dSJerome Forissier random generator with mbedtls_xxx functions. See the documentation of 246*7901324dSJerome Forissier mbedtls_psa_get_random() for details. 247*7901324dSJerome Forissier * In the PSA API, the policy for a MAC or AEAD algorithm can specify a 248*7901324dSJerome Forissier minimum MAC or tag length thanks to the new wildcards 249*7901324dSJerome Forissier PSA_ALG_AT_LEAST_THIS_LENGTH_MAC and 250*7901324dSJerome Forissier PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG. 251*7901324dSJerome Forissier 252*7901324dSJerome ForissierSecurity 253*7901324dSJerome Forissier * Fix a security reduction in CTR_DRBG when the initial seeding obtained a 254*7901324dSJerome Forissier nonce from entropy. Applications were affected if they called 255*7901324dSJerome Forissier mbedtls_ctr_drbg_set_nonce_len(), if they called 256*7901324dSJerome Forissier mbedtls_ctr_drbg_set_entropy_len() with a size that was 3/2 times the key 257*7901324dSJerome Forissier length, or when the entropy module uses SHA-256 and CTR_DRBG uses AES-256. 258*7901324dSJerome Forissier In such cases, a random nonce was necessary to achieve the advertised 259*7901324dSJerome Forissier security strength, but the code incorrectly used a constant instead of 260*7901324dSJerome Forissier entropy from the nonce. 261*7901324dSJerome Forissier Found by John Stroebel in #3819 and fixed in #3973. 262*7901324dSJerome Forissier * Fix a buffer overflow in mbedtls_mpi_sub_abs() when calculating 263*7901324dSJerome Forissier |A| - |B| where |B| is larger than |A| and has more limbs (so the 264*7901324dSJerome Forissier function should return MBEDTLS_ERR_MPI_NEGATIVE_VALUE). Only 265*7901324dSJerome Forissier applications calling mbedtls_mpi_sub_abs() directly are affected: 266*7901324dSJerome Forissier all calls inside the library were safe since this function is 267*7901324dSJerome Forissier only called with |A| >= |B|. Reported by Guido Vranken in #4042. 268*7901324dSJerome Forissier * Fix an errorneous estimation for an internal buffer in 269*7901324dSJerome Forissier mbedtls_pk_write_key_pem(). If MBEDTLS_MPI_MAX_SIZE is set to an odd 270*7901324dSJerome Forissier value the function might fail to write a private RSA keys of the largest 271*7901324dSJerome Forissier supported size. 272*7901324dSJerome Forissier Found by Daniel Otte, reported in #4093 and fixed in #4094. 273*7901324dSJerome Forissier * Fix a stack buffer overflow with mbedtls_net_poll() and 274*7901324dSJerome Forissier mbedtls_net_recv_timeout() when given a file descriptor that is 275*7901324dSJerome Forissier beyond FD_SETSIZE. Reported by FigBug in #4169. 276*7901324dSJerome Forissier * Guard against strong local side channel attack against base64 tables by 277*7901324dSJerome Forissier making access aceess to them use constant flow code. 278*7901324dSJerome Forissier 279*7901324dSJerome ForissierBugfix 280*7901324dSJerome Forissier * Fix use-after-scope error in programs/ssl/ssl_client2.c and ssl_server2.c 281*7901324dSJerome Forissier * Fix memory leak that occured when calling psa_close_key() on a 282*7901324dSJerome Forissier wrapped key with MBEDTLS_PSA_CRYPTO_SE_C defined. 283*7901324dSJerome Forissier * Fix an incorrect error code if an RSA private operation glitched. 284*7901324dSJerome Forissier * Fix a memory leak in an error case in psa_generate_derived_key_internal(). 285*7901324dSJerome Forissier * Fix a resource leak in CTR_DRBG and HMAC_DRBG when MBEDTLS_THREADING_C 286*7901324dSJerome Forissier is enabled, on platforms where initializing a mutex allocates resources. 287*7901324dSJerome Forissier This was a regression introduced in the previous release. Reported in 288*7901324dSJerome Forissier #4017, #4045 and #4071. 289*7901324dSJerome Forissier * Ensure that calling mbedtls_rsa_free() or mbedtls_entropy_free() 290*7901324dSJerome Forissier twice is safe. This happens for RSA when some Mbed TLS library functions 291*7901324dSJerome Forissier fail. Such a double-free was not safe when MBEDTLS_THREADING_C was 292*7901324dSJerome Forissier enabled on platforms where freeing a mutex twice is not safe. 293*7901324dSJerome Forissier * Fix a resource leak in a bad-arguments case of mbedtls_rsa_gen_key() 294*7901324dSJerome Forissier when MBEDTLS_THREADING_C is enabled on platforms where initializing 295*7901324dSJerome Forissier a mutex allocates resources. 296*7901324dSJerome Forissier * Fixes a bug where, if the library was configured to include support for 297*7901324dSJerome Forissier both the old SE interface and the new PSA driver interface, external keys were 298*7901324dSJerome Forissier not loaded from storage. This was fixed by #3996. 299*7901324dSJerome Forissier * This change makes 'mbedtls_x509write_crt_set_basic_constraints' 300*7901324dSJerome Forissier consistent with RFC 5280 4.2.1.9 which says: "Conforming CAs MUST 301*7901324dSJerome Forissier include this extension in all CA certificates that contain public keys 302*7901324dSJerome Forissier used to validate digital signatures on certificates and MUST mark the 303*7901324dSJerome Forissier extension as critical in such certificates." Previous to this change, 304*7901324dSJerome Forissier the extension was always marked as non-critical. This was fixed by 305*7901324dSJerome Forissier #3698. 306*7901324dSJerome Forissier 307*7901324dSJerome ForissierChanges 308*7901324dSJerome Forissier * A new library C file psa_crypto_client.c has been created to contain 309*7901324dSJerome Forissier the PSA code needed by a PSA crypto client when the PSA crypto 310*7901324dSJerome Forissier implementation is not included into the library. 311*7901324dSJerome Forissier * On recent enough versions of FreeBSD and DragonFlyBSD, the entropy module 312*7901324dSJerome Forissier now uses the getrandom syscall instead of reading from /dev/urandom. 313*7901324dSJerome Forissier 314*7901324dSJerome Forissier= mbed TLS 2.25.0 branch released 2020-12-11 315*7901324dSJerome Forissier 316*7901324dSJerome ForissierAPI changes 317*7901324dSJerome Forissier * The numerical values of the PSA Crypto API macros have been updated to 318*7901324dSJerome Forissier conform to version 1.0.0 of the specification. 319*7901324dSJerome Forissier * PSA_ALG_STREAM_CIPHER replaces PSA_ALG_CHACHA20 and PSA_ALG_ARC4. 320*7901324dSJerome Forissier The underlying stream cipher is determined by the key type 321*7901324dSJerome Forissier (PSA_KEY_TYPE_CHACHA20 or PSA_KEY_TYPE_ARC4). 322*7901324dSJerome Forissier * The functions mbedtls_cipher_auth_encrypt() and 323*7901324dSJerome Forissier mbedtls_cipher_auth_decrypt() no longer accept NIST_KW contexts, 324*7901324dSJerome Forissier as they have no way to check if the output buffer is large enough. 325*7901324dSJerome Forissier Please use mbedtls_cipher_auth_encrypt_ext() and 326*7901324dSJerome Forissier mbedtls_cipher_auth_decrypt_ext() instead. Credit to OSS-Fuzz and 327*7901324dSJerome Forissier Cryptofuzz. Fixes #3665. 328*7901324dSJerome Forissier 329*7901324dSJerome ForissierRequirement changes 330*7901324dSJerome Forissier * Update the minimum required CMake version to 2.8.12. This silences a 331*7901324dSJerome Forissier warning on CMake 3.19.0. #3801 332*7901324dSJerome Forissier 333*7901324dSJerome ForissierNew deprecations 334*7901324dSJerome Forissier * PSA_ALG_CHACHA20 and PSA_ALG_ARC4 have been deprecated. 335*7901324dSJerome Forissier Use PSA_ALG_STREAM_CIPHER instead. 336*7901324dSJerome Forissier * The functions mbedtls_cipher_auth_encrypt() and 337*7901324dSJerome Forissier mbedtls_cipher_auth_decrypt() are deprecated in favour of the new 338*7901324dSJerome Forissier functions mbedtls_cipher_auth_encrypt_ext() and 339*7901324dSJerome Forissier mbedtls_cipher_auth_decrypt_ext(). Please note that with AEAD ciphers, 340*7901324dSJerome Forissier these new functions always append the tag to the ciphertext, and include 341*7901324dSJerome Forissier the tag in the ciphertext length. 342*7901324dSJerome Forissier 343*7901324dSJerome ForissierFeatures 344*7901324dSJerome Forissier * Partial implementation of the new PSA Crypto accelerator APIs. (Symmetric 345*7901324dSJerome Forissier ciphers, asymmetric signing/verification and key generation, validate_key 346*7901324dSJerome Forissier entry point, and export_public_key interface.) 347*7901324dSJerome Forissier * Add support for ECB to the PSA cipher API. 348*7901324dSJerome Forissier * In PSA, allow using a key declared with a base key agreement algorithm 349*7901324dSJerome Forissier in combined key agreement and derivation operations, as long as the key 350*7901324dSJerome Forissier agreement algorithm in use matches the algorithm the key was declared with. 351*7901324dSJerome Forissier This is currently non-standard behaviour, but expected to make it into a 352*7901324dSJerome Forissier future revision of the PSA Crypto standard. 353*7901324dSJerome Forissier * Add MBEDTLS_TARGET_PREFIX CMake variable, which is prefixed to the mbedtls, 354*7901324dSJerome Forissier mbedcrypto, mbedx509 and apidoc CMake target names. This can be used by 355*7901324dSJerome Forissier external CMake projects that include this one to avoid CMake target name 356*7901324dSJerome Forissier clashes. The default value of this variable is "", so default target names 357*7901324dSJerome Forissier are unchanged. 358*7901324dSJerome Forissier * Add support for DTLS-SRTP as defined in RFC 5764. Contributed by Johan 359*7901324dSJerome Forissier Pascal, improved by Ron Eldor. 360*7901324dSJerome Forissier * In the PSA API, it is no longer necessary to open persistent keys: 361*7901324dSJerome Forissier operations now accept the key identifier. The type psa_key_handle_t is now 362*7901324dSJerome Forissier identical to psa_key_id_t instead of being platform-defined. This bridges 363*7901324dSJerome Forissier the last major gap to compliance with the PSA Cryptography specification 364*7901324dSJerome Forissier version 1.0.0. Opening persistent keys is still supported for backward 365*7901324dSJerome Forissier compatibility, but will be deprecated and later removed in future 366*7901324dSJerome Forissier releases. 367*7901324dSJerome Forissier * PSA_AEAD_NONCE_LENGTH, PSA_AEAD_NONCE_MAX_SIZE, PSA_CIPHER_IV_LENGTH and 368*7901324dSJerome Forissier PSA_CIPHER_IV_MAX_SIZE macros have been added as defined in version 369*7901324dSJerome Forissier 1.0.0 of the PSA Crypto API specification. 370*7901324dSJerome Forissier 371*7901324dSJerome ForissierSecurity 372*7901324dSJerome Forissier * The functions mbedtls_cipher_auth_encrypt() and 373*7901324dSJerome Forissier mbedtls_cipher_auth_decrypt() would write past the minimum documented 374*7901324dSJerome Forissier size of the output buffer when used with NIST_KW. As a result, code using 375*7901324dSJerome Forissier those functions as documented with NIST_KW could have a buffer overwrite 376*7901324dSJerome Forissier of up to 15 bytes, with consequences ranging up to arbitrary code 377*7901324dSJerome Forissier execution depending on the location of the output buffer. 378*7901324dSJerome Forissier * Limit the size of calculations performed by mbedtls_mpi_exp_mod to 379*7901324dSJerome Forissier MBEDTLS_MPI_MAX_SIZE to prevent a potential denial of service when 380*7901324dSJerome Forissier generating Diffie-Hellman key pairs. Credit to OSS-Fuzz. 381*7901324dSJerome Forissier * A failure of the random generator was ignored in mbedtls_mpi_fill_random(), 382*7901324dSJerome Forissier which is how most uses of randomization in asymmetric cryptography 383*7901324dSJerome Forissier (including key generation, intermediate value randomization and blinding) 384*7901324dSJerome Forissier are implemented. This could cause failures or the silent use of non-random 385*7901324dSJerome Forissier values. A random generator can fail if it needs reseeding and cannot not 386*7901324dSJerome Forissier obtain entropy, or due to an internal failure (which, for Mbed TLS's own 387*7901324dSJerome Forissier CTR_DRBG or HMAC_DRBG, can only happen due to a misconfiguration). 388*7901324dSJerome Forissier * Fix a compliance issue whereby we were not checking the tag on the 389*7901324dSJerome Forissier algorithm parameters (only the size) when comparing the signature in the 390*7901324dSJerome Forissier description part of the cert to the real signature. This meant that a 391*7901324dSJerome Forissier NULL algorithm parameters entry would look identical to an array of REAL 392*7901324dSJerome Forissier (size zero) to the library and thus the certificate would be considered 393*7901324dSJerome Forissier valid. However, if the parameters do not match in *any* way then the 394*7901324dSJerome Forissier certificate should be considered invalid, and indeed OpenSSL marks these 395*7901324dSJerome Forissier certs as invalid when mbedtls did not. 396*7901324dSJerome Forissier Many thanks to guidovranken who found this issue via differential fuzzing 397*7901324dSJerome Forissier and reported it in #3629. 398*7901324dSJerome Forissier * Zeroising of local buffers and variables which are used for calculations 399*7901324dSJerome Forissier in mbedtls_pkcs5_pbkdf2_hmac(), mbedtls_internal_sha*_process(), 400*7901324dSJerome Forissier mbedtls_internal_md*_process() and mbedtls_internal_ripemd160_process() 401*7901324dSJerome Forissier functions to erase sensitive data from memory. Reported by 402*7901324dSJerome Forissier Johan Malmgren and Johan Uppman Bruce from Sectra. 403*7901324dSJerome Forissier 404*7901324dSJerome ForissierBugfix 405*7901324dSJerome Forissier * Fix an invalid (but non-zero) return code from mbedtls_pk_parse_subpubkey() 406*7901324dSJerome Forissier when the input has trailing garbage. Fixes #2512. 407*7901324dSJerome Forissier * Fix build failure in configurations where MBEDTLS_USE_PSA_CRYPTO is 408*7901324dSJerome Forissier enabled but ECDSA is disabled. Contributed by jdurkop. Fixes #3294. 409*7901324dSJerome Forissier * Include the psa_constant_names generated source code in the source tree 410*7901324dSJerome Forissier instead of generating it at build time. Fixes #3524. 411*7901324dSJerome Forissier * Fix rsa_prepare_blinding() to retry when the blinding value is not 412*7901324dSJerome Forissier invertible (mod N), instead of returning MBEDTLS_ERR_RSA_RNG_FAILED. This 413*7901324dSJerome Forissier addresses a regression but is rare in practice (approx. 1 in 2/sqrt(N)). 414*7901324dSJerome Forissier Found by Synopsys Coverity, fix contributed by Peter Kolbus (Garmin). 415*7901324dSJerome Forissier Fixes #3647. 416*7901324dSJerome Forissier * Use socklen_t on Android and other POSIX-compliant system 417*7901324dSJerome Forissier * Fix the build when the macro _GNU_SOURCE is defined to a non-empty value. 418*7901324dSJerome Forissier Fix #3432. 419*7901324dSJerome Forissier * Consistently return PSA_ERROR_INVALID_ARGUMENT on invalid cipher input 420*7901324dSJerome Forissier sizes (instead of PSA_ERROR_BAD_STATE in some cases) to make the 421*7901324dSJerome Forissier psa_cipher_* functions compliant with the PSA Crypto API specification. 422*7901324dSJerome Forissier * mbedtls_ecp_curve_list() now lists Curve25519 and Curve448 under the names 423*7901324dSJerome Forissier "x25519" and "x448". These curves support ECDH but not ECDSA. If you need 424*7901324dSJerome Forissier only the curves that support ECDSA, filter the list with 425*7901324dSJerome Forissier mbedtls_ecdsa_can_do(). 426*7901324dSJerome Forissier * Fix psa_generate_key() returning an error when asked to generate 427*7901324dSJerome Forissier an ECC key pair on Curve25519 or secp244k1. 428*7901324dSJerome Forissier * Fix psa_key_derivation_output_key() to allow the output of a combined key 429*7901324dSJerome Forissier agreement and subsequent key derivation operation to be used as a key 430*7901324dSJerome Forissier inside of the PSA Crypto core. 431*7901324dSJerome Forissier * Fix handling of EOF against 0xff bytes and on platforms with unsigned 432*7901324dSJerome Forissier chars. Fixes a build failure on platforms where char is unsigned. Fixes 433*7901324dSJerome Forissier #3794. 434*7901324dSJerome Forissier * Fix an off-by-one error in the additional data length check for 435*7901324dSJerome Forissier CCM, which allowed encryption with a non-standard length field. 436*7901324dSJerome Forissier Fixes #3719. 437*7901324dSJerome Forissier * Correct the default IV size for mbedtls_cipher_info_t structures using 438*7901324dSJerome Forissier MBEDTLS_MODE_ECB to 0, since ECB mode ciphers don't use IVs. 439*7901324dSJerome Forissier * Make arc4random_buf available on NetBSD and OpenBSD when _POSIX_C_SOURCE is 440*7901324dSJerome Forissier defined. Fix contributed in #3571. 441*7901324dSJerome Forissier * Fix conditions for including string.h in error.c. Fixes #3866. 442*7901324dSJerome Forissier * psa_set_key_id() now also sets the lifetime to persistent for keys located 443*7901324dSJerome Forissier in a secure element. 444*7901324dSJerome Forissier * Attempting to create a volatile key with a non-zero key identifier now 445*7901324dSJerome Forissier fails. Previously the key identifier was just ignored when creating a 446*7901324dSJerome Forissier volatile key. 447*7901324dSJerome Forissier * Attempting to create or register a key with a key identifier in the vendor 448*7901324dSJerome Forissier range now fails. 449*7901324dSJerome Forissier * Fix build failures on GCC 11. Fixes #3782. 450*7901324dSJerome Forissier * Add missing arguments of debug message in mbedtls_ssl_decrypt_buf. 451*7901324dSJerome Forissier * Fix a memory leak in mbedtls_mpi_sub_abs() when the result was negative 452*7901324dSJerome Forissier (an error condition) and the second operand was aliased to the result. 453*7901324dSJerome Forissier * Fix a case in elliptic curve arithmetic where an out-of-memory condition 454*7901324dSJerome Forissier could go undetected, resulting in an incorrect result. 455*7901324dSJerome Forissier * In CTR_DRBG and HMAC_DRBG, don't reset the reseed interval in seed(). 456*7901324dSJerome Forissier Fixes #2927. 457*7901324dSJerome Forissier * In PEM writing functions, fill the trailing part of the buffer with null 458*7901324dSJerome Forissier bytes. This guarantees that the corresponding parsing function can read 459*7901324dSJerome Forissier the buffer back, which was the case for mbedtls_x509write_{crt,csr}_pem 460*7901324dSJerome Forissier until this property was inadvertently broken in Mbed TLS 2.19.0. 461*7901324dSJerome Forissier Fixes #3682. 462*7901324dSJerome Forissier * Fix a build failure that occurred with the MBEDTLS_AES_SETKEY_DEC_ALT 463*7901324dSJerome Forissier option on. In this configuration key management methods that are required 464*7901324dSJerome Forissier for MBEDTLS_CIPHER_MODE_XTS were excluded from the build and made it fail. 465*7901324dSJerome Forissier Fixes #3818. Reported by John Stroebel. 466*7901324dSJerome Forissier 467*7901324dSJerome ForissierChanges 468*7901324dSJerome Forissier * Reduce stack usage significantly during sliding window exponentiation. 469*7901324dSJerome Forissier Reported in #3591 and fix contributed in #3592 by Daniel Otte. 470*7901324dSJerome Forissier * The PSA persistent storage format is updated to always store the key bits 471*7901324dSJerome Forissier attribute. No automatic upgrade path is provided. Previously stored keys 472*7901324dSJerome Forissier must be erased, or manually upgraded based on the key storage format 473*7901324dSJerome Forissier specification (docs/architecture/mbed-crypto-storage-specification.md). 474*7901324dSJerome Forissier Fixes #3740. 475*7901324dSJerome Forissier * Remove the zeroization of a pointer variable in AES rounds. It was valid 476*7901324dSJerome Forissier but spurious and misleading since it looked like a mistaken attempt to 477*7901324dSJerome Forissier zeroize the pointed-to buffer. Reported by Antonio de la Piedra, CEA 478*7901324dSJerome Forissier Leti, France. 479*7901324dSJerome Forissier 480*7901324dSJerome Forissier= mbed TLS 2.24.0 branch released 2020-09-01 481*7901324dSJerome Forissier 482*7901324dSJerome ForissierAPI changes 483*7901324dSJerome Forissier * In the PSA API, rename the types of elliptic curve and Diffie-Hellman 484*7901324dSJerome Forissier group families to psa_ecc_family_t and psa_dh_family_t, in line with the 485*7901324dSJerome Forissier PSA Crypto API specification version 1.0.0. 486*7901324dSJerome Forissier Rename associated macros as well: 487*7901324dSJerome Forissier PSA_ECC_CURVE_xxx renamed to PSA_ECC_FAMILY_xxx 488*7901324dSJerome Forissier PSA_DH_GROUP_xxx renamed to PSA_DH_FAMILY_xxx 489*7901324dSJerome Forissier PSA_KEY_TYPE_GET_CURVE renamed to to PSA_KEY_TYPE_ECC_GET_FAMILY 490*7901324dSJerome Forissier PSA_KEY_TYPE_GET_GROUP renamed to PSA_KEY_TYPE_DH_GET_FAMILY 491*7901324dSJerome Forissier 492*7901324dSJerome ForissierDefault behavior changes 493*7901324dSJerome Forissier * Stop storing persistent information about externally stored keys created 494*7901324dSJerome Forissier through PSA Crypto with a volatile lifetime. Reported in #3288 and 495*7901324dSJerome Forissier contributed by Steven Cooreman in #3382. 496*7901324dSJerome Forissier 497*7901324dSJerome ForissierFeatures 498*7901324dSJerome Forissier * The new function mbedtls_ecp_write_key() exports private ECC keys back to 499*7901324dSJerome Forissier a byte buffer. It is the inverse of the existing mbedtls_ecp_read_key(). 500*7901324dSJerome Forissier * Support building on e2k (Elbrus) architecture: correctly enable 501*7901324dSJerome Forissier -Wformat-signedness, and fix the code that causes signed-one-bit-field 502*7901324dSJerome Forissier and sign-compare warnings. Contributed by makise-homura (Igor Molchanov) 503*7901324dSJerome Forissier <akemi_homura@kurisa.ch>. 504*7901324dSJerome Forissier 505*7901324dSJerome ForissierSecurity 506*7901324dSJerome Forissier * Fix a vulnerability in the verification of X.509 certificates when 507*7901324dSJerome Forissier matching the expected common name (the cn argument of 508*7901324dSJerome Forissier mbedtls_x509_crt_verify()) with the actual certificate name: when the 509*7901324dSJerome Forissier subjecAltName extension is present, the expected name was compared to any 510*7901324dSJerome Forissier name in that extension regardless of its type. This means that an 511*7901324dSJerome Forissier attacker could for example impersonate a 4-bytes or 16-byte domain by 512*7901324dSJerome Forissier getting a certificate for the corresponding IPv4 or IPv6 (this would 513*7901324dSJerome Forissier require the attacker to control that IP address, though). Similar attacks 514*7901324dSJerome Forissier using other subjectAltName name types might be possible. Found and 515*7901324dSJerome Forissier reported by kFYatek in #3498. 516*7901324dSJerome Forissier * When checking X.509 CRLs, a certificate was only considered as revoked if 517*7901324dSJerome Forissier its revocationDate was in the past according to the local clock if 518*7901324dSJerome Forissier available. In particular, on builds without MBEDTLS_HAVE_TIME_DATE, 519*7901324dSJerome Forissier certificates were never considered as revoked. On builds with 520*7901324dSJerome Forissier MBEDTLS_HAVE_TIME_DATE, an attacker able to control the local clock (for 521*7901324dSJerome Forissier example, an untrusted OS attacking a secure enclave) could prevent 522*7901324dSJerome Forissier revocation of certificates via CRLs. Fixed by no longer checking the 523*7901324dSJerome Forissier revocationDate field, in accordance with RFC 5280. Reported by 524*7901324dSJerome Forissier yuemonangong in #3340. Reported independently and fixed by 525*7901324dSJerome Forissier Raoul Strackx and Jethro Beekman in #3433. 526*7901324dSJerome Forissier * In (D)TLS record decryption, when using a CBC ciphersuites without the 527*7901324dSJerome Forissier Encrypt-then-Mac extension, use constant code flow memory access patterns 528*7901324dSJerome Forissier to extract and check the MAC. This is an improvement to the existing 529*7901324dSJerome Forissier countermeasure against Lucky 13 attacks. The previous countermeasure was 530*7901324dSJerome Forissier effective against network-based attackers, but less so against local 531*7901324dSJerome Forissier attackers. The new countermeasure defends against local attackers, even 532*7901324dSJerome Forissier if they have access to fine-grained measurements. In particular, this 533*7901324dSJerome Forissier fixes a local Lucky 13 cache attack found and reported by Tuba Yavuz, 534*7901324dSJerome Forissier Farhaan Fowze, Ken (Yihan) Bai, Grant Hernandez, and Kevin Butler 535*7901324dSJerome Forissier (University of Florida) and Dave Tian (Purdue University). 536*7901324dSJerome Forissier * Fix side channel in RSA private key operations and static (finite-field) 537*7901324dSJerome Forissier Diffie-Hellman. An adversary with precise enough timing and memory access 538*7901324dSJerome Forissier information (typically an untrusted operating system attacking a secure 539*7901324dSJerome Forissier enclave) could bypass an existing counter-measure (base blinding) and 540*7901324dSJerome Forissier potentially fully recover the private key. 541*7901324dSJerome Forissier * Fix a 1-byte buffer overread in mbedtls_x509_crl_parse_der(). 542*7901324dSJerome Forissier Credit to OSS-Fuzz for detecting the problem and to Philippe Antoine 543*7901324dSJerome Forissier for pinpointing the problematic code. 544*7901324dSJerome Forissier * Zeroising of plaintext buffers in mbedtls_ssl_read() to erase unused 545*7901324dSJerome Forissier application data from memory. Reported in #689 by 546*7901324dSJerome Forissier Johan Uppman Bruce of Sectra. 547*7901324dSJerome Forissier 548*7901324dSJerome ForissierBugfix 549*7901324dSJerome Forissier * Library files installed after a CMake build no longer have execute 550*7901324dSJerome Forissier permission. 551*7901324dSJerome Forissier * Use local labels in mbedtls_padlock_has_support() to fix an invalid symbol 552*7901324dSJerome Forissier redefinition if the function is inlined. 553*7901324dSJerome Forissier Reported in #3451 and fix contributed in #3452 by okhowang. 554*7901324dSJerome Forissier * Fix the endianness of Curve25519 keys imported/exported through the PSA 555*7901324dSJerome Forissier APIs. psa_import_key and psa_export_key will now correctly expect/output 556*7901324dSJerome Forissier Montgomery keys in little-endian as defined by RFC7748. Contributed by 557*7901324dSJerome Forissier Steven Cooreman in #3425. 558*7901324dSJerome Forissier * Fix build errors when the only enabled elliptic curves are Montgomery 559*7901324dSJerome Forissier curves. Raised by signpainter in #941 and by Taiki-San in #1412. This 560*7901324dSJerome Forissier also fixes missing declarations reported by Steven Cooreman in #1147. 561*7901324dSJerome Forissier * Fix self-test failure when the only enabled short Weierstrass elliptic 562*7901324dSJerome Forissier curve is secp192k1. Fixes #2017. 563*7901324dSJerome Forissier * PSA key import will now correctly import a Curve25519/Curve448 public key 564*7901324dSJerome Forissier instead of erroring out. Contributed by Steven Cooreman in #3492. 565*7901324dSJerome Forissier * Use arc4random_buf on NetBSD instead of rand implementation with cyclical 566*7901324dSJerome Forissier lower bits. Fix contributed in #3540. 567*7901324dSJerome Forissier * Fix a memory leak in mbedtls_md_setup() when using HMAC under low memory 568*7901324dSJerome Forissier conditions. Reported and fix suggested by Guido Vranken in #3486. 569*7901324dSJerome Forissier * Fix bug in redirection of unit test outputs on platforms where stdout is 570*7901324dSJerome Forissier defined as a macro. First reported in #2311 and fix contributed in #3528. 571*7901324dSJerome Forissier 572*7901324dSJerome ForissierChanges 573*7901324dSJerome Forissier * Only pass -Wformat-signedness to versions of GCC that support it. Reported 574*7901324dSJerome Forissier in #3478 and fix contributed in #3479 by okhowang. 575*7901324dSJerome Forissier * Reduce the stack consumption of mbedtls_x509write_csr_der() which 576*7901324dSJerome Forissier previously could lead to stack overflow on constrained devices. 577*7901324dSJerome Forissier Contributed by Doru Gucea and Simon Leet in #3464. 578*7901324dSJerome Forissier * Undefine the ASSERT macro before defining it locally, in case it is defined 579*7901324dSJerome Forissier in a platform header. Contributed by Abdelatif Guettouche in #3557. 580*7901324dSJerome Forissier * Update copyright notices to use Linux Foundation guidance. As a result, 581*7901324dSJerome Forissier the copyright of contributors other than Arm is now acknowledged, and the 582*7901324dSJerome Forissier years of publishing are no longer tracked in the source files. This also 583*7901324dSJerome Forissier eliminates the need for the lines declaring the files to be part of 584*7901324dSJerome Forissier MbedTLS. Fixes #3457. 585*7901324dSJerome Forissier * Add the command line parameter key_pwd to the ssl_client2 and ssl_server2 586*7901324dSJerome Forissier example applications which allows to provide a password for the key file 587*7901324dSJerome Forissier specified through the existing key_file argument. This allows the use of 588*7901324dSJerome Forissier these applications with password-protected key files. Analogously but for 589*7901324dSJerome Forissier ssl_server2 only, add the command line parameter key_pwd2 which allows to 590*7901324dSJerome Forissier set a password for the key file provided through the existing key_file2 591*7901324dSJerome Forissier argument. 592*7901324dSJerome Forissier 593*7901324dSJerome Forissier= mbed TLS 2.23.0 branch released 2020-07-01 594*7901324dSJerome Forissier 595*7901324dSJerome ForissierDefault behavior changes 596*7901324dSJerome Forissier * In the experimental PSA secure element interface, change the encoding of 597*7901324dSJerome Forissier key lifetimes to encode a persistence level and the location. Although C 598*7901324dSJerome Forissier prototypes do not effectively change, code calling 599*7901324dSJerome Forissier psa_register_se_driver() must be modified to pass the driver's location 600*7901324dSJerome Forissier instead of the keys' lifetime. If the library is upgraded on an existing 601*7901324dSJerome Forissier device, keys created with the old lifetime value will not be readable or 602*7901324dSJerome Forissier removable through Mbed TLS after the upgrade. 603*7901324dSJerome Forissier 604*7901324dSJerome ForissierFeatures 605*7901324dSJerome Forissier * New functions in the error module return constant strings for 606*7901324dSJerome Forissier high- and low-level error codes, complementing mbedtls_strerror() 607*7901324dSJerome Forissier which constructs a string for any error code, including compound 608*7901324dSJerome Forissier ones, but requires a writable buffer. Contributed by Gaurav Aggarwal 609*7901324dSJerome Forissier in #3176. 610*7901324dSJerome Forissier * The new utility programs/ssl/ssl_context_info prints a human-readable 611*7901324dSJerome Forissier dump of an SSL context saved with mbedtls_ssl_context_save(). 612*7901324dSJerome Forissier * Add support for midipix, a POSIX layer for Microsoft Windows. 613*7901324dSJerome Forissier * Add new mbedtls_x509_crt_parse_der_with_ext_cb() routine which allows 614*7901324dSJerome Forissier parsing unsupported certificate extensions via user provided callback. 615*7901324dSJerome Forissier Contributed by Nicola Di Lieto <nicola.dilieto@gmail.com> in #3243 as 616*7901324dSJerome Forissier a solution to #3241. 617*7901324dSJerome Forissier * Pass the "certificate policies" extension to the callback supplied to 618*7901324dSJerome Forissier mbedtls_x509_crt_parse_der_with_ext_cb() if it contains unsupported 619*7901324dSJerome Forissier policies (#3419). 620*7901324dSJerome Forissier * Added support to entropy_poll for the kern.arandom syscall supported on 621*7901324dSJerome Forissier some BSD systems. Contributed by Nia Alarie in #3423. 622*7901324dSJerome Forissier * Add support for Windows 2000 in net_sockets. Contributed by opatomic. #3239 623*7901324dSJerome Forissier 624*7901324dSJerome ForissierSecurity 625*7901324dSJerome Forissier * Fix a side channel vulnerability in modular exponentiation that could 626*7901324dSJerome Forissier reveal an RSA private key used in a secure enclave. Noticed by Sangho Lee, 627*7901324dSJerome Forissier Ming-Wei Shih, Prasun Gera, Taesoo Kim and Hyesoon Kim (Georgia Institute 628*7901324dSJerome Forissier of Technology); and Marcus Peinado (Microsoft Research). Reported by Raoul 629*7901324dSJerome Forissier Strackx (Fortanix) in #3394. 630*7901324dSJerome Forissier * Fix side channel in mbedtls_ecp_check_pub_priv() and 631*7901324dSJerome Forissier mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a 632*7901324dSJerome Forissier private key that didn't include the uncompressed public key), as well as 633*7901324dSJerome Forissier mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL 634*7901324dSJerome Forissier f_rng argument. An attacker with access to precise enough timing and 635*7901324dSJerome Forissier memory access information (typically an untrusted operating system 636*7901324dSJerome Forissier attacking a secure enclave) could fully recover the ECC private key. 637*7901324dSJerome Forissier Found and reported by Alejandro Cabrera Aldaya and Billy Brumley. 638*7901324dSJerome Forissier * Fix issue in Lucky 13 counter-measure that could make it ineffective when 639*7901324dSJerome Forissier hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT 640*7901324dSJerome Forissier macros). This would cause the original Lucky 13 attack to be possible in 641*7901324dSJerome Forissier those configurations, allowing an active network attacker to recover 642*7901324dSJerome Forissier plaintext after repeated timing measurements under some conditions. 643*7901324dSJerome Forissier Reported and fix suggested by Luc Perneel in #3246. 644*7901324dSJerome Forissier 645*7901324dSJerome ForissierBugfix 646*7901324dSJerome Forissier * Fix the Visual Studio Release x64 build configuration for mbedtls itself. 647*7901324dSJerome Forissier Completes a previous fix in Mbed TLS 2.19 that only fixed the build for 648*7901324dSJerome Forissier the example programs. Reported in #1430 and fix contributed by irwir. 649*7901324dSJerome Forissier * Fix undefined behavior in X.509 certificate parsing if the 650*7901324dSJerome Forissier pathLenConstraint basic constraint value is equal to INT_MAX. 651*7901324dSJerome Forissier The actual effect with almost every compiler is the intended 652*7901324dSJerome Forissier behavior, so this is unlikely to be exploitable anywhere. #3192 653*7901324dSJerome Forissier * Fix issue with a detected HW accelerated record error not being exposed 654*7901324dSJerome Forissier due to shadowed variable. Contributed by Sander Visser in #3310. 655*7901324dSJerome Forissier * Avoid NULL pointer dereferencing if mbedtls_ssl_free() is called with a 656*7901324dSJerome Forissier NULL pointer argument. Contributed by Sander Visser in #3312. 657*7901324dSJerome Forissier * Fix potential linker errors on dual world platforms by inlining 658*7901324dSJerome Forissier mbedtls_gcc_group_to_psa(). This allows the pk.c module to link separately 659*7901324dSJerome Forissier from psa_crypto.c. Fixes #3300. 660*7901324dSJerome Forissier * Remove dead code in X.509 certificate parsing. Contributed by irwir in 661*7901324dSJerome Forissier #2855. 662*7901324dSJerome Forissier * Include asn1.h in error.c. Fixes #3328 reported by David Hu. 663*7901324dSJerome Forissier * Fix potential memory leaks in ecp_randomize_jac() and ecp_randomize_mxz() 664*7901324dSJerome Forissier when PRNG function fails. Contributed by Jonas Lejeune in #3318. 665*7901324dSJerome Forissier * Remove unused macros from MSVC projects. Reported in #3297 and fix 666*7901324dSJerome Forissier submitted in #3333 by irwir. 667*7901324dSJerome Forissier * Add additional bounds checks in ssl_write_client_hello() preventing 668*7901324dSJerome Forissier output buffer overflow if the configuration declared a buffer that was 669*7901324dSJerome Forissier too small. 670*7901324dSJerome Forissier * Set _POSIX_C_SOURCE to at least 200112L in C99 code. Reported in #3420 and 671*7901324dSJerome Forissier fix submitted in #3421 by Nia Alarie. 672*7901324dSJerome Forissier * Fix building library/net_sockets.c and the ssl_mail_client program on 673*7901324dSJerome Forissier NetBSD. Contributed by Nia Alarie in #3422. 674*7901324dSJerome Forissier * Fix false positive uninitialised variable reported by cpp-check. 675*7901324dSJerome Forissier Contributed by Sander Visser in #3311. 676*7901324dSJerome Forissier * Update iv and len context pointers manually when reallocating buffers 677*7901324dSJerome Forissier using the MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH feature. This caused issues 678*7901324dSJerome Forissier when receiving a connection with CID, when these fields were shifted 679*7901324dSJerome Forissier in ssl_parse_record_header(). 680*7901324dSJerome Forissier 681*7901324dSJerome ForissierChanges 682*7901324dSJerome Forissier * Fix warnings about signedness issues in format strings. The build is now 683*7901324dSJerome Forissier clean of -Wformat-signedness warnings. Contributed by Kenneth Soerensen 684*7901324dSJerome Forissier in #3153. 685*7901324dSJerome Forissier * Fix minor performance issue in operations on Curve25519 caused by using a 686*7901324dSJerome Forissier suboptimal modular reduction in one place. Found and fix contributed by 687*7901324dSJerome Forissier Aurelien Jarno in #3209. 688*7901324dSJerome Forissier * Combine identical cases in switch statements in md.c. Contributed 689*7901324dSJerome Forissier by irwir in #3208. 690*7901324dSJerome Forissier * Simplify a bounds check in ssl_write_certificate_request(). Contributed 691*7901324dSJerome Forissier by irwir in #3150. 692*7901324dSJerome Forissier * Unify the example programs termination to call mbedtls_exit() instead of 693*7901324dSJerome Forissier using a return command. This has been done to enable customization of the 694*7901324dSJerome Forissier behavior in bare metal environments. 695*7901324dSJerome Forissier * Fix mbedtls_x509_dn_gets to escape non-ASCII characters as "?". 696*7901324dSJerome Forissier Contributed by Koh M. Nakagawa in #3326. 697*7901324dSJerome Forissier * Use FindPython3 when cmake version >= 3.15.0 698*7901324dSJerome Forissier * Abort the ClientHello writing function as soon as some extension doesn't 699*7901324dSJerome Forissier fit into the record buffer. Previously, such extensions were silently 700*7901324dSJerome Forissier dropped. As a consequence, the TLS handshake now fails when the output 701*7901324dSJerome Forissier buffer is not large enough to hold the ClientHello. 702*7901324dSJerome Forissier * The unit tests now rely on header files in tests/include/test and source 703*7901324dSJerome Forissier files in tests/src. When building with make or cmake, the files in 704*7901324dSJerome Forissier tests/src are compiled and the resulting object linked into each test 705*7901324dSJerome Forissier executable. 706*7901324dSJerome Forissier * The ECP module, enabled by `MBEDTLS_ECP_C`, now depends on 707*7901324dSJerome Forissier `MBEDTLS_CTR_DRBG_C` or `MBEDTLS_HMAC_DRBG_C` for some side-channel 708*7901324dSJerome Forissier coutermeasures. If side channels are not a concern, this dependency can 709*7901324dSJerome Forissier be avoided by enabling the new option `MBEDTLS_ECP_NO_INTERNAL_RNG`. 710*7901324dSJerome Forissier * Align MSVC error flag with GCC and Clang. Contributed by Carlos Gomes 711*7901324dSJerome Forissier Martinho. #3147 712*7901324dSJerome Forissier * Remove superfluous assignment in mbedtls_ssl_parse_certificate(). Reported 713*7901324dSJerome Forissier in #3182 and fix submitted by irwir. #3217 714*7901324dSJerome Forissier * Fix typo in XTS tests. Reported and fix submitted by Kxuan. #3319 715*7901324dSJerome Forissier 71611fa71b9SJerome Forissier= mbed TLS 2.22.0 branch released 2020-04-14 71711fa71b9SJerome Forissier 71811fa71b9SJerome ForissierNew deprecations 71911fa71b9SJerome Forissier * Deprecate MBEDTLS_SSL_HW_RECORD_ACCEL that enables function hooks in the 72011fa71b9SJerome Forissier SSL module for hardware acceleration of individual records. 72111fa71b9SJerome Forissier * Deprecate mbedtls_ssl_get_max_frag_len() in favour of 72211fa71b9SJerome Forissier mbedtls_ssl_get_output_max_frag_len() and 72311fa71b9SJerome Forissier mbedtls_ssl_get_input_max_frag_len() to be more precise about which max 72411fa71b9SJerome Forissier fragment length is desired. 72511fa71b9SJerome Forissier 72611fa71b9SJerome ForissierSecurity 72711fa71b9SJerome Forissier * Fix issue in DTLS handling of new associations with the same parameters 72811fa71b9SJerome Forissier (RFC 6347 section 4.2.8): an attacker able to send forged UDP packets to 72911fa71b9SJerome Forissier the server could cause it to drop established associations with 73011fa71b9SJerome Forissier legitimate clients, resulting in a Denial of Service. This could only 73111fa71b9SJerome Forissier happen when MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE was enabled in config.h 73211fa71b9SJerome Forissier (which it is by default). 73311fa71b9SJerome Forissier * Fix side channel in ECC code that allowed an adversary with access to 73411fa71b9SJerome Forissier precise enough timing and memory access information (typically an 73511fa71b9SJerome Forissier untrusted operating system attacking a secure enclave) to fully recover 73611fa71b9SJerome Forissier an ECDSA private key. Found and reported by Alejandro Cabrera Aldaya, 73711fa71b9SJerome Forissier Billy Brumley and Cesar Pereida Garcia. CVE-2020-10932 73811fa71b9SJerome Forissier * Fix a potentially remotely exploitable buffer overread in a 73911fa71b9SJerome Forissier DTLS client when parsing the Hello Verify Request message. 74011fa71b9SJerome Forissier 74111fa71b9SJerome ForissierFeatures 74211fa71b9SJerome Forissier * The new build option MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH automatically 74311fa71b9SJerome Forissier resizes the I/O buffers before and after handshakes, reducing the memory 74411fa71b9SJerome Forissier consumption during application data transfer. 74511fa71b9SJerome Forissier 74611fa71b9SJerome ForissierBugfix 74711fa71b9SJerome Forissier * Fix compilation failure when both MBEDTLS_SSL_PROTO_DTLS and 74811fa71b9SJerome Forissier MBEDTLS_SSL_HW_RECORD_ACCEL are enabled. 74911fa71b9SJerome Forissier * Remove a spurious check in ssl_parse_client_psk_identity that triggered 75011fa71b9SJerome Forissier a warning with some compilers. Fix contributed by irwir in #2856. 75111fa71b9SJerome Forissier * Fix a function name in a debug message. Contributed by Ercan Ozturk in 75211fa71b9SJerome Forissier #3013. 75311fa71b9SJerome Forissier 75411fa71b9SJerome ForissierChanges 75511fa71b9SJerome Forissier * Mbed Crypto is no longer a Git submodule. The crypto part of the library 75611fa71b9SJerome Forissier is back directly in the present repository. 75711fa71b9SJerome Forissier * Split mbedtls_ssl_get_max_frag_len() into 75811fa71b9SJerome Forissier mbedtls_ssl_get_output_max_frag_len() and 75911fa71b9SJerome Forissier mbedtls_ssl_get_input_max_frag_len() to ensure that a sufficient input 76011fa71b9SJerome Forissier buffer is allocated by the server (if MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH 76111fa71b9SJerome Forissier is defined), regardless of what MFL was configured for it. 76211fa71b9SJerome Forissier 76311fa71b9SJerome Forissier= mbed TLS 2.21.0 branch released 2020-02-20 76411fa71b9SJerome Forissier 76511fa71b9SJerome ForissierNew deprecations 76611fa71b9SJerome Forissier * Deprecate MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO that enables parsing 76711fa71b9SJerome Forissier SSLv2 ClientHello messages. 76811fa71b9SJerome Forissier * Deprecate MBEDTLS_SSL_PROTO_SSL3 that enables support for SSLv3. 76911fa71b9SJerome Forissier * Deprecate for MBEDTLS_PKCS11_C, the wrapper around the pkcs11-helper 77011fa71b9SJerome Forissier library which allows TLS authentication to use keys stored in a 77111fa71b9SJerome Forissier PKCS#11 token such as a smartcard. 7725b25c76aSJerome Forissier 7735b25c76aSJerome ForissierSecurity 7745b25c76aSJerome Forissier * Fix potential memory overread when performing an ECDSA signature 7755b25c76aSJerome Forissier operation. The overread only happens with cryptographically low 7765b25c76aSJerome Forissier probability (of the order of 2^-n where n is the bitsize of the curve) 7775b25c76aSJerome Forissier unless the RNG is broken, and could result in information disclosure or 7785b25c76aSJerome Forissier denial of service (application crash or extra resource consumption). 7795b25c76aSJerome Forissier Found by Auke Zeilstra and Peter Schwabe, using static analysis. 7805b25c76aSJerome Forissier * To avoid a side channel vulnerability when parsing an RSA private key, 7815b25c76aSJerome Forissier read all the CRT parameters from the DER structure rather than 7825b25c76aSJerome Forissier reconstructing them. Found by Alejandro Cabrera Aldaya and Billy Bob 7835b25c76aSJerome Forissier Brumley. Reported and fix contributed by Jack Lloyd. 7845b25c76aSJerome Forissier ARMmbed/mbed-crypto#352 7855b25c76aSJerome Forissier 78611fa71b9SJerome ForissierFeatures 78711fa71b9SJerome Forissier * The new build option MBEDTLS_SHA512_NO_SHA384 allows building SHA-512 78811fa71b9SJerome Forissier support without SHA-384. 78911fa71b9SJerome Forissier 79011fa71b9SJerome ForissierAPI changes 79111fa71b9SJerome Forissier * Change the encoding of key types and curves in the PSA API. The new 79211fa71b9SJerome Forissier values are aligned with the upcoming release of the PSA Crypto API 79311fa71b9SJerome Forissier specification version 1.0.0. The main change which may break some 79411fa71b9SJerome Forissier existing code is that elliptic curve key types no longer encode the 79511fa71b9SJerome Forissier exact curve: a psa_ecc_curve_t or psa_key_type_t value only encodes 79611fa71b9SJerome Forissier a curve family and the key size determines the exact curve (for example, 79711fa71b9SJerome Forissier PSA_ECC_CURVE_SECP_R1 with 256 bits is P256R1). ARMmbed/mbed-crypto#330 79811fa71b9SJerome Forissier 7995b25c76aSJerome ForissierBugfix 8005b25c76aSJerome Forissier * Fix an unchecked call to mbedtls_md() in the x509write module. 80111fa71b9SJerome Forissier * Fix build failure with MBEDTLS_ZLIB_SUPPORT enabled. Reported by 80211fa71b9SJerome Forissier Jack Lloyd in #2859. Fix submitted by jiblime in #2963. 80311fa71b9SJerome Forissier * Fix some false-positive uninitialized variable warnings in X.509. Fix 80411fa71b9SJerome Forissier contributed by apple-ihack-geek in #2663. 80511fa71b9SJerome Forissier * Fix a possible error code mangling in psa_mac_verify_finish() when 80611fa71b9SJerome Forissier a cryptographic accelerator fails. ARMmbed/mbed-crypto#345 8075b25c76aSJerome Forissier * Fix a bug in mbedtls_pk_parse_key() that would cause it to accept some 8085b25c76aSJerome Forissier RSA keys that would later be rejected by functions expecting private 8095b25c76aSJerome Forissier keys. Found by Catena cyber using oss-fuzz (issue 20467). 81011fa71b9SJerome Forissier * Fix a bug in mbedtls_pk_parse_key() that would cause it to 81111fa71b9SJerome Forissier accept some RSA keys with invalid values by silently fixing those values. 8125b25c76aSJerome Forissier 81311fa71b9SJerome Forissier= mbed TLS 2.20.0 branch released 2020-01-15 81411fa71b9SJerome Forissier 81511fa71b9SJerome ForissierDefault behavior changes 81611fa71b9SJerome Forissier * The initial seeding of a CTR_DRBG instance makes a second call to the 81711fa71b9SJerome Forissier entropy function to obtain entropy for a nonce if the entropy size is less 81811fa71b9SJerome Forissier than 3/2 times the key size. In case you want to disable the extra call to 81911fa71b9SJerome Forissier grab entropy, you can call mbedtls_ctr_drbg_set_nonce_len() to force the 82011fa71b9SJerome Forissier nonce length to 0. 8215b25c76aSJerome Forissier 8225b25c76aSJerome ForissierSecurity 82311fa71b9SJerome Forissier * Enforce that mbedtls_entropy_func() gathers a total of 82411fa71b9SJerome Forissier MBEDTLS_ENTROPY_BLOCK_SIZE bytes or more from strong sources. In the 82511fa71b9SJerome Forissier default configuration, on a platform with a single entropy source, the 82611fa71b9SJerome Forissier entropy module formerly only grabbed 32 bytes, which is good enough for 82711fa71b9SJerome Forissier security if the source is genuinely strong, but less than the expected 64 82811fa71b9SJerome Forissier bytes (size of the entropy accumulator). 8295b25c76aSJerome Forissier * Zeroize local variables in mbedtls_internal_aes_encrypt() and 8305b25c76aSJerome Forissier mbedtls_internal_aes_decrypt() before exiting the function. The value of 8315b25c76aSJerome Forissier these variables can be used to recover the last round key. To follow best 8325b25c76aSJerome Forissier practice and to limit the impact of buffer overread vulnerabilities (like 8335b25c76aSJerome Forissier Heartbleed) we need to zeroize them before exiting the function. 8345b25c76aSJerome Forissier Issue reported by Tuba Yavuz, Farhaan Fowze, Ken (Yihang) Bai, 8355b25c76aSJerome Forissier Grant Hernandez, and Kevin Butler (University of Florida) and 8365b25c76aSJerome Forissier Dave Tian (Purdue University). 83711fa71b9SJerome Forissier * Fix side channel vulnerability in ECDSA. Our bignum implementation is not 83811fa71b9SJerome Forissier constant time/constant trace, so side channel attacks can retrieve the 83911fa71b9SJerome Forissier blinded value, factor it (as it is smaller than RSA keys and not guaranteed 84011fa71b9SJerome Forissier to have only large prime factors), and then, by brute force, recover the 84111fa71b9SJerome Forissier key. Reported by Alejandro Cabrera Aldaya and Billy Brumley. 8425b25c76aSJerome Forissier * Fix side channel vulnerability in ECDSA key generation. Obtaining precise 8435b25c76aSJerome Forissier timings on the comparison in the key generation enabled the attacker to 8445b25c76aSJerome Forissier learn leading bits of the ephemeral key used during ECDSA signatures and to 8455b25c76aSJerome Forissier recover the private key. Reported by Jeremy Dubeuf. 8465b25c76aSJerome Forissier * Catch failure of AES functions in mbedtls_ctr_drbg_random(). Uncaught 8475b25c76aSJerome Forissier failures could happen with alternative implementations of AES. Bug 8485b25c76aSJerome Forissier reported and fix proposed by Johan Uppman Bruce and Christoffer Lauri, 8495b25c76aSJerome Forissier Sectra. 8505b25c76aSJerome Forissier 85111fa71b9SJerome ForissierFeatures 85211fa71b9SJerome Forissier * Key derivation inputs in the PSA API can now either come from a key object 85311fa71b9SJerome Forissier or from a buffer regardless of the step type. 85411fa71b9SJerome Forissier * The CTR_DRBG module can grab a nonce from the entropy source during the 85511fa71b9SJerome Forissier initial seeding. The default nonce length is chosen based on the key size 85611fa71b9SJerome Forissier to achieve the security strength defined by NIST SP 800-90A. You can 85711fa71b9SJerome Forissier change it with mbedtls_ctr_drbg_set_nonce_len(). 85811fa71b9SJerome Forissier * Add ENUMERATED tag support to the ASN.1 module. Contributed by 85911fa71b9SJerome Forissier msopiha-linaro in ARMmbed/mbed-crypto#307. 86011fa71b9SJerome Forissier 86111fa71b9SJerome ForissierAPI changes 86211fa71b9SJerome Forissier * In the PSA API, forbid zero-length keys. To pass a zero-length input to a 86311fa71b9SJerome Forissier key derivation function, use a buffer instead (this is now always 86411fa71b9SJerome Forissier possible). 86511fa71b9SJerome Forissier * Rename psa_asymmetric_sign() to psa_sign_hash() and 86611fa71b9SJerome Forissier psa_asymmetric_verify() to psa_verify_hash(). 86711fa71b9SJerome Forissier 8685b25c76aSJerome ForissierBugfix 86911fa71b9SJerome Forissier * Fix an incorrect size in a debugging message. Reported and fix 87011fa71b9SJerome Forissier submitted by irwir. Fixes #2717. 87111fa71b9SJerome Forissier * Fix an unused variable warning when compiling without DTLS. 87211fa71b9SJerome Forissier Reported and fix submitted by irwir. Fixes #2800. 87311fa71b9SJerome Forissier * Remove a useless assignment. Reported and fix submitted by irwir. 87411fa71b9SJerome Forissier Fixes #2801. 87511fa71b9SJerome Forissier * Fix a buffer overflow in the PSA HMAC code when using a long key with an 87611fa71b9SJerome Forissier unsupported algorithm. Fixes ARMmbed/mbed-crypto#254. 87711fa71b9SJerome Forissier * Fix mbedtls_asn1_get_int to support any number of leading zeros. Credit 87811fa71b9SJerome Forissier to OSS-Fuzz for finding a bug in an intermediate version of the fix. 87911fa71b9SJerome Forissier * Fix mbedtls_asn1_get_bitstring_null to correctly parse bitstrings of at 88011fa71b9SJerome Forissier most 2 bytes. 88111fa71b9SJerome Forissier * mbedtls_ctr_drbg_set_entropy_len() and 88211fa71b9SJerome Forissier mbedtls_hmac_drbg_set_entropy_len() now work if you call them before 88311fa71b9SJerome Forissier mbedtls_ctr_drbg_seed() or mbedtls_hmac_drbg_seed(). 8845b25c76aSJerome Forissier 8855b25c76aSJerome ForissierChanges 88611fa71b9SJerome Forissier * Remove the technical possibility to define custom mbedtls_md_info 88711fa71b9SJerome Forissier structures, which was exposed only in an internal header. 88811fa71b9SJerome Forissier * psa_close_key(0) and psa_destroy_key(0) now succeed (doing nothing, as 88911fa71b9SJerome Forissier before). 89011fa71b9SJerome Forissier * Variables containing error codes are now initialized to an error code 89111fa71b9SJerome Forissier rather than success, so that coding mistakes or memory corruption tends to 89211fa71b9SJerome Forissier cause functions to return this error code rather than a success. There are 89311fa71b9SJerome Forissier no known instances where this changes the behavior of the library: this is 89411fa71b9SJerome Forissier merely a robustness improvement. ARMmbed/mbed-crypto#323 89511fa71b9SJerome Forissier * Remove a useless call to mbedtls_ecp_group_free(). Contributed by 89611fa71b9SJerome Forissier Alexander Krizhanovsky in ARMmbed/mbed-crypto#210. 89711fa71b9SJerome Forissier * Speed up PBKDF2 by caching the digest calculation. Contributed by Jack 89811fa71b9SJerome Forissier Lloyd and Fortanix Inc in ARMmbed/mbed-crypto#277. 89911fa71b9SJerome Forissier * Small performance improvement of mbedtls_mpi_div_mpi(). Contributed by 90011fa71b9SJerome Forissier Alexander Krizhanovsky in ARMmbed/mbed-crypto#308. 9015b25c76aSJerome Forissier 90211fa71b9SJerome Forissier= mbed TLS 2.19.1 branch released 2019-09-16 90311fa71b9SJerome Forissier 90411fa71b9SJerome ForissierFeatures 90511fa71b9SJerome Forissier * Declare include headers as PUBLIC to propagate to CMake project consumers 90611fa71b9SJerome Forissier Contributed by Zachary J. Fields in PR #2949. 90711fa71b9SJerome Forissier * Add nss_keylog to ssl_client2 and ssl_server2, enabling easier analysis of 90811fa71b9SJerome Forissier TLS sessions with tools like Wireshark. 90911fa71b9SJerome Forissier 91011fa71b9SJerome ForissierAPI Changes 91111fa71b9SJerome Forissier * Make client_random and server_random const in 91211fa71b9SJerome Forissier mbedtls_ssl_export_keys_ext_t, so that the key exporter is discouraged 91311fa71b9SJerome Forissier from modifying the client/server hello. 91411fa71b9SJerome Forissier 91511fa71b9SJerome ForissierBugfix 91611fa71b9SJerome Forissier * Fix some false-positive uninitialized variable warnings in crypto. Fix 91711fa71b9SJerome Forissier contributed by apple-ihack-geek in #2663. 91811fa71b9SJerome Forissier 91911fa71b9SJerome Forissier= mbed TLS 2.19.0 branch released 2019-09-06 9205b25c76aSJerome Forissier 9215b25c76aSJerome ForissierSecurity 9225b25c76aSJerome Forissier * Fix a missing error detection in ECJPAKE. This could have caused a 9235b25c76aSJerome Forissier predictable shared secret if a hardware accelerator failed and the other 9245b25c76aSJerome Forissier side of the key exchange had a similar bug. 9255b25c76aSJerome Forissier * When writing a private EC key, use a constant size for the private 9265b25c76aSJerome Forissier value, as specified in RFC 5915. Previously, the value was written 9275b25c76aSJerome Forissier as an ASN.1 INTEGER, which caused the size of the key to leak 9285b25c76aSJerome Forissier about 1 bit of information on average and could cause the value to be 9295b25c76aSJerome Forissier 1 byte too large for the output buffer. 93011fa71b9SJerome Forissier * The deterministic ECDSA calculation reused the scheme's HMAC-DRBG to 93111fa71b9SJerome Forissier implement blinding. Because of this for the same key and message the same 93211fa71b9SJerome Forissier blinding value was generated. This reduced the effectiveness of the 93311fa71b9SJerome Forissier countermeasure and leaked information about the private key through side 93411fa71b9SJerome Forissier channels. Reported by Jack Lloyd. 93511fa71b9SJerome Forissier 93611fa71b9SJerome ForissierFeatures 93711fa71b9SJerome Forissier * Add new API functions mbedtls_ssl_session_save() and 93811fa71b9SJerome Forissier mbedtls_ssl_session_load() to allow serializing a session, for example to 93911fa71b9SJerome Forissier store it in non-volatile storage, and later using it for TLS session 94011fa71b9SJerome Forissier resumption. 94111fa71b9SJerome Forissier * Add a new API function mbedtls_ssl_check_record() to allow checking that 94211fa71b9SJerome Forissier an incoming record is valid, authentic and has not been seen before. This 94311fa71b9SJerome Forissier feature can be used alongside Connection ID and SSL context serialisation. 94411fa71b9SJerome Forissier The feature is enabled at compile-time by MBEDTLS_SSL_RECORD_CHECKING 94511fa71b9SJerome Forissier option. 94611fa71b9SJerome Forissier * New implementation of X25519 (ECDH using Curve25519) from Project Everest 94711fa71b9SJerome Forissier (https://project-everest.github.io/). It can be enabled at compile time 94811fa71b9SJerome Forissier with MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED. This implementation is formally 94911fa71b9SJerome Forissier verified and significantly faster, but is only supported on x86 platforms 95011fa71b9SJerome Forissier (32-bit and 64-bit) using GCC, Clang or Visual Studio. Contributed by 95111fa71b9SJerome Forissier Christoph Wintersteiger from Microsoft Research. 95211fa71b9SJerome Forissier * Add mbedtls_net_close(), enabling the building of forking servers where 95311fa71b9SJerome Forissier the parent process closes the client socket and continue accepting, and 95411fa71b9SJerome Forissier the child process closes the listening socket and handles the client 95511fa71b9SJerome Forissier socket. Contributed by Robert Larsen in #2803. 9565b25c76aSJerome Forissier 9575b25c76aSJerome ForissierAPI Changes 95811fa71b9SJerome Forissier * Add DER-encoded test CRTs to library/certs.c, allowing 95911fa71b9SJerome Forissier the example programs ssl_server2 and ssl_client2 to be run 96011fa71b9SJerome Forissier if MBEDTLS_FS_IO and MBEDTLS_PEM_PARSE_C are unset. Fixes #2254. 96111fa71b9SJerome Forissier * The HAVEGE state type now uses uint32_t elements instead of int. 96211fa71b9SJerome Forissier * The functions mbedtls_ecp_curve_list() and mbedtls_ecp_grp_id_list() now 96311fa71b9SJerome Forissier list all curves for which at least one of ECDH or ECDSA is supported, not 96411fa71b9SJerome Forissier just curves for which both are supported. Call mbedtls_ecdsa_can_do() or 96511fa71b9SJerome Forissier mbedtls_ecdh_can_do() on each result to check whether each algorithm is 96611fa71b9SJerome Forissier supported. 9675b25c76aSJerome Forissier * The new function mbedtls_ecdsa_sign_det_ext() is similar to 9685b25c76aSJerome Forissier mbedtls_ecdsa_sign_det() but allows passing an external RNG for the 9695b25c76aSJerome Forissier purpose of blinding. 9705b25c76aSJerome Forissier 97111fa71b9SJerome ForissierNew deprecations 97211fa71b9SJerome Forissier * Deprecate mbedtls_ecdsa_sign_det() in favor of a functions that can take an 97311fa71b9SJerome Forissier RNG function as an input. 97411fa71b9SJerome Forissier * Calling mbedtls_ecdsa_write_signature() with NULL as the f_rng argument 97511fa71b9SJerome Forissier is now deprecated. 97611fa71b9SJerome Forissier 9775b25c76aSJerome ForissierBugfix 97811fa71b9SJerome Forissier * Fix missing bounds checks in X.509 parsing functions that could 97911fa71b9SJerome Forissier lead to successful parsing of ill-formed X.509 CRTs. Fixes #2437. 98011fa71b9SJerome Forissier * Fix multiple X.509 functions previously returning ASN.1 low-level error 98111fa71b9SJerome Forissier codes to always wrap these codes into X.509 high level error codes before 98211fa71b9SJerome Forissier returning. Fixes #2431. 9835b25c76aSJerome Forissier * Fix to allow building test suites with any warning that detects unused 9845b25c76aSJerome Forissier functions. Fixes #1628. 9855b25c76aSJerome Forissier * Fix typo in net_would_block(). Fixes #528 reported by github-monoculture. 9865b25c76aSJerome Forissier * Remove redundant include file in timing.c. Fixes #2640 reported by irwir. 98711fa71b9SJerome Forissier * Fix build failure when building with mingw on Windows by including 98811fa71b9SJerome Forissier stdarg.h where needed. Fixes #2656. 9895b25c76aSJerome Forissier * Fix Visual Studio Release x64 build configuration by inheriting 9905b25c76aSJerome Forissier PlatformToolset from the project configuration. Fixes #1430 reported by 9915b25c76aSJerome Forissier irwir. 9925b25c76aSJerome Forissier * Enable Suite B with subset of ECP curves. Make sure the code compiles even 9935b25c76aSJerome Forissier if some curves are not defined. Fixes #1591 reported by dbedev. 9945b25c76aSJerome Forissier * Fix misuse of signed arithmetic in the HAVEGE module. #2598 99511fa71b9SJerome Forissier * Avoid use of statically sized stack buffers for certificate writing. 99611fa71b9SJerome Forissier This previously limited the maximum size of DER encoded certificates 99711fa71b9SJerome Forissier in mbedtls_x509write_crt_der() to 2Kb. Reported by soccerGB in #2631. 99811fa71b9SJerome Forissier * Fix partial zeroing in x509_get_other_name. Found and fixed by ekse, #2716. 9995b25c76aSJerome Forissier * Update test certificates that were about to expire. Reported by 10005b25c76aSJerome Forissier Bernhard M. Wiedemann in #2357. 10015b25c76aSJerome Forissier * Fix the build on ARMv5TE in ARM mode to not use assembly instructions 10025b25c76aSJerome Forissier that are only available in Thumb mode. Fix contributed by Aurelien Jarno 10035b25c76aSJerome Forissier in #2169. 10045b25c76aSJerome Forissier * Fix propagation of restart contexts in restartable EC operations. 10055b25c76aSJerome Forissier This could previously lead to segmentation faults in builds using an 10065b25c76aSJerome Forissier address-sanitizer and enabling but not using MBEDTLS_ECP_RESTARTABLE. 10075b25c76aSJerome Forissier * Fix memory leak in in mpi_miller_rabin(). Contributed by 10085b25c76aSJerome Forissier Jens Wiklander <jens.wiklander@linaro.org> in #2363 10095b25c76aSJerome Forissier * Improve code clarity in x509_crt module, removing false-positive 10105b25c76aSJerome Forissier uninitialized variable warnings on some recent toolchains (GCC8, etc). 10115b25c76aSJerome Forissier Discovered and fixed by Andy Gross (Linaro), #2392. 10125b25c76aSJerome Forissier * Fix bug in endianness conversion in bignum module. This lead to 10135b25c76aSJerome Forissier functionally incorrect code on bigendian systems which don't have 10145b25c76aSJerome Forissier __BYTE_ORDER__ defined. Reported by Brendan Shanks. Fixes #2622. 10155b25c76aSJerome Forissier 10165b25c76aSJerome ForissierChanges 101711fa71b9SJerome Forissier * Replace multiple uses of MD2 by SHA-256 in X.509 test suite. Fixes #821. 10185b25c76aSJerome Forissier * Make it easier to define MBEDTLS_PARAM_FAILED as assert (which config.h 10195b25c76aSJerome Forissier suggests). #2671 10205b25c76aSJerome Forissier * Make `make clean` clean all programs always. Fixes #1862. 102111fa71b9SJerome Forissier * Add a Dockerfile and helper scripts (all-in-docker.sh, basic-in-docker.sh, 102211fa71b9SJerome Forissier docker-env.sh) to simplify running test suites on a Linux host. Contributed 102311fa71b9SJerome Forissier by Peter Kolbus (Garmin). 102411fa71b9SJerome Forissier * Add `reproducible` option to `ssl_client2` and `ssl_server2` to enable 102511fa71b9SJerome Forissier test runs without variability. Contributed by Philippe Antoine (Catena 102611fa71b9SJerome Forissier cyber) in #2681. 102711fa71b9SJerome Forissier * Extended .gitignore to ignore Visual Studio artifacts. Fixed by ConfusedSushi. 102811fa71b9SJerome Forissier * Adds fuzz targets, especially for continuous fuzzing with OSS-Fuzz. 102911fa71b9SJerome Forissier Contributed by Philippe Antoine (Catena cyber). 103011fa71b9SJerome Forissier * Remove the crypto part of the library from Mbed TLS. The crypto 103111fa71b9SJerome Forissier code and tests are now only available via Mbed Crypto, which 103211fa71b9SJerome Forissier Mbed TLS references as a Git submodule. 10335b25c76aSJerome Forissier 103411fa71b9SJerome Forissier= mbed TLS 2.18.1 branch released 2019-07-12 10355b25c76aSJerome Forissier 10365b25c76aSJerome ForissierBugfix 103711fa71b9SJerome Forissier * Fix build failure when building with mingw on Windows by including 103811fa71b9SJerome Forissier stdarg.h where needed. Fixes #2656. 103911fa71b9SJerome Forissier 104011fa71b9SJerome ForissierChanges 104111fa71b9SJerome Forissier * Enable building of Mbed TLS as a CMake subproject. Suggested and fixed by 104211fa71b9SJerome Forissier Ashley Duncan in #2609. 104311fa71b9SJerome Forissier 104411fa71b9SJerome Forissier= mbed TLS 2.18.0 branch released 2019-06-11 104511fa71b9SJerome Forissier 104611fa71b9SJerome ForissierFeatures 104711fa71b9SJerome Forissier * Add the Any Policy certificate policy oid, as defined in 104811fa71b9SJerome Forissier rfc 5280 section 4.2.1.4. 104911fa71b9SJerome Forissier * It is now possible to use NIST key wrap mode via the mbedtls_cipher API. 105011fa71b9SJerome Forissier Contributed by Jack Lloyd and Fortanix Inc. 105111fa71b9SJerome Forissier * Add the Wi-SUN Field Area Network (FAN) device extended key usage. 105211fa71b9SJerome Forissier * Add the oid certificate policy x509 extension. 105311fa71b9SJerome Forissier * It is now possible to perform RSA PKCS v1.5 signatures with RIPEMD-160 digest. 105411fa71b9SJerome Forissier Contributed by Jack Lloyd and Fortanix Inc. 105511fa71b9SJerome Forissier * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, 105611fa71b9SJerome Forissier and the used tls-prf. 105711fa71b9SJerome Forissier * Add public API for tls-prf function, according to requested enum. 105811fa71b9SJerome Forissier * Add support for parsing otherName entries in the Subject Alternative Name 105911fa71b9SJerome Forissier X.509 certificate extension, specifically type hardware module name, 106011fa71b9SJerome Forissier as defined in RFC 4108 section 5. 106111fa71b9SJerome Forissier * Add support for parsing certificate policies extension, as defined in 106211fa71b9SJerome Forissier RFC 5280 section 4.2.1.4. Currently, only the "Any Policy" policy is 106311fa71b9SJerome Forissier supported. 106411fa71b9SJerome Forissier * List all SAN types in the subject_alt_names field of the certificate. 106511fa71b9SJerome Forissier Resolves #459. 106611fa71b9SJerome Forissier * Add support for draft-05 of the Connection ID extension, as specified 106711fa71b9SJerome Forissier in https://tools.ietf.org/html/draft-ietf-tls-dtls-connection-id-05. 106811fa71b9SJerome Forissier The Connection ID extension allows to keep DTLS connections beyond the 106911fa71b9SJerome Forissier lifetime of the underlying transport by adding a connection identifier 107011fa71b9SJerome Forissier to the DTLS record header. This identifier can be used to associated an 107111fa71b9SJerome Forissier incoming record with the correct connection data even after the peer has 107211fa71b9SJerome Forissier changed its IP or port. The feature is enabled at compile-time by setting 107311fa71b9SJerome Forissier MBEDTLS_SSL_DTLS_CONNECTION_ID (disabled by default), and at run-time 107411fa71b9SJerome Forissier through the new APIs mbedtls_ssl_conf_cid() and mbedtls_ssl_set_cid(). 107511fa71b9SJerome Forissier 107611fa71b9SJerome Forissier 107711fa71b9SJerome ForissierAPI Changes 107811fa71b9SJerome Forissier * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, 107911fa71b9SJerome Forissier and the used tls-prf. 108011fa71b9SJerome Forissier * Add public API for tls-prf function, according to requested enum. 108111fa71b9SJerome Forissier 108211fa71b9SJerome ForissierBugfix 10835b25c76aSJerome Forissier * Fix private key DER output in the key_app_writer example. File contents 10845b25c76aSJerome Forissier were shifted by one byte, creating an invalid ASN.1 tag. Fixed by 10855b25c76aSJerome Forissier Christian Walther in #2239. 10865b25c76aSJerome Forissier * Fix potential memory leak in X.509 self test. Found and fixed by 10875b25c76aSJerome Forissier Junhwan Park, #2106. 10885b25c76aSJerome Forissier * Reduce stack usage of hkdf tests. Fixes #2195. 10895b25c76aSJerome Forissier * Fix 1-byte buffer overflow in mbedtls_mpi_write_string() when 10905b25c76aSJerome Forissier used with negative inputs. Found by Guido Vranken in #2404. Credit to 10915b25c76aSJerome Forissier OSS-Fuzz. 10925b25c76aSJerome Forissier * Fix bugs in the AEAD test suite which would be exposed by ciphers which 10935b25c76aSJerome Forissier either used both encrypt and decrypt key schedules, or which perform padding. 10945b25c76aSJerome Forissier GCM and CCM were not affected. Fixed by Jack Lloyd. 10955b25c76aSJerome Forissier * Fix incorrect default port number in ssl_mail_client example's usage. 10965b25c76aSJerome Forissier Found and fixed by irwir. #2337 109711fa71b9SJerome Forissier * Add psa_util.h to test/cpp_dummy_build to fix build_default_make_gcc_and_cxx. 109811fa71b9SJerome Forissier Fixed by Peter Kolbus (Garmin). #2579 10995b25c76aSJerome Forissier * Add missing parentheses around parameters in the definition of the 11005b25c76aSJerome Forissier public macro MBEDTLS_X509_ID_FLAG. This could lead to invalid evaluation 11015b25c76aSJerome Forissier in case operators binding less strongly than subtraction were used 11025b25c76aSJerome Forissier for the parameter. 11035b25c76aSJerome Forissier * Add a check for MBEDTLS_X509_CRL_PARSE_C in ssl_server2, guarding the crl 11045b25c76aSJerome Forissier sni entry parameter. Reported by inestlerode in #560. 110511fa71b9SJerome Forissier * Set the next sequence of the subject_alt_name to NULL when deleting 110611fa71b9SJerome Forissier sequence on failure. Found and fix suggested by Philippe Antoine. 110711fa71b9SJerome Forissier Credit to OSS-Fuzz. 11085b25c76aSJerome Forissier 11095b25c76aSJerome ForissierChanges 111011fa71b9SJerome Forissier * Server's RSA certificate in certs.c was SHA-1 signed. In the default 111111fa71b9SJerome Forissier mbedTLS configuration only SHA-2 signed certificates are accepted. 111211fa71b9SJerome Forissier This certificate is used in the demo server programs, which lead the 111311fa71b9SJerome Forissier client programs to fail at the peer's certificate verification 111411fa71b9SJerome Forissier due to an unacceptable hash signature. The certificate has been 111511fa71b9SJerome Forissier updated to one that is SHA-256 signed. Fix contributed by 111611fa71b9SJerome Forissier Illya Gerasymchuk. 11175b25c76aSJerome Forissier * Return from various debugging routines immediately if the 11185b25c76aSJerome Forissier provided SSL context is unset. 11195b25c76aSJerome Forissier * Remove dead code from bignum.c in the default configuration. 11205b25c76aSJerome Forissier Found by Coverity, reported and fixed by Peter Kolbus (Garmin). Fixes #2309. 11215b25c76aSJerome Forissier * Add test for minimal value of MBEDTLS_MPI_WINDOW_SIZE to all.sh. 11225b25c76aSJerome Forissier Contributed by Peter Kolbus (Garmin). 11235b25c76aSJerome Forissier * Change wording in the `mbedtls_ssl_conf_max_frag_len()`'s documentation to 11245b25c76aSJerome Forissier improve clarity. Fixes #2258. 11255b25c76aSJerome Forissier 112611fa71b9SJerome Forissier= mbed TLS 2.17.0 branch released 2019-03-19 11275b25c76aSJerome Forissier 11285b25c76aSJerome ForissierFeatures 112911fa71b9SJerome Forissier * Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()` 113011fa71b9SJerome Forissier which allows copy-less parsing of DER encoded X.509 CRTs, 113111fa71b9SJerome Forissier at the cost of additional lifetime constraints on the input 113211fa71b9SJerome Forissier buffer, but at the benefit of reduced RAM consumption. 113311fa71b9SJerome Forissier * Add a new function mbedtls_asn1_write_named_bitstring() to write ASN.1 113411fa71b9SJerome Forissier named bitstring in DER as required by RFC 5280 Appendix B. 11355b25c76aSJerome Forissier * Add MBEDTLS_REMOVE_3DES_CIPHERSUITES to allow removing 3DES ciphersuites 11365b25c76aSJerome Forissier from the default list (enabled by default). See 11375b25c76aSJerome Forissier https://sweet32.info/SWEET32_CCS16.pdf. 11385b25c76aSJerome Forissier 113911fa71b9SJerome ForissierAPI Changes 114011fa71b9SJerome Forissier * Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()`. 114111fa71b9SJerome Forissier See the Features section for more information. 114211fa71b9SJerome Forissier * Allow to opt in to the removal the API mbedtls_ssl_get_peer_cert() 114311fa71b9SJerome Forissier for the benefit of saving RAM, by disabling the new compile-time 114411fa71b9SJerome Forissier option MBEDTLS_SSL_KEEP_PEER_CERTIFICATE (enabled by default for 114511fa71b9SJerome Forissier API stability). Disabling this option makes mbedtls_ssl_get_peer_cert() 114611fa71b9SJerome Forissier always return NULL, and removes the peer_cert field from the 114711fa71b9SJerome Forissier mbedtls_ssl_session structure which otherwise stores the peer's 114811fa71b9SJerome Forissier certificate. 114911fa71b9SJerome Forissier 115011fa71b9SJerome ForissierSecurity 115111fa71b9SJerome Forissier * Make mbedtls_ecdh_get_params return an error if the second key 115211fa71b9SJerome Forissier belongs to a different group from the first. Before, if an application 115311fa71b9SJerome Forissier passed keys that belonged to different group, the first key's data was 115411fa71b9SJerome Forissier interpreted according to the second group, which could lead to either 115511fa71b9SJerome Forissier an error or a meaningless output from mbedtls_ecdh_get_params. In the 115611fa71b9SJerome Forissier latter case, this could expose at most 5 bits of the private key. 115711fa71b9SJerome Forissier 11585b25c76aSJerome ForissierBugfix 11595b25c76aSJerome Forissier * Fix a compilation issue with mbedtls_ecp_restart_ctx not being defined 11605b25c76aSJerome Forissier when MBEDTLS_ECP_ALT is defined. Reported by jwhui. Fixes #2242. 11615b25c76aSJerome Forissier * Run the AD too long test only if MBEDTLS_CCM_ALT is not defined. 11625b25c76aSJerome Forissier Raised as a comment in #1996. 11635b25c76aSJerome Forissier * Reduce the stack consumption of mbedtls_mpi_fill_random() which could 11645b25c76aSJerome Forissier previously lead to a stack overflow on constrained targets. 11655b25c76aSJerome Forissier * Add `MBEDTLS_SELF_TEST` for the mbedtls_self_test functions 11665b25c76aSJerome Forissier in the header files, which missed the precompilation check. #971 116711fa71b9SJerome Forissier * Fix returning the value 1 when mbedtls_ecdsa_genkey failed. 116811fa71b9SJerome Forissier * Remove a duplicate #include in a sample program. Fixed by Masashi Honma #2326. 116911fa71b9SJerome Forissier * Remove the mbedtls namespacing from the header file, to fix a "file not found" 117011fa71b9SJerome Forissier build error. Fixed by Haijun Gu #2319. 11715b25c76aSJerome Forissier * Fix signed-to-unsigned integer conversion warning 11725b25c76aSJerome Forissier in X.509 module. Fixes #2212. 11735b25c76aSJerome Forissier * Reduce stack usage of `mpi_write_hlp()` by eliminating recursion. 11745b25c76aSJerome Forissier Fixes #2190. 11755b25c76aSJerome Forissier * Fix false failure in all.sh when backup files exist in include/mbedtls 11765b25c76aSJerome Forissier (e.g. config.h.bak). Fixed by Peter Kolbus (Garmin) #2407. 11775b25c76aSJerome Forissier * Ensure that unused bits are zero when writing ASN.1 bitstrings when using 11785b25c76aSJerome Forissier mbedtls_asn1_write_bitstring(). 11795b25c76aSJerome Forissier * Fix issue when writing the named bitstrings in KeyUsage and NsCertType 11805b25c76aSJerome Forissier extensions in CSRs and CRTs that caused these bitstrings to not be encoded 11815b25c76aSJerome Forissier correctly as trailing zeroes were not accounted for as unused bits in the 11825b25c76aSJerome Forissier leading content octet. Fixes #1610. 11835b25c76aSJerome Forissier 11845b25c76aSJerome ForissierChanges 118511fa71b9SJerome Forissier * Reduce RAM consumption during session renegotiation by not storing 118611fa71b9SJerome Forissier the peer CRT chain and session ticket twice. 11875b25c76aSJerome Forissier * Include configuration file in all header files that use configuration, 11885b25c76aSJerome Forissier instead of relying on other header files that they include. 11895b25c76aSJerome Forissier Inserted as an enhancement for #1371 11905b25c76aSJerome Forissier * Add support for alternative CSR headers, as used by Microsoft and defined 11915b25c76aSJerome Forissier in RFC 7468. Found by Michael Ernst. Fixes #767. 119211fa71b9SJerome Forissier * Correct many misspellings. Fixed by MisterDA #2371. 119311fa71b9SJerome Forissier * Provide an abstraction of vsnprintf to allow alternative implementations 119411fa71b9SJerome Forissier for platforms that don't provide it. Based on contributions by Joris Aerts 119511fa71b9SJerome Forissier and Nathaniel Wesley Filardo. 119611fa71b9SJerome Forissier * Fix clobber list in MIPS assembly for large integer multiplication. 119711fa71b9SJerome Forissier Previously, this could lead to functionally incorrect assembly being 119811fa71b9SJerome Forissier produced by some optimizing compilers, showing up as failures in 119911fa71b9SJerome Forissier e.g. RSA or ECC signature operations. Reported in #1722, fix suggested 120011fa71b9SJerome Forissier by Aurelien Jarno and submitted by Jeffrey Martin. 12015b25c76aSJerome Forissier * Reduce the complexity of the timing tests. They were assuming more than the 12025b25c76aSJerome Forissier underlying OS actually guarantees. 120311fa71b9SJerome Forissier * Fix configuration queries in ssl-opt.h. #2030 120411fa71b9SJerome Forissier * Ensure that ssl-opt.h can be run in OS X. #2029 12055b25c76aSJerome Forissier * Re-enable certain interoperability tests in ssl-opt.sh which had previously 12065b25c76aSJerome Forissier been disabled for lack of a sufficiently recent version of GnuTLS on the CI. 12075b25c76aSJerome Forissier * Ciphersuites based on 3DES now have the lowest priority by default when 12085b25c76aSJerome Forissier they are enabled. 12095b25c76aSJerome Forissier 12103d3b0591SJens Wiklander= mbed TLS 2.16.0 branch released 2018-12-21 12113d3b0591SJens Wiklander 12123d3b0591SJens WiklanderFeatures 12133d3b0591SJens Wiklander * Add a new config.h option of MBEDTLS_CHECK_PARAMS that enables validation 12143d3b0591SJens Wiklander of parameters in the API. This allows detection of obvious misuses of the 12153d3b0591SJens Wiklander API, such as passing NULL pointers. The API of existing functions hasn't 12163d3b0591SJens Wiklander changed, but requirements on parameters have been made more explicit in 12173d3b0591SJens Wiklander the documentation. See the corresponding API documentation for each 12183d3b0591SJens Wiklander function to see for which parameter values it is defined. This feature is 12193d3b0591SJens Wiklander disabled by default. See its API documentation in config.h for additional 12203d3b0591SJens Wiklander steps you have to take when enabling it. 12213d3b0591SJens Wiklander 12223d3b0591SJens WiklanderAPI Changes 12233d3b0591SJens Wiklander * The following functions in the random generator modules have been 12243d3b0591SJens Wiklander deprecated and replaced as shown below. The new functions change 12253d3b0591SJens Wiklander the return type from void to int to allow returning error codes when 12263d3b0591SJens Wiklander using MBEDTLS_<MODULE>_ALT for the underlying AES or message digest 12273d3b0591SJens Wiklander primitive. Fixes #1798. 12283d3b0591SJens Wiklander mbedtls_ctr_drbg_update() -> mbedtls_ctr_drbg_update_ret() 12293d3b0591SJens Wiklander mbedtls_hmac_drbg_update() -> mbedtls_hmac_drbg_update_ret() 12303d3b0591SJens Wiklander * Extend ECDH interface to enable alternative implementations. 12313d3b0591SJens Wiklander * Deprecate error codes of the form MBEDTLS_ERR_xxx_INVALID_KEY_LENGTH for 12323d3b0591SJens Wiklander ARIA, CAMELLIA and Blowfish. These error codes will be replaced by 12333d3b0591SJens Wiklander the more generic per-module error codes MBEDTLS_ERR_xxx_BAD_INPUT_DATA. 12343d3b0591SJens Wiklander * Additional parameter validation checks have been added for the following 12353d3b0591SJens Wiklander modules - AES, ARIA, Blowfish, CAMELLIA, CCM, GCM, DHM, ECP, ECDSA, ECDH, 12363d3b0591SJens Wiklander ECJPAKE, SHA, Chacha20 and Poly1305, cipher, pk, RSA, and MPI. 12373d3b0591SJens Wiklander Where modules have had parameter validation added, existing parameter 12383d3b0591SJens Wiklander checks may have changed. Some modules, such as Chacha20 had existing 12393d3b0591SJens Wiklander parameter validation whereas other modules had little. This has now been 12403d3b0591SJens Wiklander changed so that the same level of validation is present in all modules, and 12413d3b0591SJens Wiklander that it is now optional with the MBEDTLS_CHECK_PARAMS flag which by default 12423d3b0591SJens Wiklander is off. That means that checks which were previously present by default 12433d3b0591SJens Wiklander will no longer be. 12443d3b0591SJens Wiklander 12453d3b0591SJens WiklanderNew deprecations 12463d3b0591SJens Wiklander * Deprecate mbedtls_ctr_drbg_update and mbedtls_hmac_drbg_update 12473d3b0591SJens Wiklander in favor of functions that can return an error code. 1248817466cbSJens Wiklander 1249817466cbSJens WiklanderBugfix 12503d3b0591SJens Wiklander * Fix for Clang, which was reporting a warning for the bignum.c inline 12513d3b0591SJens Wiklander assembly for AMD64 targets creating string literals greater than those 12523d3b0591SJens Wiklander permitted by the ISO C99 standard. Found by Aaron Jones. Fixes #482. 12533d3b0591SJens Wiklander * Fix runtime error in `mbedtls_platform_entropy_poll()` when run 12543d3b0591SJens Wiklander through qemu user emulation. Reported and fix suggested by randombit 12553d3b0591SJens Wiklander in #1212. Fixes #1212. 12563d3b0591SJens Wiklander * Fix an unsafe bounds check when restoring an SSL session from a ticket. 12573d3b0591SJens Wiklander This could lead to a buffer overflow, but only in case ticket authentication 12583d3b0591SJens Wiklander was broken. Reported and fix suggested by Guido Vranken in #659. 12593d3b0591SJens Wiklander * Add explicit integer to enumeration type casts to example program 12603d3b0591SJens Wiklander programs/pkey/gen_key which previously led to compilation failure 12613d3b0591SJens Wiklander on some toolchains. Reported by phoenixmcallister. Fixes #2170. 12623d3b0591SJens Wiklander * Fix double initialization of ECC hardware that made some accelerators 12633d3b0591SJens Wiklander hang. 12643d3b0591SJens Wiklander * Clarify documentation of mbedtls_ssl_set_own_cert() regarding the absence 12653d3b0591SJens Wiklander of check for certificate/key matching. Reported by Attila Molnar, #507. 12663d3b0591SJens Wiklander 126711fa71b9SJerome Forissier = mbed TLS 2.15.1 branch released 2018-11-30 126811fa71b9SJerome Forissier 126911fa71b9SJerome Forissier Changes 127011fa71b9SJerome Forissier * Update the Mbed Crypto submodule to version 0.1.0b2. 127111fa71b9SJerome Forissier 127211fa71b9SJerome Forissier = mbed TLS 2.15.0 branch released 2018-11-23 127311fa71b9SJerome Forissier 127411fa71b9SJerome Forissier Features 127511fa71b9SJerome Forissier * Add an experimental build option, USE_CRYPTO_SUBMODULE, to enable use of 127611fa71b9SJerome Forissier Mbed Crypto as the source of the cryptography implementation. 127711fa71b9SJerome Forissier * Add an experimental configuration option, MBEDTLS_PSA_CRYPTO_C, to enable 127811fa71b9SJerome Forissier the PSA Crypto API from Mbed Crypto when additionally used with the 127911fa71b9SJerome Forissier USE_CRYPTO_SUBMODULE build option. 128011fa71b9SJerome Forissier 128111fa71b9SJerome Forissier Changes 128211fa71b9SJerome Forissier * Add unit tests for AES-GCM when called through mbedtls_cipher_auth_xxx() 128311fa71b9SJerome Forissier from the cipher abstraction layer. Fixes #2198. 128411fa71b9SJerome Forissier 12853d3b0591SJens Wiklander= mbed TLS 2.14.1 branch released 2018-11-30 12863d3b0591SJens Wiklander 12873d3b0591SJens WiklanderSecurity 12883d3b0591SJens Wiklander * Fix timing variations and memory access variations in RSA PKCS#1 v1.5 12893d3b0591SJens Wiklander decryption that could lead to a Bleichenbacher-style padding oracle 12903d3b0591SJens Wiklander attack. In TLS, this affects servers that accept ciphersuites based on 12913d3b0591SJens Wiklander RSA decryption (i.e. ciphersuites whose name contains RSA but not 12923d3b0591SJens Wiklander (EC)DH(E)). Discovered by Eyal Ronen (Weizmann Institute), Robert Gillham 12933d3b0591SJens Wiklander (University of Adelaide), Daniel Genkin (University of Michigan), 12943d3b0591SJens Wiklander Adi Shamir (Weizmann Institute), David Wong (NCC Group), and Yuval Yarom 12953d3b0591SJens Wiklander (University of Adelaide, Data61). The attack is described in more detail 12963d3b0591SJens Wiklander in the paper available here: http://cat.eyalro.net/cat.pdf CVE-2018-19608 12973d3b0591SJens Wiklander * In mbedtls_mpi_write_binary(), don't leak the exact size of the number 12983d3b0591SJens Wiklander via branching and memory access patterns. An attacker who could submit 12993d3b0591SJens Wiklander a plaintext for RSA PKCS#1 v1.5 decryption but only observe the timing 13003d3b0591SJens Wiklander of the decryption and not its result could nonetheless decrypt RSA 13013d3b0591SJens Wiklander plaintexts and forge RSA signatures. Other asymmetric algorithms may 13023d3b0591SJens Wiklander have been similarly vulnerable. Reported by Eyal Ronen, Robert Gillham, 13033d3b0591SJens Wiklander Daniel Genkin, Adi Shamir, David Wong and Yuval Yarom. 13043d3b0591SJens Wiklander * Wipe sensitive buffers on the stack in the CTR_DRBG and HMAC_DRBG 13053d3b0591SJens Wiklander modules. 13063d3b0591SJens Wiklander 13073d3b0591SJens WiklanderAPI Changes 13083d3b0591SJens Wiklander * The new functions mbedtls_ctr_drbg_update_ret() and 13093d3b0591SJens Wiklander mbedtls_hmac_drbg_update_ret() are similar to mbedtls_ctr_drbg_update() 13103d3b0591SJens Wiklander and mbedtls_hmac_drbg_update() respectively, but the new functions 13113d3b0591SJens Wiklander report errors whereas the old functions return void. We recommend that 13123d3b0591SJens Wiklander applications use the new functions. 13133d3b0591SJens Wiklander 13143d3b0591SJens Wiklander= mbed TLS 2.14.0 branch released 2018-11-19 13153d3b0591SJens Wiklander 13163d3b0591SJens WiklanderSecurity 13173d3b0591SJens Wiklander * Fix overly strict DN comparison when looking for CRLs belonging to a 13183d3b0591SJens Wiklander particular CA. This previously led to ignoring CRLs when the CRL's issuer 13193d3b0591SJens Wiklander name and the CA's subject name differed in their string encoding (e.g., 13203d3b0591SJens Wiklander one using PrintableString and the other UTF8String) or in the choice of 13213d3b0591SJens Wiklander upper and lower case. Reported by Henrik Andersson of Bosch GmbH in issue 13223d3b0591SJens Wiklander #1784. 13233d3b0591SJens Wiklander * Fix a flawed bounds check in server PSK hint parsing. In case the 13243d3b0591SJens Wiklander incoming message buffer was placed within the first 64KiB of address 13253d3b0591SJens Wiklander space and a PSK-(EC)DHE ciphersuite was used, this allowed an attacker 13263d3b0591SJens Wiklander to trigger a memory access up to 64KiB beyond the incoming message buffer, 13273d3b0591SJens Wiklander potentially leading to an application crash or information disclosure. 13283d3b0591SJens Wiklander * Fix mbedtls_mpi_is_prime() to use more rounds of probabilistic testing. The 13293d3b0591SJens Wiklander previous settings for the number of rounds made it practical for an 13303d3b0591SJens Wiklander adversary to construct non-primes that would be erroneously accepted as 13313d3b0591SJens Wiklander primes with high probability. This does not have an impact on the 13323d3b0591SJens Wiklander security of TLS, but can matter in other contexts with numbers chosen 13333d3b0591SJens Wiklander potentially by an adversary that should be prime and can be validated. 13343d3b0591SJens Wiklander For example, the number of rounds was enough to securely generate RSA key 13353d3b0591SJens Wiklander pairs or Diffie-Hellman parameters, but was insufficient to validate 13363d3b0591SJens Wiklander Diffie-Hellman parameters properly. 13373d3b0591SJens Wiklander See "Prime and Prejudice" by by Martin R. Albrecht and Jake Massimo and 13383d3b0591SJens Wiklander Kenneth G. Paterson and Juraj Somorovsky. 13393d3b0591SJens Wiklander 13403d3b0591SJens WiklanderFeatures 13413d3b0591SJens Wiklander * Add support for temporarily suspending expensive ECC computations after 13423d3b0591SJens Wiklander some configurable amount of operations. This is intended to be used in 13433d3b0591SJens Wiklander constrained, single-threaded systems where ECC is time consuming and can 13443d3b0591SJens Wiklander block other operations until they complete. This is disabled by default, 13453d3b0591SJens Wiklander but can be enabled by MBEDTLS_ECP_RESTARTABLE at compile time and 13463d3b0591SJens Wiklander configured by mbedtls_ecp_set_max_ops() at runtime. It applies to the new 13473d3b0591SJens Wiklander xxx_restartable functions in ECP, ECDSA, PK and X.509 (CRL not supported 13483d3b0591SJens Wiklander yet), and to existing functions in ECDH and SSL (currently only 13493d3b0591SJens Wiklander implemented client-side, for ECDHE-ECDSA ciphersuites in TLS 1.2, 13503d3b0591SJens Wiklander including client authentication). 13513d3b0591SJens Wiklander * Add support for Arm CPU DSP extensions to accelerate asymmetric key 13523d3b0591SJens Wiklander operations. On CPUs where the extensions are available, they can accelerate 13533d3b0591SJens Wiklander MPI multiplications used in ECC and RSA cryptography. Contributed by 13543d3b0591SJens Wiklander Aurelien Jarno. 13553d3b0591SJens Wiklander * Extend RSASSA-PSS signature to allow a smaller salt size. Previously, PSS 13563d3b0591SJens Wiklander signature always used a salt with the same length as the hash, and returned 13573d3b0591SJens Wiklander an error if this was not possible. Now the salt size may be up to two bytes 13583d3b0591SJens Wiklander shorter. This allows the library to support all hash and signature sizes 13593d3b0591SJens Wiklander that comply with FIPS 186-4, including SHA-512 with a 1024-bit key. 13603d3b0591SJens Wiklander * Add support for 128-bit keys in CTR_DRBG. Note that using keys shorter 13613d3b0591SJens Wiklander than 256 bits limits the security of generated material to 128 bits. 13623d3b0591SJens Wiklander 13633d3b0591SJens WiklanderAPI Changes 13643d3b0591SJens Wiklander * Add a common error code of `MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED` for 13653d3b0591SJens Wiklander a feature that is not supported by underlying alternative 13663d3b0591SJens Wiklander implementations implementing cryptographic primitives. This is useful for 13673d3b0591SJens Wiklander hardware accelerators that don't implement all options or features. 13683d3b0591SJens Wiklander 13693d3b0591SJens WiklanderNew deprecations 13703d3b0591SJens Wiklander * All module specific errors following the form 13713d3b0591SJens Wiklander MBEDTLS_ERR_XXX_FEATURE_UNAVAILABLE that indicate a feature is not 13723d3b0591SJens Wiklander supported are deprecated and are now replaced by the new equivalent 13733d3b0591SJens Wiklander platform error. 13743d3b0591SJens Wiklander * All module specific generic hardware acceleration errors following the 13753d3b0591SJens Wiklander form MBEDTLS_ERR_XXX_HW_ACCEL_FAILED that are deprecated and are replaced 13763d3b0591SJens Wiklander by the equivalent plaform error. 13773d3b0591SJens Wiklander * Deprecate the function mbedtls_mpi_is_prime() in favor of 13783d3b0591SJens Wiklander mbedtls_mpi_is_prime_ext() which allows specifying the number of 13793d3b0591SJens Wiklander Miller-Rabin rounds. 13803d3b0591SJens Wiklander 13813d3b0591SJens WiklanderBugfix 13823d3b0591SJens Wiklander * Fix wrong order of freeing in programs/ssl/ssl_server2 example 13833d3b0591SJens Wiklander application leading to a memory leak in case both 13843d3b0591SJens Wiklander MBEDTLS_MEMORY_BUFFER_ALLOC_C and MBEDTLS_MEMORY_BACKTRACE are set. 13853d3b0591SJens Wiklander Fixes #2069. 13863d3b0591SJens Wiklander * Fix a bug in the update function for SSL ticket keys which previously 13873d3b0591SJens Wiklander invalidated keys of a lifetime of less than a 1s. Fixes #1968. 13883d3b0591SJens Wiklander * Fix failure in hmac_drbg in the benchmark sample application, when 13893d3b0591SJens Wiklander MBEDTLS_THREADING_C is defined. Found by TrinityTonic, #1095 13903d3b0591SJens Wiklander * Fix a bug in the record decryption routine ssl_decrypt_buf() 13913d3b0591SJens Wiklander which lead to accepting properly authenticated but improperly 13923d3b0591SJens Wiklander padded records in case of CBC ciphersuites using Encrypt-then-MAC. 13933d3b0591SJens Wiklander * Fix memory leak and freeing without initialization in the example 13943d3b0591SJens Wiklander program programs/x509/cert_write. Fixes #1422. 13953d3b0591SJens Wiklander * Ignore IV in mbedtls_cipher_set_iv() when the cipher mode is 13963d3b0591SJens Wiklander MBEDTLS_MODE_ECB. Found by ezdevelop. Fixes #1091. 13973d3b0591SJens Wiklander * Zeroize memory used for buffering or reassembling handshake messages 13983d3b0591SJens Wiklander after use. 13993d3b0591SJens Wiklander * Use `mbedtls_platform_zeroize()` instead of `memset()` for zeroization 14003d3b0591SJens Wiklander of sensitive data in the example programs aescrypt2 and crypt_and_hash. 14013d3b0591SJens Wiklander * Change the default string format used for various X.509 DN attributes to 14023d3b0591SJens Wiklander UTF8String. Previously, the use of the PrintableString format led to 14033d3b0591SJens Wiklander wildcards and non-ASCII characters being unusable in some DN attributes. 14043d3b0591SJens Wiklander Reported by raprepo in #1860 and by kevinpt in #468. Fix contributed by 14053d3b0591SJens Wiklander Thomas-Dee. 14063d3b0591SJens Wiklander * Fix compilation failure for configurations which use compile time 14073d3b0591SJens Wiklander replacements of standard calloc/free functions through the macros 14083d3b0591SJens Wiklander MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_FREE_MACRO. 14093d3b0591SJens Wiklander Reported by ole-de and ddhome2006. Fixes #882, #1642 and #1706. 14103d3b0591SJens Wiklander 14113d3b0591SJens WiklanderChanges 14123d3b0591SJens Wiklander * Removed support for Yotta as a build tool. 14133d3b0591SJens Wiklander * Add tests for session resumption in DTLS. 14143d3b0591SJens Wiklander * Close a test gap in (D)TLS between the client side and the server side: 14153d3b0591SJens Wiklander test the handling of large packets and small packets on the client side 14163d3b0591SJens Wiklander in the same way as on the server side. 14173d3b0591SJens Wiklander * Change the dtls_client and dtls_server samples to work by default over 14183d3b0591SJens Wiklander IPv6 and optionally by a build option over IPv4. 14193d3b0591SJens Wiklander * Change the use of Windows threading to use Microsoft Visual C++ runtime 14203d3b0591SJens Wiklander calls, rather than Win32 API calls directly. This is necessary to avoid 14213d3b0591SJens Wiklander conflict with C runtime usage. Found and fixed by irwir. 14223d3b0591SJens Wiklander * Remember the string format of X.509 DN attributes when replicating 14233d3b0591SJens Wiklander X.509 DNs. Previously, DN attributes were always written in their default 14243d3b0591SJens Wiklander string format (mostly PrintableString), which could lead to CRTs being 14253d3b0591SJens Wiklander created which used PrintableStrings in the issuer field even though the 14263d3b0591SJens Wiklander signing CA used UTF8Strings in its subject field; while X.509 compliant, 14273d3b0591SJens Wiklander such CRTs were rejected in some applications, e.g. some versions of 14283d3b0591SJens Wiklander Firefox, curl and GnuTLS. Reported in #1033 by Moschn. Fix contributed by 14293d3b0591SJens Wiklander Thomas-Dee. 14303d3b0591SJens Wiklander * Improve documentation of mbedtls_ssl_get_verify_result(). 14313d3b0591SJens Wiklander Fixes #517 reported by github-monoculture. 14323d3b0591SJens Wiklander * Add MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR flag to mbedtls_mpi_gen_prime() and 14333d3b0591SJens Wiklander use it to reduce error probability in RSA key generation to levels mandated 14343d3b0591SJens Wiklander by FIPS-186-4. 14353d3b0591SJens Wiklander 14363d3b0591SJens Wiklander= mbed TLS 2.13.1 branch released 2018-09-06 14373d3b0591SJens Wiklander 14383d3b0591SJens WiklanderAPI Changes 14393d3b0591SJens Wiklander * Extend the platform module with an abstraction mbedtls_platform_gmtime_r() 14403d3b0591SJens Wiklander whose implementation should behave as a thread-safe version of gmtime(). 14413d3b0591SJens Wiklander This allows users to configure such an implementation at compile time when 14423d3b0591SJens Wiklander the target system cannot be deduced automatically, by setting the option 14433d3b0591SJens Wiklander MBEDTLS_PLATFORM_GMTIME_R_ALT. At this stage Mbed TLS is only able to 14443d3b0591SJens Wiklander automatically select implementations for Windows and POSIX C libraries. 14453d3b0591SJens Wiklander 14463d3b0591SJens WiklanderBugfix 14473d3b0591SJens Wiklander * Fix build failures on platforms where only gmtime() is available but 14483d3b0591SJens Wiklander neither gmtime_r() nor gmtime_s() are present. Fixes #1907. 14493d3b0591SJens Wiklander 14503d3b0591SJens Wiklander= mbed TLS 2.13.0 branch released 2018-08-31 14513d3b0591SJens Wiklander 14523d3b0591SJens WiklanderSecurity 14533d3b0591SJens Wiklander * Fix an issue in the X.509 module which could lead to a buffer overread 14543d3b0591SJens Wiklander during certificate extensions parsing. In case of receiving malformed 14553d3b0591SJens Wiklander input (extensions length field equal to 0), an illegal read of one byte 14563d3b0591SJens Wiklander beyond the input buffer is made. Found and analyzed by Nathan Crandall. 14573d3b0591SJens Wiklander 14583d3b0591SJens WiklanderFeatures 14593d3b0591SJens Wiklander * Add support for fragmentation of outgoing DTLS handshake messages. This 14603d3b0591SJens Wiklander is controlled by the maximum fragment length as set locally or negotiated 14613d3b0591SJens Wiklander with the peer, as well as by a new per-connection MTU option, set using 14623d3b0591SJens Wiklander mbedtls_ssl_set_mtu(). 14633d3b0591SJens Wiklander * Add support for auto-adjustment of MTU to a safe value during the 14643d3b0591SJens Wiklander handshake when flights do not get through (RFC 6347, section 4.1.1.1, 14653d3b0591SJens Wiklander last paragraph). 14663d3b0591SJens Wiklander * Add support for packing multiple records within a single datagram, 14673d3b0591SJens Wiklander enabled by default. 14683d3b0591SJens Wiklander * Add support for buffering out-of-order handshake messages in DTLS. 14693d3b0591SJens Wiklander The maximum amount of RAM used for this can be controlled by the 14703d3b0591SJens Wiklander compile-time constant MBEDTLS_SSL_DTLS_MAX_BUFFERING defined 14713d3b0591SJens Wiklander in mbedtls/config.h. 14723d3b0591SJens Wiklander 14733d3b0591SJens WiklanderAPI Changes 14743d3b0591SJens Wiklander * Add function mbedtls_ssl_set_datagram_packing() to configure 14753d3b0591SJens Wiklander the use of datagram packing (enabled by default). 14763d3b0591SJens Wiklander 14773d3b0591SJens WiklanderBugfix 14783d3b0591SJens Wiklander * Fix a potential memory leak in mbedtls_ssl_setup() function. An allocation 14793d3b0591SJens Wiklander failure in the function could lead to other buffers being leaked. 14803d3b0591SJens Wiklander * Fixes an issue with MBEDTLS_CHACHAPOLY_C which would not compile if 14813d3b0591SJens Wiklander MBEDTLS_ARC4_C and MBEDTLS_CIPHER_NULL_CIPHER weren't also defined. #1890 14823d3b0591SJens Wiklander * Fix a memory leak in ecp_mul_comb() if ecp_precompute_comb() fails. 14833d3b0591SJens Wiklander Fix contributed by Espressif Systems. 14843d3b0591SJens Wiklander * Add ecc extensions only if an ecc based ciphersuite is used. 14853d3b0591SJens Wiklander This improves compliance to RFC 4492, and as a result, solves 14863d3b0591SJens Wiklander interoperability issues with BouncyCastle. Raised by milenamil in #1157. 14873d3b0591SJens Wiklander * Replace printf with mbedtls_printf in the ARIA module. Found by 14883d3b0591SJens Wiklander TrinityTonic in #1908. 14893d3b0591SJens Wiklander * Fix potential use-after-free in mbedtls_ssl_get_max_frag_len() 14903d3b0591SJens Wiklander and mbedtls_ssl_get_record_expansion() after a session reset. Fixes #1941. 14913d3b0591SJens Wiklander * Fix a bug that caused SSL/TLS clients to incorrectly abort the handshake 14923d3b0591SJens Wiklander with TLS versions 1.1 and earlier when the server requested authentication 14933d3b0591SJens Wiklander without providing a list of CAs. This was due to an overly strict bounds 14943d3b0591SJens Wiklander check in parsing the CertificateRequest message, 14953d3b0591SJens Wiklander introduced in Mbed TLS 2.12.0. Fixes #1954. 14963d3b0591SJens Wiklander * Fix a miscalculation of the maximum record expansion in 14973d3b0591SJens Wiklander mbedtls_ssl_get_record_expansion() in case of ChachaPoly ciphersuites, 14983d3b0591SJens Wiklander or CBC ciphersuites in (D)TLS versions 1.1 or higher. Fixes #1913, #1914. 14993d3b0591SJens Wiklander * Fix undefined shifts with negative values in certificates parsing 15003d3b0591SJens Wiklander (found by Catena cyber using oss-fuzz) 15013d3b0591SJens Wiklander * Fix memory leak and free without initialization in pk_encrypt 15023d3b0591SJens Wiklander and pk_decrypt example programs. Reported by Brace Stout. Fixes #1128. 15033d3b0591SJens Wiklander * Remove redundant else statement. Raised by irwir. Fixes #1776. 15043d3b0591SJens Wiklander 15053d3b0591SJens WiklanderChanges 15063d3b0591SJens Wiklander * Copy headers preserving timestamps when doing a "make install". 15073d3b0591SJens Wiklander Contributed by xueruini. 15083d3b0591SJens Wiklander * Allow the forward declaration of public structs. Contributed by Dawid 15093d3b0591SJens Wiklander Drozd. Fixes #1215 raised by randombit. 15103d3b0591SJens Wiklander * Improve compatibility with some alternative CCM implementations by using 15113d3b0591SJens Wiklander CCM test vectors from RAM. 15123d3b0591SJens Wiklander * Add support for buffering of out-of-order handshake messages. 15133d3b0591SJens Wiklander * Add warnings to the documentation of the HKDF module to reduce the risk 15143d3b0591SJens Wiklander of misusing the mbedtls_hkdf_extract() and mbedtls_hkdf_expand() 15153d3b0591SJens Wiklander functions. Fixes #1775. Reported by Brian J. Murray. 15163d3b0591SJens Wiklander 15173d3b0591SJens Wiklander= mbed TLS 2.12.0 branch released 2018-07-25 15183d3b0591SJens Wiklander 15193d3b0591SJens WiklanderSecurity 15203d3b0591SJens Wiklander * Fix a vulnerability in TLS ciphersuites based on CBC and using SHA-384, 15213d3b0591SJens Wiklander in (D)TLS 1.0 to 1.2, that allowed an active network attacker to 15223d3b0591SJens Wiklander partially recover the plaintext of messages under some conditions by 15233d3b0591SJens Wiklander exploiting timing measurements. With DTLS, the attacker could perform 15243d3b0591SJens Wiklander this recovery by sending many messages in the same connection. With TLS 15253d3b0591SJens Wiklander or if mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only 15263d3b0591SJens Wiklander worked if the same secret (for example a HTTP Cookie) has been repeatedly 15273d3b0591SJens Wiklander sent over connections manipulated by the attacker. Connections using GCM 15283d3b0591SJens Wiklander or CCM instead of CBC, using hash sizes other than SHA-384, or using 15293d3b0591SJens Wiklander Encrypt-then-Mac (RFC 7366) were not affected. The vulnerability was 15303d3b0591SJens Wiklander caused by a miscalculation (for SHA-384) in a countermeasure to the 15313d3b0591SJens Wiklander original Lucky 13 attack. Found by Kenny Paterson, Eyal Ronen and Adi 15323d3b0591SJens Wiklander Shamir. 15333d3b0591SJens Wiklander * Fix a vulnerability in TLS ciphersuites based on CBC, in (D)TLS 1.0 to 15343d3b0591SJens Wiklander 1.2, that allowed a local attacker, able to execute code on the local 15353d3b0591SJens Wiklander machine as well as manipulate network packets, to partially recover the 15363d3b0591SJens Wiklander plaintext of messages under some conditions by using a cache attack 15375b25c76aSJerome Forissier targeting an internal MD/SHA buffer. With TLS or if 15383d3b0591SJens Wiklander mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only worked if 15393d3b0591SJens Wiklander the same secret (for example a HTTP Cookie) has been repeatedly sent over 15403d3b0591SJens Wiklander connections manipulated by the attacker. Connections using GCM or CCM 15413d3b0591SJens Wiklander instead of CBC or using Encrypt-then-Mac (RFC 7366) were not affected. 15423d3b0591SJens Wiklander Found by Kenny Paterson, Eyal Ronen and Adi Shamir. 15433d3b0591SJens Wiklander * Add a counter-measure against a vulnerability in TLS ciphersuites based 15443d3b0591SJens Wiklander on CBC, in (D)TLS 1.0 to 1.2, that allowed a local attacker, able to 15453d3b0591SJens Wiklander execute code on the local machine as well as manipulate network packets, 15463d3b0591SJens Wiklander to partially recover the plaintext of messages under some conditions (see 15473d3b0591SJens Wiklander previous entry) by using a cache attack targeting the SSL input record 15483d3b0591SJens Wiklander buffer. Connections using GCM or CCM instead of CBC or using 15493d3b0591SJens Wiklander Encrypt-then-Mac (RFC 7366) were not affected. Found by Kenny Paterson, 15503d3b0591SJens Wiklander Eyal Ronen and Adi Shamir. 15513d3b0591SJens Wiklander 15523d3b0591SJens WiklanderFeatures 15533d3b0591SJens Wiklander * Add new crypto primitives from RFC 7539: stream cipher Chacha20, one-time 15543d3b0591SJens Wiklander authenticator Poly1305 and AEAD construct Chacha20-Poly1305. Contributed 15553d3b0591SJens Wiklander by Daniel King. 15563d3b0591SJens Wiklander * Add support for CHACHA20-POLY1305 ciphersuites from RFC 7905. 15573d3b0591SJens Wiklander * Add platform support for the Haiku OS. (https://www.haiku-os.org). 15583d3b0591SJens Wiklander Contributed by Augustin Cavalier. 15593d3b0591SJens Wiklander * Make the receive and transmit buffers independent sizes, for situations 15603d3b0591SJens Wiklander where the outgoing buffer can be fixed at a smaller size than the incoming 15613d3b0591SJens Wiklander buffer, which can save some RAM. If buffer lengths are kept equal, there 15623d3b0591SJens Wiklander is no functional difference. Contributed by Angus Gratton, and also 15633d3b0591SJens Wiklander independently contributed again by Paul Sokolovsky. 15643d3b0591SJens Wiklander * Add support for key wrapping modes based on AES as defined by 15653d3b0591SJens Wiklander NIST SP 800-38F algorithms KW and KWP and by RFC 3394 and RFC 5649. 15663d3b0591SJens Wiklander 15673d3b0591SJens WiklanderBugfix 15683d3b0591SJens Wiklander * Fix the key_app_writer example which was writing a leading zero byte which 15693d3b0591SJens Wiklander was creating an invalid ASN.1 tag. Found by Aryeh R. Fixes #1257. 15703d3b0591SJens Wiklander * Fix compilation error on C++, because of a variable named new. 15713d3b0591SJens Wiklander Found and fixed by Hirotaka Niisato in #1783. 15723d3b0591SJens Wiklander * Fix "no symbols" warning issued by ranlib when building on Mac OS X. Fix 15733d3b0591SJens Wiklander contributed by tabascoeye. 15743d3b0591SJens Wiklander * Clarify documentation for mbedtls_ssl_write() to include 0 as a valid 15753d3b0591SJens Wiklander return value. Found by @davidwu2000. #839 15763d3b0591SJens Wiklander * Fix a memory leak in mbedtls_x509_csr_parse(), found by catenacyber, 15773d3b0591SJens Wiklander Philippe Antoine. Fixes #1623. 15783d3b0591SJens Wiklander * Remove unused headers included in x509.c. Found by Chris Hanson and fixed 15793d3b0591SJens Wiklander by Brendan Shanks. Part of a fix for #992. 15803d3b0591SJens Wiklander * Fix compilation error when MBEDTLS_ARC4_C is disabled and 15813d3b0591SJens Wiklander MBEDTLS_CIPHER_NULL_CIPHER is enabled. Found by TrinityTonic in #1719. 15823d3b0591SJens Wiklander * Added length checks to some TLS parsing functions. Found and fixed by 15833d3b0591SJens Wiklander Philippe Antoine from Catena cyber. #1663. 15843d3b0591SJens Wiklander * Fix the inline assembly for the MPI multiply helper function for i386 and 15853d3b0591SJens Wiklander i386 with SSE2. Found by László Langó. Fixes #1550 15863d3b0591SJens Wiklander * Fix namespacing in header files. Remove the `mbedtls` namespacing in 15873d3b0591SJens Wiklander the `#include` in the header files. Resolves #857 15883d3b0591SJens Wiklander * Fix compiler warning of 'use before initialisation' in 15893d3b0591SJens Wiklander mbedtls_pk_parse_key(). Found by Martin Boye Petersen and fixed by Dawid 15903d3b0591SJens Wiklander Drozd. #1098 15913d3b0591SJens Wiklander * Fix decryption for zero length messages (which contain all padding) when a 15923d3b0591SJens Wiklander CBC based ciphersuite is used together with Encrypt-then-MAC. Previously, 15933d3b0591SJens Wiklander such a message was wrongly reported as an invalid record and therefore lead 15943d3b0591SJens Wiklander to the connection being terminated. Seen most often with OpenSSL using 15953d3b0591SJens Wiklander TLS 1.0. Reported by @kFYatek and by Conor Murphy on the forum. Fix 15963d3b0591SJens Wiklander contributed by Espressif Systems. Fixes #1632 15973d3b0591SJens Wiklander * Fix ssl_client2 example to send application data with 0-length content 15983d3b0591SJens Wiklander when the request_size argument is set to 0 as stated in the documentation. 15993d3b0591SJens Wiklander Fixes #1833. 16003d3b0591SJens Wiklander * Correct the documentation for `mbedtls_ssl_get_session()`. This API has 16013d3b0591SJens Wiklander deep copy of the session, and the peer certificate is not lost. Fixes #926. 16023d3b0591SJens Wiklander * Fix build using -std=c99. Fixed by Nick Wilson. 16033d3b0591SJens Wiklander 16043d3b0591SJens WiklanderChanges 16053d3b0591SJens Wiklander * Fail when receiving a TLS alert message with an invalid length, or invalid 16063d3b0591SJens Wiklander zero-length messages when using TLS 1.2. Contributed by Espressif Systems. 16073d3b0591SJens Wiklander * Change the default behaviour of mbedtls_hkdf_extract() to return an error 16083d3b0591SJens Wiklander when calling with a NULL salt and non-zero salt_len. Contributed by 16093d3b0591SJens Wiklander Brian J Murray 16103d3b0591SJens Wiklander * Change the shebang line in Perl scripts to look up perl in the PATH. 16113d3b0591SJens Wiklander Contributed by fbrosson. 16123d3b0591SJens Wiklander * Allow overriding the time on Windows via the platform-time abstraction. 16133d3b0591SJens Wiklander Fixed by Nick Wilson. 16143d3b0591SJens Wiklander * Use gmtime_r/gmtime_s for thread-safety. Fixed by Nick Wilson. 16153d3b0591SJens Wiklander 16163d3b0591SJens Wiklander= mbed TLS 2.11.0 branch released 2018-06-18 16173d3b0591SJens Wiklander 16183d3b0591SJens WiklanderFeatures 16193d3b0591SJens Wiklander * Add additional block mode, OFB (Output Feedback), to the AES module and 16203d3b0591SJens Wiklander cipher abstraction module. 16213d3b0591SJens Wiklander * Implement the HMAC-based extract-and-expand key derivation function 16223d3b0591SJens Wiklander (HKDF) per RFC 5869. Contributed by Thomas Fossati. 16233d3b0591SJens Wiklander * Add support for the CCM* block cipher mode as defined in IEEE Std. 802.15.4. 16243d3b0591SJens Wiklander * Add support for the XTS block cipher mode with AES (AES-XTS). 16253d3b0591SJens Wiklander Contributed by Aorimn in pull request #414. 16263d3b0591SJens Wiklander * In TLS servers, support offloading private key operations to an external 16273d3b0591SJens Wiklander cryptoprocessor. Private key operations can be asynchronous to allow 16283d3b0591SJens Wiklander non-blocking operation of the TLS server stack. 16293d3b0591SJens Wiklander 16303d3b0591SJens WiklanderBugfix 16313d3b0591SJens Wiklander * Fix the cert_write example to handle certificates signed with elliptic 16323d3b0591SJens Wiklander curves as well as RSA. Fixes #777 found by dbedev. 16333d3b0591SJens Wiklander * Fix for redefinition of _WIN32_WINNT to avoid overriding a definition 16343d3b0591SJens Wiklander used by user applications. Found and fixed by Fabio Alessandrelli. 16353d3b0591SJens Wiklander * Fix compilation warnings with IAR toolchain, on 32 bit platform. 16363d3b0591SJens Wiklander Reported by rahmanih in #683 16373d3b0591SJens Wiklander * Fix braces in mbedtls_memory_buffer_alloc_status(). Found by sbranden, #552. 16383d3b0591SJens Wiklander 16393d3b0591SJens WiklanderChanges 16403d3b0591SJens Wiklander * Changed CMake defaults for IAR to treat all compiler warnings as errors. 16413d3b0591SJens Wiklander * Changed the Clang parameters used in the CMake build files to work for 16423d3b0591SJens Wiklander versions later than 3.6. Versions of Clang earlier than this may no longer 16433d3b0591SJens Wiklander work. Fixes #1072 16443d3b0591SJens Wiklander 16453d3b0591SJens Wiklander= mbed TLS 2.10.0 branch released 2018-06-06 16463d3b0591SJens Wiklander 16473d3b0591SJens WiklanderFeatures 16483d3b0591SJens Wiklander * Add support for ARIA cipher (RFC 5794) and associated TLS ciphersuites 16493d3b0591SJens Wiklander (RFC 6209). Disabled by default, see MBEDTLS_ARIA_C in config.h 16503d3b0591SJens Wiklander 16513d3b0591SJens WiklanderAPI Changes 16523d3b0591SJens Wiklander * Extend the platform module with a util component that contains 16533d3b0591SJens Wiklander functionality shared by multiple Mbed TLS modules. At this stage 16543d3b0591SJens Wiklander platform_util.h (and its associated platform_util.c) only contain 16553d3b0591SJens Wiklander mbedtls_platform_zeroize(), which is a critical function from a security 16563d3b0591SJens Wiklander point of view. mbedtls_platform_zeroize() needs to be regularly tested 16573d3b0591SJens Wiklander against compilers to ensure that calls to it are not removed from the 16583d3b0591SJens Wiklander output binary as part of redundant code elimination optimizations. 16593d3b0591SJens Wiklander Therefore, mbedtls_platform_zeroize() is moved to the platform module to 16603d3b0591SJens Wiklander facilitate testing and maintenance. 16613d3b0591SJens Wiklander 16623d3b0591SJens WiklanderBugfix 16633d3b0591SJens Wiklander * Fix an issue with MicroBlaze support in bn_mul.h which was causing the 16643d3b0591SJens Wiklander build to fail. Found by zv-io. Fixes #1651. 16653d3b0591SJens Wiklander 16663d3b0591SJens WiklanderChanges 16673d3b0591SJens Wiklander * Support TLS testing in out-of-source builds using cmake. Fixes #1193. 16683d3b0591SJens Wiklander * Fix redundant declaration of mbedtls_ssl_list_ciphersuites. Raised by 16693d3b0591SJens Wiklander TrinityTonic. #1359. 16703d3b0591SJens Wiklander 16713d3b0591SJens Wiklander= mbed TLS 2.9.0 branch released 2018-04-30 16723d3b0591SJens Wiklander 16733d3b0591SJens WiklanderSecurity 16743d3b0591SJens Wiklander * Fix an issue in the X.509 module which could lead to a buffer overread 16753d3b0591SJens Wiklander during certificate validation. Additionally, the issue could also lead to 16763d3b0591SJens Wiklander unnecessary callback checks being made or to some validation checks to be 16773d3b0591SJens Wiklander omitted. The overread could be triggered remotely, while the other issues 16783d3b0591SJens Wiklander would require a non DER-compliant certificate to be correctly signed by a 16793d3b0591SJens Wiklander trusted CA, or a trusted CA with a non DER-compliant certificate. Found by 16803d3b0591SJens Wiklander luocm. Fixes #825. 16813d3b0591SJens Wiklander * Fix the buffer length assertion in the ssl_parse_certificate_request() 16823d3b0591SJens Wiklander function which led to an arbitrary overread of the message buffer. The 16833d3b0591SJens Wiklander overreads could be caused by receiving a malformed message at the point 16843d3b0591SJens Wiklander where an optional signature algorithms list is expected when the signature 16853d3b0591SJens Wiklander algorithms section is too short. In builds with debug output, the overread 16863d3b0591SJens Wiklander data is output with the debug data. 16873d3b0591SJens Wiklander * Fix a client-side bug in the validation of the server's ciphersuite choice 16883d3b0591SJens Wiklander which could potentially lead to the client accepting a ciphersuite it didn't 16893d3b0591SJens Wiklander offer or a ciphersuite that cannot be used with the TLS or DTLS version 16903d3b0591SJens Wiklander chosen by the server. This could lead to corruption of internal data 16913d3b0591SJens Wiklander structures for some configurations. 16923d3b0591SJens Wiklander 16933d3b0591SJens WiklanderFeatures 16943d3b0591SJens Wiklander * Add an option, MBEDTLS_AES_FEWER_TABLES, to dynamically compute smaller AES 16953d3b0591SJens Wiklander tables during runtime, thereby reducing the RAM/ROM footprint by ~6KiB. 16963d3b0591SJens Wiklander Suggested and contributed by jkivilin in pull request #394. 16973d3b0591SJens Wiklander * Add initial support for Curve448 (RFC 7748). Only mbedtls_ecp_mul() and 16983d3b0591SJens Wiklander ECDH primitive functions (mbedtls_ecdh_gen_public(), 16993d3b0591SJens Wiklander mbedtls_ecdh_compute_shared()) are supported for now. Contributed by 17003d3b0591SJens Wiklander Nicholas Wilson in pull request #348. 17013d3b0591SJens Wiklander 17023d3b0591SJens WiklanderAPI Changes 17033d3b0591SJens Wiklander * Extend the public API with the function of mbedtls_net_poll() to allow user 17043d3b0591SJens Wiklander applications to wait for a network context to become ready before reading 17053d3b0591SJens Wiklander or writing. 17063d3b0591SJens Wiklander * Add function mbedtls_ssl_check_pending() to the public API to allow 17073d3b0591SJens Wiklander a check for whether more more data is pending to be processed in the 17083d3b0591SJens Wiklander internal message buffers. 17093d3b0591SJens Wiklander This function is necessary to determine when it is safe to idle on the 17103d3b0591SJens Wiklander underlying transport in case event-driven IO is used. 17113d3b0591SJens Wiklander 17123d3b0591SJens WiklanderBugfix 17133d3b0591SJens Wiklander * Fix a spurious uninitialized variable warning in cmac.c. Fix independently 17143d3b0591SJens Wiklander contributed by Brian J Murray and David Brown. 17153d3b0591SJens Wiklander * Add missing dependencies in test suites that led to build failures 17163d3b0591SJens Wiklander in configurations that omit certain hashes or public-key algorithms. 17173d3b0591SJens Wiklander Fixes #1040. 17183d3b0591SJens Wiklander * Fix C89 incompatibility in benchmark.c. Contributed by Brendan Shanks. 17193d3b0591SJens Wiklander #1353 17203d3b0591SJens Wiklander * Add missing dependencies for MBEDTLS_HAVE_TIME_DATE and 17213d3b0591SJens Wiklander MBEDTLS_VERSION_FEATURES in some test suites. Contributed by 17223d3b0591SJens Wiklander Deomid Ryabkov. Fixes #1299, #1475. 17233d3b0591SJens Wiklander * Fix the Makefile build process for building shared libraries on Mac OS X. 17243d3b0591SJens Wiklander Fixed by mnacamura. 17253d3b0591SJens Wiklander * Fix parsing of PKCS#8 encoded Elliptic Curve keys. Previously Mbed TLS was 17263d3b0591SJens Wiklander unable to parse keys which had only the optional parameters field of the 17273d3b0591SJens Wiklander ECPrivateKey structure. Found by Jethro Beekman, fixed in #1379. 17283d3b0591SJens Wiklander * Return the plaintext data more quickly on unpadded CBC decryption, as 17293d3b0591SJens Wiklander stated in the mbedtls_cipher_update() documentation. Contributed by 17303d3b0591SJens Wiklander Andy Leiserson. 17313d3b0591SJens Wiklander * Fix overriding and ignoring return values when parsing and writing to 17323d3b0591SJens Wiklander a file in pk_sign program. Found by kevlut in #1142. 17333d3b0591SJens Wiklander * Restrict usage of error code MBEDTLS_ERR_SSL_WANT_READ to situations 17343d3b0591SJens Wiklander where data needs to be fetched from the underlying transport in order 17353d3b0591SJens Wiklander to make progress. Previously, this error code was also occasionally 17363d3b0591SJens Wiklander returned when unexpected messages were being discarded, ignoring that 17373d3b0591SJens Wiklander further messages could potentially already be pending to be processed 17383d3b0591SJens Wiklander in the internal buffers; these cases led to deadlocks when event-driven 17393d3b0591SJens Wiklander I/O was used. Found and reported by Hubert Mis in #772. 17403d3b0591SJens Wiklander * Fix buffer length assertions in the ssl_parse_certificate_request() 17413d3b0591SJens Wiklander function which leads to a potential one byte overread of the message 17423d3b0591SJens Wiklander buffer. 17433d3b0591SJens Wiklander * Fix invalid buffer sizes passed to zlib during record compression and 17443d3b0591SJens Wiklander decompression. 17453d3b0591SJens Wiklander * Fix the soversion of libmbedcrypto to match the soversion of the 17463d3b0591SJens Wiklander maintained 2.7 branch. The soversion was increased in Mbed TLS 17473d3b0591SJens Wiklander version 2.7.1 to reflect breaking changes in that release, but the 17483d3b0591SJens Wiklander increment was missed in 2.8.0 and later releases outside of the 2.7 branch. 17493d3b0591SJens Wiklander 17503d3b0591SJens WiklanderChanges 17513d3b0591SJens Wiklander * Remove some redundant code in bignum.c. Contributed by Alexey Skalozub. 17523d3b0591SJens Wiklander * Support cmake builds where Mbed TLS is a subproject. Fix contributed 17533d3b0591SJens Wiklander independently by Matthieu Volat and Arne Schwabe. 17543d3b0591SJens Wiklander * Improve testing in configurations that omit certain hashes or 17553d3b0591SJens Wiklander public-key algorithms. Includes contributions by Gert van Dijk. 17563d3b0591SJens Wiklander * Improve negative testing of X.509 parsing. 17573d3b0591SJens Wiklander * Do not define global mutexes around readdir() and gmtime() in 17583d3b0591SJens Wiklander configurations where the feature is disabled. Found and fixed by Gergely 17593d3b0591SJens Wiklander Budai. 17603d3b0591SJens Wiklander * Harden the function mbedtls_ssl_config_free() against misuse, so that it 17613d3b0591SJens Wiklander doesn't leak memory if the user doesn't use mbedtls_ssl_conf_psk() and 17623d3b0591SJens Wiklander instead incorrectly manipulates the configuration structure directly. 17633d3b0591SJens Wiklander Found and fix submitted by junyeonLEE in #1220. 17643d3b0591SJens Wiklander * Provide an empty implementation of mbedtls_pkcs5_pbes2() when 17653d3b0591SJens Wiklander MBEDTLS_ASN1_PARSE_C is not enabled. This allows the use of PBKDF2 17663d3b0591SJens Wiklander without PBES2. Fixed by Marcos Del Sol Vives. 17673d3b0591SJens Wiklander * Add the order of the base point as N in the mbedtls_ecp_group structure 17683d3b0591SJens Wiklander for Curve25519 (other curves had it already). Contributed by Nicholas 17693d3b0591SJens Wiklander Wilson #481 17703d3b0591SJens Wiklander * Improve the documentation of mbedtls_net_accept(). Contributed by Ivan 17713d3b0591SJens Wiklander Krylov. 17723d3b0591SJens Wiklander * Improve the documentation of mbedtls_ssl_write(). Suggested by 17733d3b0591SJens Wiklander Paul Sokolovsky in #1356. 17743d3b0591SJens Wiklander * Add an option in the Makefile to support ar utilities where the operation 17753d3b0591SJens Wiklander letter must not be prefixed by '-', such as LLVM. Found and fixed by 17763d3b0591SJens Wiklander Alex Hixon. 17773d3b0591SJens Wiklander * Allow configuring the shared library extension by setting the DLEXT 17783d3b0591SJens Wiklander environment variable when using the project makefiles. 17793d3b0591SJens Wiklander * Optimize unnecessary zeroing in mbedtls_mpi_copy. Based on a contribution 17803d3b0591SJens Wiklander by Alexey Skalozub in #405. 17813d3b0591SJens Wiklander * In the SSL module, when f_send, f_recv or f_recv_timeout report 17823d3b0591SJens Wiklander transmitting more than the required length, return an error. Raised by 17833d3b0591SJens Wiklander Sam O'Connor in #1245. 17843d3b0591SJens Wiklander * Improve robustness of mbedtls_ssl_derive_keys against the use of 17853d3b0591SJens Wiklander HMAC functions with non-HMAC ciphersuites. Independently contributed 17863d3b0591SJens Wiklander by Jiayuan Chen in #1377. Fixes #1437. 17873d3b0591SJens Wiklander * Improve security of RSA key generation by including criteria from 17883d3b0591SJens Wiklander FIPS 186-4. Contributed by Jethro Beekman. #1380 17893d3b0591SJens Wiklander * Declare functions in header files even when an alternative implementation 17903d3b0591SJens Wiklander of the corresponding module is activated by defining the corresponding 17913d3b0591SJens Wiklander MBEDTLS_XXX_ALT macro. This means that alternative implementations do 17923d3b0591SJens Wiklander not need to copy the declarations, and ensures that they will have the 17933d3b0591SJens Wiklander same API. 17943d3b0591SJens Wiklander * Add platform setup and teardown calls in test suites. 17953d3b0591SJens Wiklander 17963d3b0591SJens Wiklander= mbed TLS 2.8.0 branch released 2018-03-16 17973d3b0591SJens Wiklander 17983d3b0591SJens WiklanderDefault behavior changes 17993d3b0591SJens Wiklander * The truncated HMAC extension now conforms to RFC 6066. This means 18003d3b0591SJens Wiklander that when both sides of a TLS connection negotiate the truncated 18013d3b0591SJens Wiklander HMAC extension, Mbed TLS can now interoperate with other 18023d3b0591SJens Wiklander compliant implementations, but this breaks interoperability with 18033d3b0591SJens Wiklander prior versions of Mbed TLS. To restore the old behavior, enable 18043d3b0591SJens Wiklander the (deprecated) option MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT in 18053d3b0591SJens Wiklander config.h. Found by Andreas Walz (ivESK, Offenburg University of 18063d3b0591SJens Wiklander Applied Sciences). 18073d3b0591SJens Wiklander 18083d3b0591SJens WiklanderSecurity 18093d3b0591SJens Wiklander * Fix implementation of the truncated HMAC extension. The previous 18103d3b0591SJens Wiklander implementation allowed an offline 2^80 brute force attack on the 18113d3b0591SJens Wiklander HMAC key of a single, uninterrupted connection (with no 18123d3b0591SJens Wiklander resumption of the session). 18133d3b0591SJens Wiklander * Verify results of RSA private key operations to defend 18143d3b0591SJens Wiklander against Bellcore glitch attack. 18153d3b0591SJens Wiklander * Fix a buffer overread in ssl_parse_server_key_exchange() that could cause 18163d3b0591SJens Wiklander a crash on invalid input. 18173d3b0591SJens Wiklander * Fix a buffer overread in ssl_parse_server_psk_hint() that could cause a 18183d3b0591SJens Wiklander crash on invalid input. 18193d3b0591SJens Wiklander * Fix CRL parsing to reject CRLs containing unsupported critical 18203d3b0591SJens Wiklander extensions. Found by Falko Strenzke and Evangelos Karatsiolis. 18213d3b0591SJens Wiklander 18223d3b0591SJens WiklanderFeatures 18233d3b0591SJens Wiklander * Extend PKCS#8 interface by introducing support for the entire SHA 18243d3b0591SJens Wiklander algorithms family when encrypting private keys using PKCS#5 v2.0. 18253d3b0591SJens Wiklander This allows reading encrypted PEM files produced by software that 18263d3b0591SJens Wiklander uses PBKDF2-SHA2, such as OpenSSL 1.1. Submitted by Antonio Quartulli, 18273d3b0591SJens Wiklander OpenVPN Inc. Fixes #1339 18283d3b0591SJens Wiklander * Add support for public keys encoded in PKCS#1 format. #1122 18293d3b0591SJens Wiklander 18303d3b0591SJens WiklanderNew deprecations 18313d3b0591SJens Wiklander * Deprecate support for record compression (configuration option 18323d3b0591SJens Wiklander MBEDTLS_ZLIB_SUPPORT). 18333d3b0591SJens Wiklander 18343d3b0591SJens WiklanderBugfix 18353d3b0591SJens Wiklander * Fix the name of a DHE parameter that was accidentally changed in 2.7.0. 18363d3b0591SJens Wiklander Fixes #1358. 18373d3b0591SJens Wiklander * Fix test_suite_pk to work on 64-bit ILP32 systems. #849 18383d3b0591SJens Wiklander * Fix mbedtls_x509_crt_profile_suiteb, which used to reject all certificates 18393d3b0591SJens Wiklander with flag MBEDTLS_X509_BADCERT_BAD_PK even when the key type was correct. 18403d3b0591SJens Wiklander In the context of SSL, this resulted in handshake failure. Reported by 18413d3b0591SJens Wiklander daniel in the Mbed TLS forum. #1351 18423d3b0591SJens Wiklander * Fix Windows x64 builds with the included mbedTLS.sln file. #1347 18433d3b0591SJens Wiklander * Fix setting version TLSv1 as minimal version, even if TLS 1 18443d3b0591SJens Wiklander is not enabled. Set MBEDTLS_SSL_MIN_MAJOR_VERSION 18453d3b0591SJens Wiklander and MBEDTLS_SSL_MIN_MINOR_VERSION instead of 18463d3b0591SJens Wiklander MBEDTLS_SSL_MAJOR_VERSION_3 and MBEDTLS_SSL_MINOR_VERSION_1. #664 18473d3b0591SJens Wiklander * Fix compilation error on Mingw32 when _TRUNCATE is defined. Use _TRUNCATE 18483d3b0591SJens Wiklander only if __MINGW32__ not defined. Fix suggested by Thomas Glanzmann and 18493d3b0591SJens Wiklander Nick Wilson on issue #355 18503d3b0591SJens Wiklander * In test_suite_pk, pass valid parameters when testing for hash length 18513d3b0591SJens Wiklander overflow. #1179 18523d3b0591SJens Wiklander * Fix memory allocation corner cases in memory_buffer_alloc.c module. Found 18533d3b0591SJens Wiklander by Guido Vranken. #639 18543d3b0591SJens Wiklander * Log correct number of ciphersuites used in Client Hello message. #918 18553d3b0591SJens Wiklander * Fix X509 CRT parsing that would potentially accept an invalid tag when 18563d3b0591SJens Wiklander parsing the subject alternative names. 18573d3b0591SJens Wiklander * Fix a possible arithmetic overflow in ssl_parse_server_key_exchange() 18583d3b0591SJens Wiklander that could cause a key exchange to fail on valid data. 18593d3b0591SJens Wiklander * Fix a possible arithmetic overflow in ssl_parse_server_psk_hint() that 18603d3b0591SJens Wiklander could cause a key exchange to fail on valid data. 18613d3b0591SJens Wiklander * Don't define mbedtls_aes_decrypt and mbedtls_aes_encrypt under 18623d3b0591SJens Wiklander MBEDTLS_DEPRECATED_REMOVED. #1388 18633d3b0591SJens Wiklander * Fix a 1-byte heap buffer overflow (read-only) during private key parsing. 18643d3b0591SJens Wiklander Found through fuzz testing. 18653d3b0591SJens Wiklander 18663d3b0591SJens WiklanderChanges 18673d3b0591SJens Wiklander * Fix tag lengths and value ranges in the documentation of CCM encryption. 18683d3b0591SJens Wiklander Contributed by Mathieu Briand. 18693d3b0591SJens Wiklander * Fix typo in a comment ctr_drbg.c. Contributed by Paul Sokolovsky. 18703d3b0591SJens Wiklander * Remove support for the library reference configuration for picocoin. 18713d3b0591SJens Wiklander * MD functions deprecated in 2.7.0 are no longer inline, to provide 18723d3b0591SJens Wiklander a migration path for those depending on the library's ABI. 18733d3b0591SJens Wiklander * Clarify the documentation of mbedtls_ssl_setup. 18743d3b0591SJens Wiklander * Use (void) when defining functions with no parameters. Contributed by 18753d3b0591SJens Wiklander Joris Aerts. #678 18763d3b0591SJens Wiklander 18773d3b0591SJens Wiklander= mbed TLS 2.7.0 branch released 2018-02-03 18783d3b0591SJens Wiklander 18793d3b0591SJens WiklanderSecurity 18803d3b0591SJens Wiklander * Fix a heap corruption issue in the implementation of the truncated HMAC 18813d3b0591SJens Wiklander extension. When the truncated HMAC extension is enabled and CBC is used, 18823d3b0591SJens Wiklander sending a malicious application packet could be used to selectively corrupt 18833d3b0591SJens Wiklander 6 bytes on the peer's heap, which could potentially lead to crash or remote 18843d3b0591SJens Wiklander code execution. The issue could be triggered remotely from either side in 18853d3b0591SJens Wiklander both TLS and DTLS. CVE-2018-0488 18863d3b0591SJens Wiklander * Fix a buffer overflow in RSA-PSS verification when the hash was too large 18873d3b0591SJens Wiklander for the key size, which could potentially lead to crash or remote code 18883d3b0591SJens Wiklander execution. Found by Seth Terashima, Qualcomm Product Security Initiative, 18893d3b0591SJens Wiklander Qualcomm Technologies Inc. CVE-2018-0487 18903d3b0591SJens Wiklander * Fix buffer overflow in RSA-PSS verification when the unmasked data is all 18913d3b0591SJens Wiklander zeros. 18923d3b0591SJens Wiklander * Fix an unsafe bounds check in ssl_parse_client_psk_identity() when adding 18933d3b0591SJens Wiklander 64 KiB to the address of the SSL buffer and causing a wrap around. 18943d3b0591SJens Wiklander * Fix a potential heap buffer overflow in mbedtls_ssl_write(). When the (by 18953d3b0591SJens Wiklander default enabled) maximum fragment length extension is disabled in the 18963d3b0591SJens Wiklander config and the application data buffer passed to mbedtls_ssl_write 18973d3b0591SJens Wiklander is larger than the internal message buffer (16384 bytes by default), the 18983d3b0591SJens Wiklander latter overflows. The exploitability of this issue depends on whether the 18993d3b0591SJens Wiklander application layer can be forced into sending such large packets. The issue 19003d3b0591SJens Wiklander was independently reported by Tim Nordell via e-mail and by Florin Petriuc 19013d3b0591SJens Wiklander and sjorsdewit on GitHub. Fix proposed by Florin Petriuc in #1022. 19023d3b0591SJens Wiklander Fixes #707. 19033d3b0591SJens Wiklander * Add a provision to prevent compiler optimizations breaking the time 19043d3b0591SJens Wiklander constancy of mbedtls_ssl_safer_memcmp(). 19053d3b0591SJens Wiklander * Ensure that buffers are cleared after use if they contain sensitive data. 19063d3b0591SJens Wiklander Changes were introduced in multiple places in the library. 19073d3b0591SJens Wiklander * Set PEM buffer to zero before freeing it, to avoid decoded private keys 19083d3b0591SJens Wiklander being leaked to memory after release. 19093d3b0591SJens Wiklander * Fix dhm_check_range() failing to detect trivial subgroups and potentially 19103d3b0591SJens Wiklander leaking 1 bit of the private key. Reported by prashantkspatil. 19113d3b0591SJens Wiklander * Make mbedtls_mpi_read_binary() constant-time with respect to the input 19123d3b0591SJens Wiklander data. Previously, trailing zero bytes were detected and omitted for the 19133d3b0591SJens Wiklander sake of saving memory, but potentially leading to slight timing 19143d3b0591SJens Wiklander differences. Reported by Marco Macchetti, Kudelski Group. 19153d3b0591SJens Wiklander * Wipe stack buffer temporarily holding EC private exponent 19163d3b0591SJens Wiklander after keypair generation. 19173d3b0591SJens Wiklander * Fix a potential heap buffer over-read in ALPN extension parsing 19183d3b0591SJens Wiklander (server-side). Could result in application crash, but only if an ALPN 19193d3b0591SJens Wiklander name larger than 16 bytes had been configured on the server. 19203d3b0591SJens Wiklander * Change default choice of DHE parameters from untrustworthy RFC 5114 19213d3b0591SJens Wiklander to RFC 3526 containing parameters generated in a nothing-up-my-sleeve 19223d3b0591SJens Wiklander manner. 19233d3b0591SJens Wiklander 19243d3b0591SJens WiklanderFeatures 19253d3b0591SJens Wiklander * Allow comments in test data files. 19263d3b0591SJens Wiklander * The selftest program can execute a subset of the tests based on command 19273d3b0591SJens Wiklander line arguments. 19283d3b0591SJens Wiklander * New unit tests for timing. Improve the self-test to be more robust 19293d3b0591SJens Wiklander when run on a heavily-loaded machine. 19303d3b0591SJens Wiklander * Add alternative implementation support for CCM and CMAC (MBEDTLS_CCM_ALT, 19313d3b0591SJens Wiklander MBEDTLS_CMAC_ALT). Submitted by Steven Cooreman, Silicon Labs. 19323d3b0591SJens Wiklander * Add support for alternative implementations of GCM, selected by the 19333d3b0591SJens Wiklander configuration flag MBEDTLS_GCM_ALT. 19343d3b0591SJens Wiklander * Add support for alternative implementations for ECDSA, controlled by new 19353d3b0591SJens Wiklander configuration flags MBEDTLS_ECDSA_SIGN_ALT, MBEDTLS_ECDSA_VERIFY_ALT and 19363d3b0591SJens Wiklander MBEDTLS_ECDSDA_GENKEY_AT in config.h. 19373d3b0591SJens Wiklander The following functions from the ECDSA module can be replaced 19383d3b0591SJens Wiklander with alternative implementation: 19393d3b0591SJens Wiklander mbedtls_ecdsa_sign(), mbedtls_ecdsa_verify() and mbedtls_ecdsa_genkey(). 19403d3b0591SJens Wiklander * Add support for alternative implementation of ECDH, controlled by the 19413d3b0591SJens Wiklander new configuration flags MBEDTLS_ECDH_COMPUTE_SHARED_ALT and 19423d3b0591SJens Wiklander MBEDTLS_ECDH_GEN_PUBLIC_ALT in config.h. 19433d3b0591SJens Wiklander The following functions from the ECDH module can be replaced 19443d3b0591SJens Wiklander with an alternative implementation: 19453d3b0591SJens Wiklander mbedtls_ecdh_gen_public() and mbedtls_ecdh_compute_shared(). 19463d3b0591SJens Wiklander * Add support for alternative implementation of ECJPAKE, controlled by 19473d3b0591SJens Wiklander the new configuration flag MBEDTLS_ECJPAKE_ALT. 19483d3b0591SJens Wiklander * Add mechanism to provide alternative implementation of the DHM module. 19493d3b0591SJens Wiklander 19503d3b0591SJens WiklanderAPI Changes 19513d3b0591SJens Wiklander * Extend RSA interface by multiple functions allowing structure- 19523d3b0591SJens Wiklander independent setup and export of RSA contexts. Most notably, 19533d3b0591SJens Wiklander mbedtls_rsa_import() and mbedtls_rsa_complete() are introduced for setting 19543d3b0591SJens Wiklander up RSA contexts from partial key material and having them completed to the 19553d3b0591SJens Wiklander needs of the implementation automatically. This allows to setup private RSA 19563d3b0591SJens Wiklander contexts from keys consisting of N,D,E only, even if P,Q are needed for the 19573d3b0591SJens Wiklander purpose or CRT and/or blinding. 19583d3b0591SJens Wiklander * The configuration option MBEDTLS_RSA_ALT can be used to define alternative 19593d3b0591SJens Wiklander implementations of the RSA interface declared in rsa.h. 19603d3b0591SJens Wiklander * The following functions in the message digest modules (MD2, MD4, MD5, 19613d3b0591SJens Wiklander SHA1, SHA256, SHA512) have been deprecated and replaced as shown below. 19623d3b0591SJens Wiklander The new functions change the return type from void to int to allow 19633d3b0591SJens Wiklander returning error codes when using MBEDTLS_<MODULE>_ALT. 19643d3b0591SJens Wiklander mbedtls_<MODULE>_starts() -> mbedtls_<MODULE>_starts_ret() 19653d3b0591SJens Wiklander mbedtls_<MODULE>_update() -> mbedtls_<MODULE>_update_ret() 19663d3b0591SJens Wiklander mbedtls_<MODULE>_finish() -> mbedtls_<MODULE>_finish_ret() 19673d3b0591SJens Wiklander mbedtls_<MODULE>_process() -> mbedtls_internal_<MODULE>_process() 19683d3b0591SJens Wiklander 19693d3b0591SJens WiklanderNew deprecations 19703d3b0591SJens Wiklander * Deprecate usage of RSA primitives with non-matching key-type 19713d3b0591SJens Wiklander (e.g. signing with a public key). 19723d3b0591SJens Wiklander * Direct manipulation of structure fields of RSA contexts is deprecated. 19733d3b0591SJens Wiklander Users are advised to use the extended RSA API instead. 19743d3b0591SJens Wiklander * Deprecate usage of message digest functions that return void 19753d3b0591SJens Wiklander (mbedtls_<MODULE>_starts, mbedtls_<MODULE>_update, 19763d3b0591SJens Wiklander mbedtls_<MODULE>_finish and mbedtls_<MODULE>_process where <MODULE> is 19773d3b0591SJens Wiklander any of MD2, MD4, MD5, SHA1, SHA256, SHA512) in favor of functions 19783d3b0591SJens Wiklander that can return an error code. 19793d3b0591SJens Wiklander * Deprecate untrustworthy DHE parameters from RFC 5114. Superseded by 19803d3b0591SJens Wiklander parameters from RFC 3526 or the newly added parameters from RFC 7919. 19813d3b0591SJens Wiklander * Deprecate hex string DHE constants MBEDTLS_DHM_RFC3526_MODP_2048_P etc. 19823d3b0591SJens Wiklander Supserseded by binary encoded constants MBEDTLS_DHM_RFC3526_MODP_2048_P_BIN 19833d3b0591SJens Wiklander etc. 19843d3b0591SJens Wiklander * Deprecate mbedtls_ssl_conf_dh_param() for setting default DHE parameters 19853d3b0591SJens Wiklander from hex strings. Superseded by mbedtls_ssl_conf_dh_param_bin() 19863d3b0591SJens Wiklander accepting DHM parameters in binary form, matching the new constants. 19873d3b0591SJens Wiklander 19883d3b0591SJens WiklanderBugfix 19893d3b0591SJens Wiklander * Fix ssl_parse_record_header() to silently discard invalid DTLS records 19903d3b0591SJens Wiklander as recommended in RFC 6347 Section 4.1.2.7. 19913d3b0591SJens Wiklander * Fix memory leak in mbedtls_ssl_set_hostname() when called multiple times. 19923d3b0591SJens Wiklander Found by projectgus and Jethro Beekman, #836. 19933d3b0591SJens Wiklander * Fix usage help in ssl_server2 example. Found and fixed by Bei Lin. 1994817466cbSJens Wiklander * Parse signature algorithm extension when renegotiating. Previously, 1995817466cbSJens Wiklander renegotiated handshakes would only accept signatures using SHA-1 1996817466cbSJens Wiklander regardless of the peer's preferences, or fail if SHA-1 was disabled. 19973d3b0591SJens Wiklander * Fix leap year calculation in x509_date_is_valid() to ensure that invalid 19983d3b0591SJens Wiklander dates on leap years with 100 and 400 intervals are handled correctly. Found 19993d3b0591SJens Wiklander by Nicholas Wilson. #694 20003d3b0591SJens Wiklander * Fix some invalid RSA-PSS signatures with keys of size 8N+1 that were 20013d3b0591SJens Wiklander accepted. Generating these signatures required the private key. 20023d3b0591SJens Wiklander * Fix out-of-memory problem when parsing 4096-bit PKCS8-encrypted RSA keys. 20033d3b0591SJens Wiklander Found independently by Florian in the mbed TLS forum and by Mishamax. 20043d3b0591SJens Wiklander #878, #1019. 20053d3b0591SJens Wiklander * Fix variable used before assignment compilation warnings with IAR 20063d3b0591SJens Wiklander toolchain. Found by gkerrien38. 20073d3b0591SJens Wiklander * Fix unchecked return codes from AES, DES and 3DES functions in 20083d3b0591SJens Wiklander pem_aes_decrypt(), pem_des_decrypt() and pem_des3_decrypt() respectively. 20093d3b0591SJens Wiklander If a call to one of the functions of the cryptographic primitive modules 20103d3b0591SJens Wiklander failed, the error may not be noticed by the function 20113d3b0591SJens Wiklander mbedtls_pem_read_buffer() causing it to return invalid values. Found by 20123d3b0591SJens Wiklander Guido Vranken. #756 20133d3b0591SJens Wiklander * Include configuration file in md.h, to fix compilation warnings. 20143d3b0591SJens Wiklander Reported by aaronmdjones in #1001 20153d3b0591SJens Wiklander * Correct extraction of signature-type from PK instance in X.509 CRT and CSR 20163d3b0591SJens Wiklander writing routines that prevented these functions to work with alternative 20173d3b0591SJens Wiklander RSA implementations. Raised by J.B. in the Mbed TLS forum. Fixes #1011. 20183d3b0591SJens Wiklander * Don't print X.509 version tag for v1 CRT's, and omit extensions for 20193d3b0591SJens Wiklander non-v3 CRT's. 20203d3b0591SJens Wiklander * Fix bugs in RSA test suite under MBEDTLS_NO_PLATFORM_ENTROPY. #1023 #1024 20213d3b0591SJens Wiklander * Fix net_would_block() to avoid modification by errno through fcntl() call. 20223d3b0591SJens Wiklander Found by nkolban. Fixes #845. 20233d3b0591SJens Wiklander * Fix handling of handshake messages in mbedtls_ssl_read() in case 20243d3b0591SJens Wiklander MBEDTLS_SSL_RENEGOTIATION is disabled. Found by erja-gp. 20253d3b0591SJens Wiklander * Add a check for invalid private parameters in mbedtls_ecdsa_sign(). 20263d3b0591SJens Wiklander Reported by Yolan Romailler. 20273d3b0591SJens Wiklander * Fix word size check in in pk.c to not depend on MBEDTLS_HAVE_INT64. 20283d3b0591SJens Wiklander * Fix incorrect unit in benchmark output. #850 20293d3b0591SJens Wiklander * Add size-checks for record and handshake message content, securing 20303d3b0591SJens Wiklander fragile yet non-exploitable code-paths. 20313d3b0591SJens Wiklander * Fix crash when calling mbedtls_ssl_cache_free() twice. Found by 20323d3b0591SJens Wiklander MilenkoMitrovic, #1104 20333d3b0591SJens Wiklander * Fix mbedtls_timing_alarm(0) on Unix and MinGW. 20343d3b0591SJens Wiklander * Fix use of uninitialized memory in mbedtls_timing_get_timer() when reset=1. 20353d3b0591SJens Wiklander * Fix possible memory leaks in mbedtls_gcm_self_test(). 20363d3b0591SJens Wiklander * Added missing return code checks in mbedtls_aes_self_test(). 20373d3b0591SJens Wiklander * Fix issues in RSA key generation program programs/x509/rsa_genkey and the 20383d3b0591SJens Wiklander RSA test suite where the failure of CTR DRBG initialization lead to 20393d3b0591SJens Wiklander freeing an RSA context and several MPI's without proper initialization 20403d3b0591SJens Wiklander beforehand. 20413d3b0591SJens Wiklander * Fix error message in programs/pkey/gen_key.c. Found and fixed by Chris Xue. 20423d3b0591SJens Wiklander * Fix programs/pkey/dh_server.c so that it actually works with dh_client.c. 20433d3b0591SJens Wiklander Found and fixed by Martijn de Milliano. 20443d3b0591SJens Wiklander * Fix an issue in the cipher decryption with the mode 20453d3b0591SJens Wiklander MBEDTLS_PADDING_ONE_AND_ZEROS that sometimes accepted invalid padding. 20463d3b0591SJens Wiklander Note, this padding mode is not used by the TLS protocol. Found and fixed by 20473d3b0591SJens Wiklander Micha Kraus. 20483d3b0591SJens Wiklander * Fix the entropy.c module to not call mbedtls_sha256_starts() or 20493d3b0591SJens Wiklander mbedtls_sha512_starts() in the mbedtls_entropy_init() function. 20503d3b0591SJens Wiklander * Fix the entropy.c module to ensure that mbedtls_sha256_init() or 20513d3b0591SJens Wiklander mbedtls_sha512_init() is called before operating on the relevant context 20523d3b0591SJens Wiklander structure. Do not assume that zeroizing a context is a correct way to 20533d3b0591SJens Wiklander reset it. Found independently by ccli8 on Github. 20543d3b0591SJens Wiklander * In mbedtls_entropy_free(), properly free the message digest context. 20553d3b0591SJens Wiklander * Fix status handshake status message in programs/ssl/dtls_client.c. Found 20563d3b0591SJens Wiklander and fixed by muddog. 20573d3b0591SJens Wiklander 20583d3b0591SJens WiklanderChanges 20593d3b0591SJens Wiklander * Extend cert_write example program by options to set the certificate version 20603d3b0591SJens Wiklander and the message digest. Further, allow enabling/disabling of authority 20613d3b0591SJens Wiklander identifier, subject identifier and basic constraints extensions. 20623d3b0591SJens Wiklander * Only check for necessary RSA structure fields in `mbedtls_rsa_private`. In 20633d3b0591SJens Wiklander particular, don't require P,Q if neither CRT nor blinding are 20643d3b0591SJens Wiklander used. Reported and fix proposed independently by satur9nine and sliai 20653d3b0591SJens Wiklander on GitHub. 20663d3b0591SJens Wiklander * Only run AES-192 self-test if AES-192 is available. Fixes #963. 20673d3b0591SJens Wiklander * Tighten the RSA PKCS#1 v1.5 signature verification code and remove the 20683d3b0591SJens Wiklander undeclared dependency of the RSA module on the ASN.1 module. 20693d3b0591SJens Wiklander * Update all internal usage of deprecated message digest functions to the 20703d3b0591SJens Wiklander new ones with return codes. In particular, this modifies the 20713d3b0591SJens Wiklander mbedtls_md_info_t structure. Propagate errors from these functions 20723d3b0591SJens Wiklander everywhere except some locations in the ssl_tls.c module. 20733d3b0591SJens Wiklander * Improve CTR_DRBG error handling by propagating underlying AES errors. 20743d3b0591SJens Wiklander * Add MBEDTLS_ERR_XXX_HW_ACCEL_FAILED error codes for all cryptography 20753d3b0591SJens Wiklander modules where the software implementation can be replaced by a hardware 20763d3b0591SJens Wiklander implementation. 20773d3b0591SJens Wiklander * Add explicit warnings for the use of MD2, MD4, MD5, SHA-1, DES and ARC4 20783d3b0591SJens Wiklander throughout the library. 2079817466cbSJens Wiklander 2080817466cbSJens Wiklander= mbed TLS 2.6.0 branch released 2017-08-10 2081817466cbSJens Wiklander 2082817466cbSJens WiklanderSecurity 2083817466cbSJens Wiklander * Fix authentication bypass in SSL/TLS: when authmode is set to optional, 2084817466cbSJens Wiklander mbedtls_ssl_get_verify_result() would incorrectly return 0 when the peer's 2085817466cbSJens Wiklander X.509 certificate chain had more than MBEDTLS_X509_MAX_INTERMEDIATE_CA 2086817466cbSJens Wiklander (default: 8) intermediates, even when it was not trusted. This could be 2087817466cbSJens Wiklander triggered remotely from either side. (With authmode set to 'required' 2088817466cbSJens Wiklander (the default), the handshake was correctly aborted). 2089817466cbSJens Wiklander * Reliably wipe sensitive data after use in the AES example applications 2090817466cbSJens Wiklander programs/aes/aescrypt2 and programs/aes/crypt_and_hash. 2091817466cbSJens Wiklander Found by Laurent Simon. 2092817466cbSJens Wiklander 2093817466cbSJens WiklanderFeatures 2094817466cbSJens Wiklander * Add the functions mbedtls_platform_setup() and mbedtls_platform_teardown() 2095817466cbSJens Wiklander and the context struct mbedtls_platform_context to perform 2096817466cbSJens Wiklander platform-specific setup and teardown operations. The macro 2097817466cbSJens Wiklander MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT allows the functions to be overridden 2098817466cbSJens Wiklander by the user in a platform_alt.h file. These new functions are required in 2099817466cbSJens Wiklander some embedded environments to provide a means of initialising underlying 2100817466cbSJens Wiklander cryptographic acceleration hardware. 2101817466cbSJens Wiklander 2102817466cbSJens WiklanderAPI Changes 2103817466cbSJens Wiklander * Reverted API/ABI breaking changes introduced in mbed TLS 2.5.1, to make the 2104817466cbSJens Wiklander API consistent with mbed TLS 2.5.0. Specifically removed the inline 2105817466cbSJens Wiklander qualifier from the functions mbedtls_aes_decrypt, mbedtls_aes_encrypt, 2106817466cbSJens Wiklander mbedtls_ssl_ciphersuite_uses_ec and mbedtls_ssl_ciphersuite_uses_psk. Found 2107817466cbSJens Wiklander by James Cowgill. #978 2108817466cbSJens Wiklander * Certificate verification functions now set flags to -1 in case the full 2109817466cbSJens Wiklander chain was not verified due to an internal error (including in the verify 2110817466cbSJens Wiklander callback) or chain length limitations. 2111817466cbSJens Wiklander * With authmode set to optional, the TLS handshake is now aborted if the 2112817466cbSJens Wiklander verification of the peer's certificate failed due to an overlong chain or 2113817466cbSJens Wiklander a fatal error in the verify callback. 2114817466cbSJens Wiklander 2115817466cbSJens WiklanderBugfix 2116817466cbSJens Wiklander * Add a check if iv_len is zero in GCM, and return an error if it is zero. 2117817466cbSJens Wiklander Reported by roberto. #716 2118817466cbSJens Wiklander * Replace preprocessor condition from #if defined(MBEDTLS_THREADING_PTHREAD) 2119817466cbSJens Wiklander to #if defined(MBEDTLS_THREADING_C) as the library cannot assume they will 2120817466cbSJens Wiklander always be implemented by pthread support. #696 2121817466cbSJens Wiklander * Fix a resource leak on Windows platforms in mbedtls_x509_crt_parse_path(), 2122817466cbSJens Wiklander in the case of an error. Found by redplait. #590 2123817466cbSJens Wiklander * Add MBEDTLS_MPI_CHK to check for error value of mbedtls_mpi_fill_random. 2124817466cbSJens Wiklander Reported and fix suggested by guidovranken. #740 2125817466cbSJens Wiklander * Fix conditional preprocessor directives in bignum.h to enable 64-bit 2126817466cbSJens Wiklander compilation when using ARM Compiler 6. 2127817466cbSJens Wiklander * Fix a potential integer overflow in the version verification for DER 2128817466cbSJens Wiklander encoded X.509 CRLs. The overflow could enable maliciously constructed CRLs 2129817466cbSJens Wiklander to bypass the version verification check. Found by Peng Li/Yueh-Hsun Lin, 2130817466cbSJens Wiklander KNOX Security, Samsung Research America 2131817466cbSJens Wiklander * Fix potential integer overflow in the version verification for DER 2132817466cbSJens Wiklander encoded X.509 CSRs. The overflow could enable maliciously constructed CSRs 2133817466cbSJens Wiklander to bypass the version verification check. Found by Peng Li/Yueh-Hsun Lin, 2134817466cbSJens Wiklander KNOX Security, Samsung Research America 2135817466cbSJens Wiklander * Fix a potential integer overflow in the version verification for DER 2136817466cbSJens Wiklander encoded X.509 certificates. The overflow could enable maliciously 2137817466cbSJens Wiklander constructed certificates to bypass the certificate verification check. 2138817466cbSJens Wiklander * Fix a call to the libc function time() to call the platform abstraction 2139817466cbSJens Wiklander function mbedtls_time() instead. Found by wairua. #666 2140817466cbSJens Wiklander * Avoid shadowing of time and index functions through mbed TLS function 2141817466cbSJens Wiklander arguments. Found by inestlerode. #557. 2142817466cbSJens Wiklander 2143817466cbSJens WiklanderChanges 2144817466cbSJens Wiklander * Added config.h option MBEDTLS_NO_UDBL_DIVISION, to prevent the use of 2145817466cbSJens Wiklander 64-bit division. This is useful on embedded platforms where 64-bit division 2146817466cbSJens Wiklander created a dependency on external libraries. #708 2147817466cbSJens Wiklander * Removed mutexes from ECP hardware accelerator code. Now all hardware 2148817466cbSJens Wiklander accelerator code in the library leaves concurrency handling to the 2149817466cbSJens Wiklander platform. Reported by Steven Cooreman. #863 2150817466cbSJens Wiklander * Define the macro MBEDTLS_AES_ROM_TABLES in the configuration file 2151817466cbSJens Wiklander config-no-entropy.h to reduce the RAM footprint. 2152817466cbSJens Wiklander * Added a test script that can be hooked into git that verifies commits 2153817466cbSJens Wiklander before they are pushed. 2154817466cbSJens Wiklander * Improve documentation of PKCS1 decryption functions. 2155817466cbSJens Wiklander 2156817466cbSJens Wiklander= mbed TLS 2.5.1 released 2017-06-21 2157817466cbSJens Wiklander 2158817466cbSJens WiklanderSecurity 2159817466cbSJens Wiklander * Fixed unlimited overread of heap-based buffer in mbedtls_ssl_read(). 2160817466cbSJens Wiklander The issue could only happen client-side with renegotiation enabled. 2161817466cbSJens Wiklander Could result in DoS (application crash) or information leak 2162817466cbSJens Wiklander (if the application layer sent data read from mbedtls_ssl_read() 2163817466cbSJens Wiklander back to the server or to a third party). Can be triggered remotely. 2164817466cbSJens Wiklander * Removed SHA-1 and RIPEMD-160 from the default hash algorithms for 2165817466cbSJens Wiklander certificate verification. SHA-1 can be turned back on with a compile-time 2166817466cbSJens Wiklander option if needed. 2167817466cbSJens Wiklander * Fixed offset in FALLBACK_SCSV parsing that caused TLS server to fail to 2168817466cbSJens Wiklander detect it sometimes. Reported by Hugo Leisink. #810 2169817466cbSJens Wiklander * Tighten parsing of RSA PKCS#1 v1.5 signatures, to avoid a 2170817466cbSJens Wiklander potential Bleichenbacher/BERserk-style attack. 2171817466cbSJens Wiklander 2172817466cbSJens WiklanderBugfix 2173817466cbSJens Wiklander * Remove size zero arrays from ECJPAKE test suite. Size zero arrays are not 2174817466cbSJens Wiklander valid C and they prevented the test from compiling in Visual Studio 2015 2175817466cbSJens Wiklander and with GCC using the -Wpedantic compilation option. 2176817466cbSJens Wiklander * Fix insufficient support for signature-hash-algorithm extension, 2177817466cbSJens Wiklander resulting in compatibility problems with Chrome. Found by hfloyrd. #823 2178817466cbSJens Wiklander * Fix behaviour that hid the original cause of fatal alerts in some cases 2179817466cbSJens Wiklander when sending the alert failed. The fix makes sure not to hide the error 2180817466cbSJens Wiklander that triggered the alert. 2181817466cbSJens Wiklander * Fix SSLv3 renegotiation behaviour and stop processing data received from 2182817466cbSJens Wiklander peer after sending a fatal alert to refuse a renegotiation attempt. 2183817466cbSJens Wiklander Previous behaviour was to keep processing data even after the alert has 2184817466cbSJens Wiklander been sent. 2185817466cbSJens Wiklander * Accept empty trusted CA chain in authentication mode 21863d3b0591SJens Wiklander MBEDTLS_SSL_VERIFY_OPTIONAL. Found by Jethro Beekman. #864 2187817466cbSJens Wiklander * Fix implementation of mbedtls_ssl_parse_certificate() to not annihilate 2188817466cbSJens Wiklander fatal errors in authentication mode MBEDTLS_SSL_VERIFY_OPTIONAL and to 2189817466cbSJens Wiklander reflect bad EC curves within verification result. 2190817466cbSJens Wiklander * Fix bug that caused the modular inversion function to accept the invalid 2191817466cbSJens Wiklander modulus 1 and therefore to hang. Found by blaufish. #641. 2192817466cbSJens Wiklander * Fix incorrect sign computation in modular exponentiation when the base is 2193817466cbSJens Wiklander a negative MPI. Previously the result was always negative. Found by Guido 2194817466cbSJens Wiklander Vranken. 2195817466cbSJens Wiklander * Fix a numerical underflow leading to stack overflow in mpi_read_file() 2196817466cbSJens Wiklander that was triggered uppon reading an empty line. Found by Guido Vranken. 2197817466cbSJens Wiklander 2198817466cbSJens WiklanderChanges 2199817466cbSJens Wiklander * Send fatal alerts in more cases. The previous behaviour was to skip 2200817466cbSJens Wiklander sending the fatal alert and just drop the connection. 2201817466cbSJens Wiklander * Clarify ECDSA documentation and improve the sample code to avoid 2202817466cbSJens Wiklander misunderstanding and potentially dangerous use of the API. Pointed out 2203817466cbSJens Wiklander by Jean-Philippe Aumasson. 2204817466cbSJens Wiklander 2205817466cbSJens Wiklander= mbed TLS 2.5.0 branch released 2017-05-17 2206817466cbSJens Wiklander 2207817466cbSJens WiklanderSecurity 2208817466cbSJens Wiklander * Wipe stack buffers in RSA private key operations 2209817466cbSJens Wiklander (rsa_rsaes_pkcs1_v15_decrypt(), rsa_rsaes_oaep_decrypt). Found by Laurent 2210817466cbSJens Wiklander Simon. 2211817466cbSJens Wiklander * Add exponent blinding to RSA private operations as a countermeasure 2212817466cbSJens Wiklander against side-channel attacks like the cache attack described in 2213817466cbSJens Wiklander https://arxiv.org/abs/1702.08719v2. 2214817466cbSJens Wiklander Found and fix proposed by Michael Schwarz, Samuel Weiser, Daniel Gruss, 2215817466cbSJens Wiklander Clémentine Maurice and Stefan Mangard. 2216817466cbSJens Wiklander 2217817466cbSJens WiklanderFeatures 2218817466cbSJens Wiklander * Add hardware acceleration support for the Elliptic Curve Point module. 2219817466cbSJens Wiklander This involved exposing parts of the internal interface to enable 2220817466cbSJens Wiklander replacing the core functions and adding and alternative, module level 2221817466cbSJens Wiklander replacement support for enabling the extension of the interface. 2222817466cbSJens Wiklander * Add a new configuration option to 'mbedtls_ssl_config' to enable 2223817466cbSJens Wiklander suppressing the CA list in Certificate Request messages. The default 2224817466cbSJens Wiklander behaviour has not changed, namely every configured CAs name is included. 2225817466cbSJens Wiklander 2226817466cbSJens WiklanderAPI Changes 2227817466cbSJens Wiklander * The following functions in the AES module have been deprecated and replaced 2228817466cbSJens Wiklander by the functions shown below. The new functions change the return type from 2229817466cbSJens Wiklander void to int to allow returning error codes when using MBEDTLS_AES_ALT, 2230817466cbSJens Wiklander MBEDTLS_AES_DECRYPT_ALT or MBEDTLS_AES_ENCRYPT_ALT. 2231817466cbSJens Wiklander mbedtls_aes_decrypt() -> mbedtls_internal_aes_decrypt() 2232817466cbSJens Wiklander mbedtls_aes_encrypt() -> mbedtls_internal_aes_encrypt() 2233817466cbSJens Wiklander 2234817466cbSJens WiklanderBugfix 2235817466cbSJens Wiklander * Remove macros from compat-1.3.h that correspond to deleted items from most 2236817466cbSJens Wiklander recent versions of the library. Found by Kyle Keen. 2237817466cbSJens Wiklander * Fixed issue in the Threading module that prevented mutexes from 2238817466cbSJens Wiklander initialising. Found by sznaider. #667 #843 2239817466cbSJens Wiklander * Add checks in the PK module for the RSA functions on 64-bit systems. 2240817466cbSJens Wiklander The PK and RSA modules use different types for passing hash length and 2241817466cbSJens Wiklander without these checks the type cast could lead to data loss. Found by Guido 2242817466cbSJens Wiklander Vranken. 2243817466cbSJens Wiklander 2244817466cbSJens Wiklander= mbed TLS 2.4.2 branch released 2017-03-08 2245817466cbSJens Wiklander 2246817466cbSJens WiklanderSecurity 2247817466cbSJens Wiklander * Add checks to prevent signature forgeries for very large messages while 2248817466cbSJens Wiklander using RSA through the PK module in 64-bit systems. The issue was caused by 2249817466cbSJens Wiklander some data loss when casting a size_t to an unsigned int value in the 2250817466cbSJens Wiklander functions rsa_verify_wrap(), rsa_sign_wrap(), rsa_alt_sign_wrap() and 2251817466cbSJens Wiklander mbedtls_pk_sign(). Found by Jean-Philippe Aumasson. 2252817466cbSJens Wiklander * Fixed potential livelock during the parsing of a CRL in PEM format in 2253817466cbSJens Wiklander mbedtls_x509_crl_parse(). A string containing a CRL followed by trailing 2254817466cbSJens Wiklander characters after the footer could result in the execution of an infinite 2255817466cbSJens Wiklander loop. The issue can be triggered remotely. Found by Greg Zaverucha, 2256817466cbSJens Wiklander Microsoft. 2257817466cbSJens Wiklander * Removed MD5 from the allowed hash algorithms for CertificateRequest and 2258817466cbSJens Wiklander CertificateVerify messages, to prevent SLOTH attacks against TLS 1.2. 2259817466cbSJens Wiklander Introduced by interoperability fix for #513. 2260817466cbSJens Wiklander * Fixed a bug that caused freeing a buffer that was allocated on the stack, 2261817466cbSJens Wiklander when verifying the validity of a key on secp224k1. This could be 2262817466cbSJens Wiklander triggered remotely for example with a maliciously constructed certificate 2263817466cbSJens Wiklander and potentially could lead to remote code execution on some platforms. 2264817466cbSJens Wiklander Reported independently by rongsaws and Aleksandar Nikolic, Cisco Talos 2265817466cbSJens Wiklander team. #569 CVE-2017-2784 2266817466cbSJens Wiklander 2267817466cbSJens WiklanderBugfix 2268817466cbSJens Wiklander * Fix output certificate verification flags set by x509_crt_verify_top() when 2269817466cbSJens Wiklander traversing a chain of trusted CA. The issue would cause both flags, 2270817466cbSJens Wiklander MBEDTLS_X509_BADCERT_NOT_TRUSTED and MBEDTLS_X509_BADCERT_EXPIRED, to be 2271817466cbSJens Wiklander set when the verification conditions are not met regardless of the cause. 2272817466cbSJens Wiklander Found by Harm Verhagen and inestlerode. #665 #561 2273817466cbSJens Wiklander * Fix the redefinition of macro ssl_set_bio to an undefined symbol 2274817466cbSJens Wiklander mbedtls_ssl_set_bio_timeout in compat-1.3.h, by removing it. 2275817466cbSJens Wiklander Found by omlib-lin. #673 2276817466cbSJens Wiklander * Fix unused variable/function compilation warnings in pem.c, x509_crt.c and 2277817466cbSJens Wiklander x509_csr.c that are reported when building mbed TLS with a config.h that 2278817466cbSJens Wiklander does not define MBEDTLS_PEM_PARSE_C. Found by omnium21. #562 2279817466cbSJens Wiklander * Fix incorrect renegotiation condition in ssl_check_ctr_renegotiate() that 2280817466cbSJens Wiklander would compare 64 bits of the record counter instead of 48 bits as indicated 2281817466cbSJens Wiklander in RFC 6347 Section 4.3.1. This could cause the execution of the 2282817466cbSJens Wiklander renegotiation routines at unexpected times when the protocol is DTLS. Found 2283817466cbSJens Wiklander by wariua. #687 2284817466cbSJens Wiklander * Fixed multiple buffer overreads in mbedtls_pem_read_buffer() when parsing 2285817466cbSJens Wiklander the input string in PEM format to extract the different components. Found 2286817466cbSJens Wiklander by Eyal Itkin. 2287817466cbSJens Wiklander * Fixed potential arithmetic overflow in mbedtls_ctr_drbg_reseed() that could 2288817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 2289817466cbSJens Wiklander * Fixed potential arithmetic overflows in mbedtls_cipher_update() that could 2290817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 2291817466cbSJens Wiklander * Fixed potential arithmetic overflow in mbedtls_md2_update() that could 2292817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 2293817466cbSJens Wiklander * Fixed potential arithmetic overflow in mbedtls_base64_decode() that could 2294817466cbSJens Wiklander cause buffer bound checks to be bypassed. Found by Eyal Itkin. 2295817466cbSJens Wiklander * Fixed heap overreads in mbedtls_x509_get_time(). Found by Peng 2296817466cbSJens Wiklander Li/Yueh-Hsun Lin, KNOX Security, Samsung Research America. 2297817466cbSJens Wiklander * Fix potential memory leak in mbedtls_x509_crl_parse(). The leak was caused 2298817466cbSJens Wiklander by missing calls to mbedtls_pem_free() in cases when a 2299817466cbSJens Wiklander MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT error was encountered. Found and 2300817466cbSJens Wiklander fix proposed by Guido Vranken. #722 2301817466cbSJens Wiklander * Fixed the templates used to generate project and solution files for Visual 2302817466cbSJens Wiklander Studio 2015 as well as the files themselves, to remove a build warning 2303817466cbSJens Wiklander generated in Visual Studio 2015. Reported by Steve Valliere. #742 2304817466cbSJens Wiklander * Fix a resource leak in ssl_cookie, when using MBEDTLS_THREADING_C. 2305817466cbSJens Wiklander Raised and fix suggested by Alan Gillingham in the mbed TLS forum. #771 2306817466cbSJens Wiklander * Fix 1 byte buffer overflow in mbedtls_mpi_write_string() when the MPI 2307817466cbSJens Wiklander number to write in hexadecimal is negative and requires an odd number of 2308817466cbSJens Wiklander digits. Found and fixed by Guido Vranken. 2309817466cbSJens Wiklander * Fix unlisted DES configuration dependency in some pkparse test cases. Found 2310817466cbSJens Wiklander by inestlerode. #555 2311817466cbSJens Wiklander 2312817466cbSJens Wiklander= mbed TLS 2.4.1 branch released 2016-12-13 2313817466cbSJens Wiklander 2314817466cbSJens WiklanderChanges 2315817466cbSJens Wiklander * Update to CMAC test data, taken from - NIST Special Publication 800-38B - 2316817466cbSJens Wiklander Recommendation for Block Cipher Modes of Operation: The CMAC Mode for 2317817466cbSJens Wiklander Authentication – October 2016 2318817466cbSJens Wiklander 2319817466cbSJens Wiklander= mbed TLS 2.4.0 branch released 2016-10-17 2320817466cbSJens Wiklander 2321817466cbSJens WiklanderSecurity 2322817466cbSJens Wiklander * Removed the MBEDTLS_SSL_AEAD_RANDOM_IV option, because it was not compliant 2323817466cbSJens Wiklander with RFC-5116 and could lead to session key recovery in very long TLS 2324817466cbSJens Wiklander sessions. "Nonce-Disrespecting Adversaries Practical Forgery Attacks on GCM in 2325817466cbSJens Wiklander TLS" - H. Bock, A. Zauner, S. Devlin, J. Somorovsky, P. Jovanovic. 2326817466cbSJens Wiklander https://eprint.iacr.org/2016/475.pdf 2327817466cbSJens Wiklander * Fixed potential stack corruption in mbedtls_x509write_crt_der() and 2328817466cbSJens Wiklander mbedtls_x509write_csr_der() when the signature is copied to the buffer 2329817466cbSJens Wiklander without checking whether there is enough space in the destination. The 2330817466cbSJens Wiklander issue cannot be triggered remotely. Found by Jethro Beekman. 2331817466cbSJens Wiklander 2332817466cbSJens WiklanderFeatures 2333817466cbSJens Wiklander * Added support for CMAC for AES and 3DES and AES-CMAC-PRF-128, as defined by 2334817466cbSJens Wiklander NIST SP 800-38B, RFC-4493 and RFC-4615. 2335817466cbSJens Wiklander * Added hardware entropy selftest to verify that the hardware entropy source 2336817466cbSJens Wiklander is functioning correctly. 2337817466cbSJens Wiklander * Added a script to print build environment info for diagnostic use in test 2338817466cbSJens Wiklander scripts, which is also now called by all.sh. 2339817466cbSJens Wiklander * Added the macro MBEDTLS_X509_MAX_FILE_PATH_LEN that enables the user to 2340817466cbSJens Wiklander configure the maximum length of a file path that can be buffered when 2341817466cbSJens Wiklander calling mbedtls_x509_crt_parse_path(). 2342817466cbSJens Wiklander * Added a configuration file config-no-entropy.h that configures the subset of 2343817466cbSJens Wiklander library features that do not require an entropy source. 2344817466cbSJens Wiklander * Added the macro MBEDTLS_ENTROPY_MIN_HARDWARE in config.h. This allows users 2345817466cbSJens Wiklander to configure the minimum number of bytes for entropy sources using the 2346817466cbSJens Wiklander mbedtls_hardware_poll() function. 2347817466cbSJens Wiklander 2348817466cbSJens WiklanderBugfix 2349817466cbSJens Wiklander * Fix for platform time abstraction to avoid dependency issues where a build 2350817466cbSJens Wiklander may need time but not the standard C library abstraction, and added 2351817466cbSJens Wiklander configuration consistency checks to check_config.h 2352817466cbSJens Wiklander * Fix dependency issue in Makefile to allow parallel builds. 2353817466cbSJens Wiklander * Fix incorrect handling of block lengths in crypt_and_hash.c sample program, 2354817466cbSJens Wiklander when GCM is used. Found by udf2457. #441 2355817466cbSJens Wiklander * Fix for key exchanges based on ECDH-RSA or ECDH-ECDSA which weren't 2356817466cbSJens Wiklander enabled unless others were also present. Found by David Fernandez. #428 2357817466cbSJens Wiklander * Fix for out-of-tree builds using CMake. Found by jwurzer, and fix based on 2358817466cbSJens Wiklander a contribution from Tobias Tangemann. #541 2359817466cbSJens Wiklander * Fixed cert_app.c sample program for debug output and for use when no root 2360817466cbSJens Wiklander certificates are provided. 2361817466cbSJens Wiklander * Fix conditional statement that would cause a 1 byte overread in 2362817466cbSJens Wiklander mbedtls_asn1_get_int(). Found and fixed by Guido Vranken. #599 2363817466cbSJens Wiklander * Fixed pthread implementation to avoid unintended double initialisations 2364817466cbSJens Wiklander and double frees. Found by Niklas Amnebratt. 2365817466cbSJens Wiklander * Fixed the sample applications gen_key.c, cert_req.c and cert_write.c for 2366817466cbSJens Wiklander builds where the configuration MBEDTLS_PEM_WRITE_C is not defined. Found 2367817466cbSJens Wiklander by inestlerode. #559. 2368817466cbSJens Wiklander * Fix mbedtls_x509_get_sig() to update the ASN1 type in the mbedtls_x509_buf 2369817466cbSJens Wiklander data structure until after error checks are successful. Found by 2370817466cbSJens Wiklander subramanyam-c. #622 2371817466cbSJens Wiklander * Fix documentation and implementation missmatch for function arguments of 2372817466cbSJens Wiklander mbedtls_gcm_finish(). Found by cmiatpaar. #602 2373817466cbSJens Wiklander * Guarantee that P>Q at RSA key generation. Found by inestlerode. #558 2374817466cbSJens Wiklander * Fix potential byte overread when verifying malformed SERVER_HELLO in 2375817466cbSJens Wiklander ssl_parse_hello_verify_request() for DTLS. Found by Guido Vranken. 2376817466cbSJens Wiklander * Fix check for validity of date when parsing in mbedtls_x509_get_time(). 2377817466cbSJens Wiklander Found by subramanyam-c. #626 2378817466cbSJens Wiklander * Fix compatibility issue with Internet Explorer client authentication, 2379817466cbSJens Wiklander where the limited hash choices prevented the client from sending its 2380817466cbSJens Wiklander certificate. Found by teumas. #513 2381817466cbSJens Wiklander * Fix compilation without MBEDTLS_SELF_TEST enabled. 2382817466cbSJens Wiklander 2383817466cbSJens WiklanderChanges 2384817466cbSJens Wiklander * Extended test coverage of special cases, and added new timing test suite. 2385817466cbSJens Wiklander * Removed self-tests from the basic-built-test.sh script, and added all 2386817466cbSJens Wiklander missing self-tests to the test suites, to ensure self-tests are only 2387817466cbSJens Wiklander executed once. 2388817466cbSJens Wiklander * Added support for 3 and 4 byte lengths to mbedtls_asn1_write_len(). 2389817466cbSJens Wiklander * Added support for a Yotta specific configuration file - 2390817466cbSJens Wiklander through the symbol YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE. 2391817466cbSJens Wiklander * Added optimization for code space for X.509/OID based on configured 2392817466cbSJens Wiklander features. Contributed by Aviv Palivoda. 2393817466cbSJens Wiklander * Renamed source file library/net.c to library/net_sockets.c to avoid 2394817466cbSJens Wiklander naming collision in projects which also have files with the common name 2395817466cbSJens Wiklander net.c. For consistency, the corresponding header file, net.h, is marked as 2396817466cbSJens Wiklander deprecated, and its contents moved to net_sockets.h. 2397817466cbSJens Wiklander * Changed the strategy for X.509 certificate parsing and validation, to no 2398817466cbSJens Wiklander longer disregard certificates with unrecognised fields. 2399817466cbSJens Wiklander 2400817466cbSJens Wiklander= mbed TLS 2.3.0 branch released 2016-06-28 2401817466cbSJens Wiklander 2402817466cbSJens WiklanderSecurity 2403817466cbSJens Wiklander * Fix missing padding length check in mbedtls_rsa_rsaes_pkcs1_v15_decrypt 2404817466cbSJens Wiklander required by PKCS1 v2.2 2405817466cbSJens Wiklander * Fix potential integer overflow to buffer overflow in 2406817466cbSJens Wiklander mbedtls_rsa_rsaes_pkcs1_v15_encrypt and mbedtls_rsa_rsaes_oaep_encrypt 2407817466cbSJens Wiklander (not triggerable remotely in (D)TLS). 2408817466cbSJens Wiklander * Fix a potential integer underflow to buffer overread in 2409817466cbSJens Wiklander mbedtls_rsa_rsaes_oaep_decrypt. It is not triggerable remotely in 2410817466cbSJens Wiklander SSL/TLS. 2411817466cbSJens Wiklander 2412817466cbSJens WiklanderFeatures 2413817466cbSJens Wiklander * Support for platform abstraction of the standard C library time() 2414817466cbSJens Wiklander function. 2415817466cbSJens Wiklander 2416817466cbSJens WiklanderBugfix 2417817466cbSJens Wiklander * Fix bug in mbedtls_mpi_add_mpi() that caused wrong results when the three 2418817466cbSJens Wiklander arguments where the same (in-place doubling). Found and fixed by Janos 2419817466cbSJens Wiklander Follath. #309 2420817466cbSJens Wiklander * Fix potential build failures related to the 'apidoc' target, introduced 2421817466cbSJens Wiklander in the previous patch release. Found by Robert Scheck. #390 #391 2422817466cbSJens Wiklander * Fix issue in Makefile that prevented building using armar. #386 24235b25c76aSJerome Forissier * Fix memory leak that occurred only when ECJPAKE was enabled and ECDHE and 2424817466cbSJens Wiklander ECDSA was disabled in config.h . The leak didn't occur by default. 2425817466cbSJens Wiklander * Fix an issue that caused valid certificates to be rejected whenever an 2426817466cbSJens Wiklander expired or not yet valid certificate was parsed before a valid certificate 2427817466cbSJens Wiklander in the trusted certificate list. 2428817466cbSJens Wiklander * Fix bug in mbedtls_x509_crt_parse that caused trailing extra data in the 2429817466cbSJens Wiklander buffer after DER certificates to be included in the raw representation. 2430817466cbSJens Wiklander * Fix issue that caused a hang when generating RSA keys of odd bitlength 2431817466cbSJens Wiklander * Fix bug in mbedtls_rsa_rsaes_pkcs1_v15_encrypt that made null pointer 2432817466cbSJens Wiklander dereference possible. 2433817466cbSJens Wiklander * Fix issue that caused a crash if invalid curves were passed to 2434817466cbSJens Wiklander mbedtls_ssl_conf_curves. #373 2435817466cbSJens Wiklander * Fix issue in ssl_fork_server which was preventing it from functioning. #429 2436817466cbSJens Wiklander * Fix memory leaks in test framework 2437817466cbSJens Wiklander * Fix test in ssl-opt.sh that does not run properly with valgrind 2438817466cbSJens Wiklander * Fix unchecked calls to mmbedtls_md_setup(). Fix by Brian Murray. #502 2439817466cbSJens Wiklander 2440817466cbSJens WiklanderChanges 2441817466cbSJens Wiklander * On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5, 2442817466cbSJens Wiklander don't use the optimized assembly for bignum multiplication. This removes 2443817466cbSJens Wiklander the need to pass -fomit-frame-pointer to avoid a build error with -O0. 2444817466cbSJens Wiklander * Disabled SSLv3 in the default configuration. 2445817466cbSJens Wiklander * Optimized mbedtls_mpi_zeroize() for MPI integer size. (Fix by Alexey 2446817466cbSJens Wiklander Skalozub). 2447817466cbSJens Wiklander * Fix non-compliance server extension handling. Extensions for SSLv3 are now 2448817466cbSJens Wiklander ignored, as required by RFC6101. 2449817466cbSJens Wiklander 2450817466cbSJens Wiklander= mbed TLS 2.2.1 released 2016-01-05 2451817466cbSJens Wiklander 2452817466cbSJens WiklanderSecurity 2453817466cbSJens Wiklander * Fix potential double free when mbedtls_asn1_store_named_data() fails to 2454817466cbSJens Wiklander allocate memory. Only used for certificate generation, not triggerable 2455817466cbSJens Wiklander remotely in SSL/TLS. Found by Rafał Przywara. #367 2456817466cbSJens Wiklander * Disable MD5 handshake signatures in TLS 1.2 by default to prevent the 2457817466cbSJens Wiklander SLOTH attack on TLS 1.2 server authentication (other attacks from the 2458817466cbSJens Wiklander SLOTH paper do not apply to any version of mbed TLS or PolarSSL). 2459817466cbSJens Wiklander https://www.mitls.org/pages/attacks/SLOTH 2460817466cbSJens Wiklander 2461817466cbSJens WiklanderBugfix 2462817466cbSJens Wiklander * Fix over-restrictive length limit in GCM. Found by Andreas-N. #362 2463817466cbSJens Wiklander * Fix bug in certificate validation that caused valid chains to be rejected 2464817466cbSJens Wiklander when the first intermediate certificate has pathLenConstraint=0. Found by 2465817466cbSJens Wiklander Nicholas Wilson. Introduced in mbed TLS 2.2.0. #280 2466817466cbSJens Wiklander * Removed potential leak in mbedtls_rsa_rsassa_pkcs1_v15_sign(), found by 2467817466cbSJens Wiklander JayaraghavendranK. #372 2468817466cbSJens Wiklander * Fix suboptimal handling of unexpected records that caused interop issues 2469817466cbSJens Wiklander with some peers over unreliable links. Avoid dropping an entire DTLS 2470817466cbSJens Wiklander datagram if a single record in a datagram is unexpected, instead only 2471817466cbSJens Wiklander drop the record and look at subsequent records (if any are present) in 2472817466cbSJens Wiklander the same datagram. Found by jeannotlapin. #345 2473817466cbSJens Wiklander 2474817466cbSJens Wiklander= mbed TLS 2.2.0 released 2015-11-04 2475817466cbSJens Wiklander 2476817466cbSJens WiklanderSecurity 2477817466cbSJens Wiklander * Fix potential double free if mbedtls_ssl_conf_psk() is called more than 2478817466cbSJens Wiklander once and some allocation fails. Cannot be forced remotely. Found by Guido 2479817466cbSJens Wiklander Vranken, Intelworks. 2480817466cbSJens Wiklander * Fix potential heap corruption on Windows when 2481817466cbSJens Wiklander mbedtls_x509_crt_parse_path() is passed a path longer than 2GB. Cannot be 2482817466cbSJens Wiklander triggered remotely. Found by Guido Vranken, Intelworks. 2483817466cbSJens Wiklander * Fix potential buffer overflow in some asn1_write_xxx() functions. 2484817466cbSJens Wiklander Cannot be triggered remotely unless you create X.509 certificates based 2485817466cbSJens Wiklander on untrusted input or write keys of untrusted origin. Found by Guido 2486817466cbSJens Wiklander Vranken, Intelworks. 2487817466cbSJens Wiklander * The X509 max_pathlen constraint was not enforced on intermediate 2488817466cbSJens Wiklander certificates. Found by Nicholas Wilson, fix and tests provided by 2489817466cbSJens Wiklander Janos Follath. #280 and #319 2490817466cbSJens Wiklander 2491817466cbSJens WiklanderFeatures 2492817466cbSJens Wiklander * Experimental support for EC J-PAKE as defined in Thread 1.0.0. 2493817466cbSJens Wiklander Disabled by default as the specification might still change. 2494817466cbSJens Wiklander * Added a key extraction callback to accees the master secret and key 2495817466cbSJens Wiklander block. (Potential uses include EAP-TLS and Thread.) 2496817466cbSJens Wiklander 2497817466cbSJens WiklanderBugfix 2498817466cbSJens Wiklander * Self-signed certificates were not excluded from pathlen counting, 2499817466cbSJens Wiklander resulting in some valid X.509 being incorrectly rejected. Found and fix 2500817466cbSJens Wiklander provided by Janos Follath. #319 2501817466cbSJens Wiklander * Fix build error with configurations where ECDHE-PSK is the only key 2502817466cbSJens Wiklander exchange. Found and fix provided by Chris Hammond. #270 2503817466cbSJens Wiklander * Fix build error with configurations where RSA, RSA-PSK, ECDH-RSA or 2504817466cbSJens Wiklander ECHD-ECDSA if the only key exchange. Multiple reports. #310 2505817466cbSJens Wiklander * Fixed a bug causing some handshakes to fail due to some non-fatal alerts 2506817466cbSJens Wiklander not being properly ignored. Found by mancha and Kasom Koht-arsa, #308 2507817466cbSJens Wiklander * mbedtls_x509_crt_verify(_with_profile)() now also checks the key type and 2508817466cbSJens Wiklander size/curve against the profile. Before that, there was no way to set a 2509817466cbSJens Wiklander minimum key size for end-entity certificates with RSA keys. Found by 2510817466cbSJens Wiklander Matthew Page of Scannex Electronics Ltd. 2511817466cbSJens Wiklander * Fix failures in MPI on Sparc(64) due to use of bad assembly code. 2512817466cbSJens Wiklander Found by Kurt Danielson. #292 2513817466cbSJens Wiklander * Fix typo in name of the extKeyUsage OID. Found by inestlerode, #314 2514817466cbSJens Wiklander * Fix bug in ASN.1 encoding of booleans that caused generated CA 2515817466cbSJens Wiklander certificates to be rejected by some applications, including OS X 2516817466cbSJens Wiklander Keychain. Found and fixed by Jonathan Leroy, Inikup. 2517817466cbSJens Wiklander 2518817466cbSJens WiklanderChanges 2519817466cbSJens Wiklander * Improved performance of mbedtls_ecp_muladd() when one of the scalars is 1 2520817466cbSJens Wiklander or -1. 2521817466cbSJens Wiklander 2522817466cbSJens Wiklander= mbed TLS 2.1.2 released 2015-10-06 2523817466cbSJens Wiklander 2524817466cbSJens WiklanderSecurity 2525817466cbSJens Wiklander * Added fix for CVE-2015-5291 to prevent heap corruption due to buffer 2526817466cbSJens Wiklander overflow of the hostname or session ticket. Found by Guido Vranken, 2527817466cbSJens Wiklander Intelworks. 2528817466cbSJens Wiklander * Fix potential double-free if mbedtls_ssl_set_hs_psk() is called more than 2529817466cbSJens Wiklander once in the same handhake and mbedtls_ssl_conf_psk() was used. 2530817466cbSJens Wiklander Found and patch provided by Guido Vranken, Intelworks. Cannot be forced 2531817466cbSJens Wiklander remotely. 2532817466cbSJens Wiklander * Fix stack buffer overflow in pkcs12 decryption (used by 2533817466cbSJens Wiklander mbedtls_pk_parse_key(file)() when the password is > 129 bytes. 2534817466cbSJens Wiklander Found by Guido Vranken, Intelworks. Not triggerable remotely. 2535817466cbSJens Wiklander * Fix potential buffer overflow in mbedtls_mpi_read_string(). 2536817466cbSJens Wiklander Found by Guido Vranken, Intelworks. Not exploitable remotely in the context 2537817466cbSJens Wiklander of TLS, but might be in other uses. On 32 bit machines, requires reading a 2538817466cbSJens Wiklander string of close to or larger than 1GB to exploit; on 64 bit machines, would 2539817466cbSJens Wiklander require reading a string of close to or larger than 2^62 bytes. 2540817466cbSJens Wiklander * Fix potential random memory allocation in mbedtls_pem_read_buffer() 2541817466cbSJens Wiklander on crafted PEM input data. Found and fix provided by Guido Vranken, 2542817466cbSJens Wiklander Intelworks. Not triggerable remotely in TLS. Triggerable remotely if you 2543817466cbSJens Wiklander accept PEM data from an untrusted source. 2544817466cbSJens Wiklander * Fix possible heap buffer overflow in base64_encoded() when the input 2545817466cbSJens Wiklander buffer is 512MB or larger on 32-bit platforms. Found by Guido Vranken, 2546817466cbSJens Wiklander Intelworks. Not trigerrable remotely in TLS. 2547817466cbSJens Wiklander * Fix potential double-free if mbedtls_conf_psk() is called repeatedly on 2548817466cbSJens Wiklander the same mbedtls_ssl_config object and memory allocation fails. Found by 2549817466cbSJens Wiklander Guido Vranken, Intelworks. Cannot be forced remotely. 2550817466cbSJens Wiklander * Fix potential heap buffer overflow in servers that perform client 2551817466cbSJens Wiklander authentication against a crafted CA cert. Cannot be triggered remotely 2552817466cbSJens Wiklander unless you allow third parties to pick trust CAs for client auth. 2553817466cbSJens Wiklander Found by Guido Vranken, Intelworks. 2554817466cbSJens Wiklander 2555817466cbSJens WiklanderBugfix 2556817466cbSJens Wiklander * Fix compile error in net.c with musl libc. Found and patch provided by 2557817466cbSJens Wiklander zhasha (#278). 2558817466cbSJens Wiklander * Fix macroization of 'inline' keyword when building as C++. (#279) 2559817466cbSJens Wiklander 2560817466cbSJens WiklanderChanges 2561817466cbSJens Wiklander * Added checking of hostname length in mbedtls_ssl_set_hostname() to ensure 2562817466cbSJens Wiklander domain names are compliant with RFC 1035. 2563817466cbSJens Wiklander * Fixed paths for check_config.h in example config files. (Found by bachp) 2564817466cbSJens Wiklander (#291) 2565817466cbSJens Wiklander 2566817466cbSJens Wiklander= mbed TLS 2.1.1 released 2015-09-17 2567817466cbSJens Wiklander 2568817466cbSJens WiklanderSecurity 2569817466cbSJens Wiklander * Add countermeasure against Lenstra's RSA-CRT attack for PKCS#1 v1.5 2570817466cbSJens Wiklander signatures. (Found by Florian Weimer, Red Hat.) 2571817466cbSJens Wiklander https://securityblog.redhat.com/2015/09/02/factoring-rsa-keys-with-tls-perfect-forward-secrecy/ 2572817466cbSJens Wiklander * Fix possible client-side NULL pointer dereference (read) when the client 2573817466cbSJens Wiklander tries to continue the handshake after it failed (a misuse of the API). 2574817466cbSJens Wiklander (Found and patch provided by Fabian Foerg, Gotham Digital Science using 2575817466cbSJens Wiklander afl-fuzz.) 2576817466cbSJens Wiklander 2577817466cbSJens WiklanderBugfix 2578817466cbSJens Wiklander * Fix warning when using a 64bit platform. (found by embedthis) (#275) 2579817466cbSJens Wiklander * Fix off-by-one error in parsing Supported Point Format extension that 2580817466cbSJens Wiklander caused some handshakes to fail. 2581817466cbSJens Wiklander 2582817466cbSJens WiklanderChanges 2583817466cbSJens Wiklander * Made X509 profile pointer const in mbedtls_ssl_conf_cert_profile() to allow 2584817466cbSJens Wiklander use of mbedtls_x509_crt_profile_next. (found by NWilson) 2585817466cbSJens Wiklander * When a client initiates a reconnect from the same port as a live 2586817466cbSJens Wiklander connection, if cookie verification is available 2587817466cbSJens Wiklander (MBEDTLS_SSL_DTLS_HELLO_VERIFY defined in config.h, and usable cookie 2588817466cbSJens Wiklander callbacks set with mbedtls_ssl_conf_dtls_cookies()), this will be 2589817466cbSJens Wiklander detected and mbedtls_ssl_read() will return 2590817466cbSJens Wiklander MBEDTLS_ERR_SSL_CLIENT_RECONNECT - it is then possible to start a new 2591817466cbSJens Wiklander handshake with the same context. (See RFC 6347 section 4.2.8.) 2592817466cbSJens Wiklander 2593817466cbSJens Wiklander= mbed TLS 2.1.0 released 2015-09-04 2594817466cbSJens Wiklander 2595817466cbSJens WiklanderFeatures 2596817466cbSJens Wiklander * Added support for yotta as a build system. 2597817466cbSJens Wiklander * Primary open source license changed to Apache 2.0 license. 2598817466cbSJens Wiklander 2599817466cbSJens WiklanderBugfix 2600817466cbSJens Wiklander * Fix segfault in the benchmark program when benchmarking DHM. 2601817466cbSJens Wiklander * Fix build error with CMake and pre-4.5 versions of GCC (found by Hugo 2602817466cbSJens Wiklander Leisink). 2603817466cbSJens Wiklander * Fix bug when parsing a ServerHello without extensions (found by David 2604817466cbSJens Wiklander Sears). 2605817466cbSJens Wiklander * Fix bug in CMake lists that caused libmbedcrypto.a not to be installed 2606817466cbSJens Wiklander (found by Benoit Lecocq). 2607817466cbSJens Wiklander * Fix bug in Makefile that caused libmbedcrypto and libmbedx509 not to be 2608817466cbSJens Wiklander installed (found by Rawi666). 2609817466cbSJens Wiklander * Fix compile error with armcc 5 with --gnu option. 2610817466cbSJens Wiklander * Fix bug in Makefile that caused programs not to be installed correctly 2611817466cbSJens Wiklander (found by robotanarchy) (#232). 2612817466cbSJens Wiklander * Fix bug in Makefile that prevented from installing without building the 2613817466cbSJens Wiklander tests (found by robotanarchy) (#232). 2614817466cbSJens Wiklander * Fix missing -static-libgcc when building shared libraries for Windows 2615817466cbSJens Wiklander with make. 2616817466cbSJens Wiklander * Fix link error when building shared libraries for Windows with make. 2617817466cbSJens Wiklander * Fix error when loading libmbedtls.so. 2618817466cbSJens Wiklander * Fix bug in mbedtls_ssl_conf_default() that caused the default preset to 2619817466cbSJens Wiklander be always used (found by dcb314) (#235) 2620817466cbSJens Wiklander * Fix bug in mbedtls_rsa_public() and mbedtls_rsa_private() that could 2621817466cbSJens Wiklander result trying to unlock an unlocked mutex on invalid input (found by 2622817466cbSJens Wiklander Fredrik Axelsson) (#257) 2623817466cbSJens Wiklander * Fix -Wshadow warnings (found by hnrkp) (#240) 2624817466cbSJens Wiklander * Fix memory corruption on client with overlong PSK identity, around 2625817466cbSJens Wiklander SSL_MAX_CONTENT_LEN or higher - not triggerrable remotely (found by 2626817466cbSJens Wiklander Aleksandrs Saveljevs) (#238) 2627817466cbSJens Wiklander * Fix unused function warning when using MBEDTLS_MDx_ALT or 2628817466cbSJens Wiklander MBEDTLS_SHAxxx_ALT (found by Henrik) (#239) 2629817466cbSJens Wiklander * Fix memory corruption in pkey programs (found by yankuncheng) (#210) 2630817466cbSJens Wiklander 2631817466cbSJens WiklanderChanges 2632817466cbSJens Wiklander * The PEM parser now accepts a trailing space at end of lines (#226). 2633817466cbSJens Wiklander * It is now possible to #include a user-provided configuration file at the 2634817466cbSJens Wiklander end of the default config.h by defining MBEDTLS_USER_CONFIG_FILE on the 2635817466cbSJens Wiklander compiler's command line. 2636817466cbSJens Wiklander * When verifying a certificate chain, if an intermediate certificate is 2637817466cbSJens Wiklander trusted, no later cert is checked. (suggested by hannes-landeholm) 2638817466cbSJens Wiklander (#220). 2639817466cbSJens Wiklander * Prepend a "thread identifier" to debug messages (issue pointed out by 2640817466cbSJens Wiklander Hugo Leisink) (#210). 2641817466cbSJens Wiklander * Add mbedtls_ssl_get_max_frag_len() to query the current maximum fragment 2642817466cbSJens Wiklander length. 2643817466cbSJens Wiklander 2644817466cbSJens Wiklander= mbed TLS 2.0.0 released 2015-07-13 2645817466cbSJens Wiklander 2646817466cbSJens WiklanderFeatures 2647817466cbSJens Wiklander * Support for DTLS 1.0 and 1.2 (RFC 6347). 2648817466cbSJens Wiklander * Ability to override core functions from MDx, SHAx, AES and DES modules 2649817466cbSJens Wiklander with custom implementation (eg hardware accelerated), complementing the 2650817466cbSJens Wiklander ability to override the whole module. 2651817466cbSJens Wiklander * New server-side implementation of session tickets that rotate keys to 2652817466cbSJens Wiklander preserve forward secrecy, and allows sharing across multiple contexts. 2653817466cbSJens Wiklander * Added a concept of X.509 cerificate verification profile that controls 2654817466cbSJens Wiklander which algorithms and key sizes (curves for ECDSA) are acceptable. 2655817466cbSJens Wiklander * Expanded configurability of security parameters in the SSL module with 2656817466cbSJens Wiklander mbedtls_ssl_conf_dhm_min_bitlen() and mbedtls_ssl_conf_sig_hashes(). 2657817466cbSJens Wiklander * Introduced a concept of presets for SSL security-relevant configuration 2658817466cbSJens Wiklander parameters. 2659817466cbSJens Wiklander 2660817466cbSJens WiklanderAPI Changes 2661817466cbSJens Wiklander * The library has been split into libmbedcrypto, libmbedx509, libmbedtls. 2662817466cbSJens Wiklander You now need to link to all of them if you use TLS for example. 2663817466cbSJens Wiklander * All public identifiers moved to the mbedtls_* or MBEDTLS_* namespace. 2664817466cbSJens Wiklander Some names have been further changed to make them more consistent. 26655b25c76aSJerome Forissier Migration helpers scripts/rename.pl and include/mbedtls/compat-1.3.h are 2666817466cbSJens Wiklander provided. Full list of renamings in scripts/data_files/rename-1.3-2.0.txt 2667817466cbSJens Wiklander * Renamings of fields inside structures, not covered by the previous list: 2668817466cbSJens Wiklander mbedtls_cipher_info_t.key_length -> key_bitlen 2669817466cbSJens Wiklander mbedtls_cipher_context_t.key_length -> key_bitlen 2670817466cbSJens Wiklander mbedtls_ecp_curve_info.size -> bit_size 2671817466cbSJens Wiklander * Headers are now found in the 'mbedtls' directory (previously 'polarssl'). 2672817466cbSJens Wiklander * The following _init() functions that could return errors have 2673817466cbSJens Wiklander been split into an _init() that returns void and another function that 2674817466cbSJens Wiklander should generally be the first function called on this context after init: 2675817466cbSJens Wiklander mbedtls_ssl_init() -> mbedtls_ssl_setup() 2676817466cbSJens Wiklander mbedtls_ccm_init() -> mbedtls_ccm_setkey() 2677817466cbSJens Wiklander mbedtls_gcm_init() -> mbedtls_gcm_setkey() 2678817466cbSJens Wiklander mbedtls_hmac_drbg_init() -> mbedtls_hmac_drbg_seed(_buf)() 2679817466cbSJens Wiklander mbedtls_ctr_drbg_init() -> mbedtls_ctr_drbg_seed() 2680817466cbSJens Wiklander Note that for mbedtls_ssl_setup(), you need to be done setting up the 2681817466cbSJens Wiklander ssl_config structure before calling it. 2682817466cbSJens Wiklander * Most ssl_set_xxx() functions (all except ssl_set_bio(), ssl_set_hostname(), 2683817466cbSJens Wiklander ssl_set_session() and ssl_set_client_transport_id(), plus 2684817466cbSJens Wiklander ssl_legacy_renegotiation()) have been renamed to mbedtls_ssl_conf_xxx() 2685817466cbSJens Wiklander (see rename.pl and compat-1.3.h above) and their first argument's type 2686817466cbSJens Wiklander changed from ssl_context to ssl_config. 2687817466cbSJens Wiklander * ssl_set_bio() changed signature (contexts merged, order switched, one 2688817466cbSJens Wiklander additional callback for read-with-timeout). 2689817466cbSJens Wiklander * The following functions have been introduced and must be used in callback 2690817466cbSJens Wiklander implementations (SNI, PSK) instead of their *conf counterparts: 2691817466cbSJens Wiklander mbedtls_ssl_set_hs_own_cert() 2692817466cbSJens Wiklander mbedtls_ssl_set_hs_ca_chain() 2693817466cbSJens Wiklander mbedtls_ssl_set_hs_psk() 2694817466cbSJens Wiklander * mbedtls_ssl_conf_ca_chain() lost its last argument (peer_cn), now set 2695817466cbSJens Wiklander using mbedtls_ssl_set_hostname(). 2696817466cbSJens Wiklander * mbedtls_ssl_conf_session_cache() changed prototype (only one context 2697817466cbSJens Wiklander pointer, parameters reordered). 2698817466cbSJens Wiklander * On server, mbedtls_ssl_conf_session_tickets_cb() must now be used in 2699817466cbSJens Wiklander place of mbedtls_ssl_conf_session_tickets() to enable session tickets. 2700817466cbSJens Wiklander * The SSL debug callback gained two new arguments (file name, line number). 2701817466cbSJens Wiklander * Debug modes were removed. 2702817466cbSJens Wiklander * mbedtls_ssl_conf_truncated_hmac() now returns void. 2703817466cbSJens Wiklander * mbedtls_memory_buffer_alloc_init() now returns void. 2704817466cbSJens Wiklander * X.509 verification flags are now an uint32_t. Affect the signature of: 2705817466cbSJens Wiklander mbedtls_ssl_get_verify_result() 2706817466cbSJens Wiklander mbedtls_x509_ctr_verify_info() 2707817466cbSJens Wiklander mbedtls_x509_crt_verify() (flags, f_vrfy -> needs to be updated) 2708817466cbSJens Wiklander mbedtls_ssl_conf_verify() (f_vrfy -> needs to be updated) 2709817466cbSJens Wiklander * The following functions changed prototype to avoid an in-out length 2710817466cbSJens Wiklander parameter: 2711817466cbSJens Wiklander mbedtls_base64_encode() 2712817466cbSJens Wiklander mbedtls_base64_decode() 2713817466cbSJens Wiklander mbedtls_mpi_write_string() 2714817466cbSJens Wiklander mbedtls_dhm_calc_secret() 2715817466cbSJens Wiklander * In the NET module, all "int" and "int *" arguments for file descriptors 2716817466cbSJens Wiklander changed type to "mbedtls_net_context *". 2717817466cbSJens Wiklander * net_accept() gained new arguments for the size of the client_ip buffer. 2718817466cbSJens Wiklander * In the threading layer, mbedtls_mutex_init() and mbedtls_mutex_free() now 2719817466cbSJens Wiklander return void. 27205b25c76aSJerome Forissier * ecdsa_write_signature() gained an additional md_alg argument and 2721817466cbSJens Wiklander ecdsa_write_signature_det() was deprecated. 2722817466cbSJens Wiklander * pk_sign() no longer accepts md_alg == POLARSSL_MD_NONE with ECDSA. 2723817466cbSJens Wiklander * Last argument of x509_crt_check_key_usage() and 2724817466cbSJens Wiklander mbedtls_x509write_crt_set_key_usage() changed from int to unsigned. 2725817466cbSJens Wiklander * test_ca_list (from certs.h) is renamed to test_cas_pem and is only 2726817466cbSJens Wiklander available if POLARSSL_PEM_PARSE_C is defined (it never worked without). 2727817466cbSJens Wiklander * Test certificates in certs.c are no longer guaranteed to be nul-terminated 2728817466cbSJens Wiklander strings; use the new *_len variables instead of strlen(). 2729817466cbSJens Wiklander * Functions mbedtls_x509_xxx_parse(), mbedtls_pk_parse_key(), 2730817466cbSJens Wiklander mbedtls_pk_parse_public_key() and mbedtls_dhm_parse_dhm() now expect the 2731817466cbSJens Wiklander length parameter to include the terminating null byte for PEM input. 2732817466cbSJens Wiklander * Signature of mpi_mul_mpi() changed to make the last argument unsigned 2733817466cbSJens Wiklander * calloc() is now used instead of malloc() everywhere. API of platform 2734817466cbSJens Wiklander layer and the memory_buffer_alloc module changed accordingly. 2735817466cbSJens Wiklander (Thanks to Mansour Moufid for helping with the replacement.) 2736817466cbSJens Wiklander * Change SSL_DISABLE_RENEGOTIATION config.h flag to SSL_RENEGOTIATION 2737817466cbSJens Wiklander (support for renegotiation now needs explicit enabling in config.h). 2738817466cbSJens Wiklander * Split MBEDTLS_HAVE_TIME into MBEDTLS_HAVE_TIME and MBEDTLS_HAVE_TIME_DATE 2739817466cbSJens Wiklander in config.h 2740817466cbSJens Wiklander * net_connect() and net_bind() have a new 'proto' argument to choose 2741817466cbSJens Wiklander between TCP and UDP, using the macros NET_PROTO_TCP or NET_PROTO_UDP. 2742817466cbSJens Wiklander Their 'port' argument type is changed to a string. 2743817466cbSJens Wiklander * Some constness fixes 2744817466cbSJens Wiklander 2745817466cbSJens WiklanderRemovals 2746817466cbSJens Wiklander * Removed mbedtls_ecp_group_read_string(). Only named groups are supported. 2747817466cbSJens Wiklander * Removed mbedtls_ecp_sub() and mbedtls_ecp_add(), use 2748817466cbSJens Wiklander mbedtls_ecp_muladd(). 2749817466cbSJens Wiklander * Removed individual mdX_hmac, shaX_hmac, mdX_file and shaX_file functions 2750817466cbSJens Wiklander (use generic functions from md.h) 2751817466cbSJens Wiklander * Removed mbedtls_timing_msleep(). Use mbedtls_net_usleep() or a custom 2752817466cbSJens Wiklander waiting function. 2753817466cbSJens Wiklander * Removed test DHM parameters from the test certs module. 2754817466cbSJens Wiklander * Removed the PBKDF2 module (use PKCS5). 2755817466cbSJens Wiklander * Removed POLARSSL_ERROR_STRERROR_BC (use mbedtls_strerror()). 2756817466cbSJens Wiklander * Removed compat-1.2.h (helper for migrating from 1.2 to 1.3). 2757817466cbSJens Wiklander * Removed openssl.h (very partial OpenSSL compatibility layer). 2758817466cbSJens Wiklander * Configuration options POLARSSL_HAVE_LONGLONG was removed (now always on). 2759817466cbSJens Wiklander * Configuration options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 have 2760817466cbSJens Wiklander been removed (compiler is required to support 32-bit operations). 2761817466cbSJens Wiklander * Configuration option POLARSSL_HAVE_IPV6 was removed (always enabled). 2762817466cbSJens Wiklander * Removed test program o_p_test, the script compat.sh does more. 2763817466cbSJens Wiklander * Removed test program ssl_test, superseded by ssl-opt.sh. 2764817466cbSJens Wiklander * Removed helper script active-config.pl 2765817466cbSJens Wiklander 2766817466cbSJens WiklanderNew deprecations 2767817466cbSJens Wiklander * md_init_ctx() is deprecated in favour of md_setup(), that adds a third 2768817466cbSJens Wiklander argument (allowing memory savings if HMAC is not used) 2769817466cbSJens Wiklander 2770817466cbSJens WiklanderSemi-API changes (technically public, morally private) 2771817466cbSJens Wiklander * Renamed a few headers to include _internal in the name. Those headers are 2772817466cbSJens Wiklander not supposed to be included by users. 2773817466cbSJens Wiklander * Changed md_info_t into an opaque structure (use md_get_xxx() accessors). 2774817466cbSJens Wiklander * Changed pk_info_t into an opaque structure. 2775817466cbSJens Wiklander * Changed cipher_base_t into an opaque structure. 2776817466cbSJens Wiklander * Removed sig_oid2 and rename sig_oid1 to sig_oid in x509_crt and x509_crl. 2777817466cbSJens Wiklander * x509_crt.key_usage changed from unsigned char to unsigned int. 2778817466cbSJens Wiklander * Removed r and s from ecdsa_context 2779817466cbSJens Wiklander * Removed mode from des_context and des3_context 2780817466cbSJens Wiklander 2781817466cbSJens WiklanderDefault behavior changes 2782817466cbSJens Wiklander * The default minimum TLS version is now TLS 1.0. 2783817466cbSJens Wiklander * RC4 is now blacklisted by default in the SSL/TLS layer, and excluded from the 2784817466cbSJens Wiklander default ciphersuite list returned by ssl_list_ciphersuites() 2785817466cbSJens Wiklander * Support for receiving SSLv2 ClientHello is now disabled by default at 2786817466cbSJens Wiklander compile time. 2787817466cbSJens Wiklander * The default authmode for SSL/TLS clients is now REQUIRED. 2788817466cbSJens Wiklander * Support for RSA_ALT contexts in the PK layer is now optional. Since is is 2789817466cbSJens Wiklander enabled in the default configuration, this is only noticeable if using a 2790817466cbSJens Wiklander custom config.h 2791817466cbSJens Wiklander * Default DHM parameters server-side upgraded from 1024 to 2048 bits. 2792817466cbSJens Wiklander * A minimum RSA key size of 2048 bits is now enforced during ceritificate 2793817466cbSJens Wiklander chain verification. 2794817466cbSJens Wiklander * Negotiation of truncated HMAC is now disabled by default on server too. 2795817466cbSJens Wiklander * The following functions are now case-sensitive: 2796817466cbSJens Wiklander mbedtls_cipher_info_from_string() 2797817466cbSJens Wiklander mbedtls_ecp_curve_info_from_name() 2798817466cbSJens Wiklander mbedtls_md_info_from_string() 2799817466cbSJens Wiklander mbedtls_ssl_ciphersuite_from_string() 2800817466cbSJens Wiklander mbedtls_version_check_feature() 2801817466cbSJens Wiklander 2802817466cbSJens WiklanderRequirement changes 2803817466cbSJens Wiklander * The minimum MSVC version required is now 2010 (better C99 support). 2804817466cbSJens Wiklander * The NET layer now unconditionnaly relies on getaddrinfo() and select(). 2805817466cbSJens Wiklander * Compiler is required to support C99 types such as long long and uint32_t. 2806817466cbSJens Wiklander 2807817466cbSJens WiklanderAPI changes from the 1.4 preview branch 2808817466cbSJens Wiklander * ssl_set_bio_timeout() was removed, split into mbedtls_ssl_set_bio() with 2809817466cbSJens Wiklander new prototype, and mbedtls_ssl_set_read_timeout(). 2810817466cbSJens Wiklander * The following functions now return void: 2811817466cbSJens Wiklander mbedtls_ssl_conf_transport() 2812817466cbSJens Wiklander mbedtls_ssl_conf_max_version() 2813817466cbSJens Wiklander mbedtls_ssl_conf_min_version() 2814817466cbSJens Wiklander * DTLS no longer hard-depends on TIMING_C, but uses a callback interface 2815817466cbSJens Wiklander instead, see mbedtls_ssl_set_timer_cb(), with the Timing module providing 2816817466cbSJens Wiklander an example implementation, see mbedtls_timing_delay_context and 2817817466cbSJens Wiklander mbedtls_timing_set/get_delay(). 2818817466cbSJens Wiklander * With UDP sockets, it is no longer necessary to call net_bind() again 2819817466cbSJens Wiklander after a successful net_accept(). 2820817466cbSJens Wiklander 2821817466cbSJens WiklanderChanges 2822817466cbSJens Wiklander * mbedtls_ctr_drbg_random() and mbedtls_hmac_drbg_random() are now 2823817466cbSJens Wiklander thread-safe if MBEDTLS_THREADING_C is enabled. 2824817466cbSJens Wiklander * Reduced ROM fooprint of SHA-256 and added an option to reduce it even 2825817466cbSJens Wiklander more (at the expense of performance) MBEDTLS_SHA256_SMALLER. 2826817466cbSJens Wiklander 2827817466cbSJens Wiklander= mbed TLS 1.3 branch 2828817466cbSJens Wiklander 2829817466cbSJens WiklanderSecurity 2830817466cbSJens Wiklander * With authmode set to SSL_VERIFY_OPTIONAL, verification of keyUsage and 2831817466cbSJens Wiklander extendedKeyUsage on the leaf certificate was lost (results not accessible 2832817466cbSJens Wiklander via ssl_get_verify_results()). 2833817466cbSJens Wiklander * Add countermeasure against "Lucky 13 strikes back" cache-based attack, 2834817466cbSJens Wiklander https://dl.acm.org/citation.cfm?id=2714625 2835817466cbSJens Wiklander 2836817466cbSJens WiklanderFeatures 2837817466cbSJens Wiklander * Improve ECC performance by using more efficient doubling formulas 2838817466cbSJens Wiklander (contributed by Peter Dettman). 2839817466cbSJens Wiklander * Add x509_crt_verify_info() to display certificate verification results. 2840817466cbSJens Wiklander * Add support for reading DH parameters with privateValueLength included 2841817466cbSJens Wiklander (contributed by Daniel Kahn Gillmor). 2842817466cbSJens Wiklander * Add support for bit strings in X.509 names (request by Fredrik Axelsson). 2843817466cbSJens Wiklander * Add support for id-at-uniqueIdentifier in X.509 names. 2844817466cbSJens Wiklander * Add support for overriding snprintf() (except on Windows) and exit() in 2845817466cbSJens Wiklander the platform layer. 2846817466cbSJens Wiklander * Add an option to use macros instead of function pointers in the platform 2847817466cbSJens Wiklander layer (helps get rid of unwanted references). 2848817466cbSJens Wiklander * Improved Makefiles for Windows targets by fixing library targets and making 2849817466cbSJens Wiklander cross-compilation easier (thanks to Alon Bar-Lev). 2850817466cbSJens Wiklander * The benchmark program also prints heap usage for public-key primitives 2851817466cbSJens Wiklander if POLARSSL_MEMORY_BUFFER_ALLOC_C and POLARSSL_MEMORY_DEBUG are defined. 2852817466cbSJens Wiklander * New script ecc-heap.sh helps measuring the impact of ECC parameters on 2853817466cbSJens Wiklander speed and RAM (heap only for now) usage. 2854817466cbSJens Wiklander * New script memory.sh helps measuring the ROM and RAM requirements of two 2855817466cbSJens Wiklander reduced configurations (PSK-CCM and NSA suite B). 2856817466cbSJens Wiklander * Add config flag POLARSSL_DEPRECATED_WARNING (off by default) to produce 2857817466cbSJens Wiklander warnings on use of deprecated functions (with GCC and Clang only). 2858817466cbSJens Wiklander * Add config flag POLARSSL_DEPRECATED_REMOVED (off by default) to produce 2859817466cbSJens Wiklander errors on use of deprecated functions. 2860817466cbSJens Wiklander 2861817466cbSJens WiklanderBugfix 2862817466cbSJens Wiklander * Fix compile errors with PLATFORM_NO_STD_FUNCTIONS. 2863817466cbSJens Wiklander * Fix compile error with PLATFORM_EXIT_ALT (thanks to Rafał Przywara). 2864817466cbSJens Wiklander * Fix bug in entropy.c when THREADING_C is also enabled that caused 2865817466cbSJens Wiklander entropy_free() to crash (thanks to Rafał Przywara). 2866817466cbSJens Wiklander * Fix memory leak when gcm_setkey() and ccm_setkey() are used more than 2867817466cbSJens Wiklander once on the same context. 2868817466cbSJens Wiklander * Fix bug in ssl_mail_client when password is longer that username (found 2869817466cbSJens Wiklander by Bruno Pape). 2870817466cbSJens Wiklander * Fix undefined behaviour (memcmp( NULL, NULL, 0 );) in X.509 modules 2871817466cbSJens Wiklander (detected by Clang's 3.6 UBSan). 2872817466cbSJens Wiklander * mpi_size() and mpi_msb() would segfault when called on an mpi that is 2873817466cbSJens Wiklander initialized but not set (found by pravic). 2874817466cbSJens Wiklander * Fix detection of support for getrandom() on Linux (reported by syzzer) by 2875817466cbSJens Wiklander doing it at runtime (using uname) rather that compile time. 2876817466cbSJens Wiklander * Fix handling of symlinks by "make install" (found by Gaël PORTAY). 2877817466cbSJens Wiklander * Fix potential NULL pointer dereference (not trigerrable remotely) when 2878817466cbSJens Wiklander ssl_write() is called before the handshake is finished (introduced in 2879817466cbSJens Wiklander 1.3.10) (first reported by Martin Blumenstingl). 2880817466cbSJens Wiklander * Fix bug in pk_parse_key() that caused some valid private EC keys to be 2881817466cbSJens Wiklander rejected. 2882817466cbSJens Wiklander * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). 2883817466cbSJens Wiklander * Fix thread safety bug in RSA operations (found by Fredrik Axelsson). 2884817466cbSJens Wiklander * Fix hardclock() (only used in the benchmarking program) with some 2885817466cbSJens Wiklander versions of mingw64 (found by kxjhlele). 2886817466cbSJens Wiklander * Fix warnings from mingw64 in timing.c (found by kxjklele). 2887817466cbSJens Wiklander * Fix potential unintended sign extension in asn1_get_len() on 64-bit 2888817466cbSJens Wiklander platforms. 2889817466cbSJens Wiklander * Fix potential memory leak in ssl_set_psk() (found by Mansour Moufid). 2890817466cbSJens Wiklander * Fix compile error when POLARSSL_SSL_DISABLE_RENEGOTATION and 2891817466cbSJens Wiklander POLARSSL_SSL_SSESSION_TICKETS where both enabled in config.h (introduced 2892817466cbSJens Wiklander in 1.3.10). 2893817466cbSJens Wiklander * Add missing extern "C" guard in aesni.h (reported by amir zamani). 2894817466cbSJens Wiklander * Add missing dependency on SHA-256 in some x509 programs (reported by 2895817466cbSJens Wiklander Gergely Budai). 2896817466cbSJens Wiklander * Fix bug related to ssl_set_curves(): the client didn't check that the 2897817466cbSJens Wiklander curve picked by the server was actually allowed. 2898817466cbSJens Wiklander 2899817466cbSJens WiklanderChanges 2900817466cbSJens Wiklander * Remove bias in mpi_gen_prime (contributed by Pascal Junod). 2901817466cbSJens Wiklander * Remove potential sources of timing variations (some contributed by Pascal 2902817466cbSJens Wiklander Junod). 2903817466cbSJens Wiklander * Options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 are deprecated. 2904817466cbSJens Wiklander * Enabling POLARSSL_NET_C without POLARSSL_HAVE_IPV6 is deprecated. 2905817466cbSJens Wiklander * compat-1.2.h and openssl.h are deprecated. 2906817466cbSJens Wiklander * Adjusting/overriding CFLAGS and LDFLAGS with the make build system is now 2907817466cbSJens Wiklander more flexible (warning: OFLAGS is not used any more) (see the README) 2908817466cbSJens Wiklander (contributed by Alon Bar-Lev). 2909817466cbSJens Wiklander * ssl_set_own_cert() no longer calls pk_check_pair() since the 2910817466cbSJens Wiklander performance impact was bad for some users (this was introduced in 1.3.10). 2911817466cbSJens Wiklander * Move from SHA-1 to SHA-256 in example programs using signatures 2912817466cbSJens Wiklander (suggested by Thorsten Mühlfelder). 2913817466cbSJens Wiklander * Remove some unneeded inclusions of header files from the standard library 2914817466cbSJens Wiklander "minimize" others (eg use stddef.h if only size_t is needed). 2915817466cbSJens Wiklander * Change #include lines in test files to use double quotes instead of angle 2916817466cbSJens Wiklander brackets for uniformity with the rest of the code. 2917817466cbSJens Wiklander * Remove dependency on sscanf() in X.509 parsing modules. 2918817466cbSJens Wiklander 2919817466cbSJens Wiklander= mbed TLS 1.3.10 released 2015-02-09 2920817466cbSJens WiklanderSecurity 2921817466cbSJens Wiklander * NULL pointer dereference in the buffer-based allocator when the buffer is 2922817466cbSJens Wiklander full and polarssl_free() is called (found by Mark Hasemeyer) 2923817466cbSJens Wiklander (only possible if POLARSSL_MEMORY_BUFFER_ALLOC_C is enabled, which it is 2924817466cbSJens Wiklander not by default). 2925817466cbSJens Wiklander * Fix remotely-triggerable uninitialised pointer dereference caused by 2926817466cbSJens Wiklander crafted X.509 certificate (TLS server is not affected if it doesn't ask for a 2927817466cbSJens Wiklander client certificate) (found using Codenomicon Defensics). 2928817466cbSJens Wiklander * Fix remotely-triggerable memory leak caused by crafted X.509 certificates 2929817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 2930817466cbSJens Wiklander (found using Codenomicon Defensics). 2931817466cbSJens Wiklander * Fix potential stack overflow while parsing crafted X.509 certificates 2932817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 2933817466cbSJens Wiklander (found using Codenomicon Defensics). 2934817466cbSJens Wiklander * Fix timing difference that could theoretically lead to a 2935817466cbSJens Wiklander Bleichenbacher-style attack in the RSA and RSA-PSK key exchanges 2936817466cbSJens Wiklander (reported by Sebastian Schinzel). 2937817466cbSJens Wiklander 2938817466cbSJens WiklanderFeatures 2939817466cbSJens Wiklander * Add support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv). 2940817466cbSJens Wiklander * Add support for Extended Master Secret (draft-ietf-tls-session-hash). 2941817466cbSJens Wiklander * Add support for Encrypt-then-MAC (RFC 7366). 2942817466cbSJens Wiklander * Add function pk_check_pair() to test if public and private keys match. 2943817466cbSJens Wiklander * Add x509_crl_parse_der(). 2944817466cbSJens Wiklander * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the 2945817466cbSJens Wiklander length of an X.509 verification chain. 2946817466cbSJens Wiklander * Support for renegotiation can now be disabled at compile-time 2947817466cbSJens Wiklander * Support for 1/n-1 record splitting, a countermeasure against BEAST. 2948817466cbSJens Wiklander * Certificate selection based on signature hash, preferring SHA-1 over SHA-2 2949817466cbSJens Wiklander for pre-1.2 clients when multiple certificates are available. 2950817466cbSJens Wiklander * Add support for getrandom() syscall on recent Linux kernels with Glibc or 2951817466cbSJens Wiklander a compatible enough libc (eg uClibc). 2952817466cbSJens Wiklander * Add ssl_set_arc4_support() to make it easier to disable RC4 at runtime 2953817466cbSJens Wiklander while using the default ciphersuite list. 2954817466cbSJens Wiklander * Added new error codes and debug messages about selection of 2955817466cbSJens Wiklander ciphersuite/certificate. 2956817466cbSJens Wiklander 2957817466cbSJens WiklanderBugfix 2958817466cbSJens Wiklander * Stack buffer overflow if ctr_drbg_update() is called with too large 2959817466cbSJens Wiklander add_len (found by Jean-Philippe Aumasson) (not triggerable remotely). 2960817466cbSJens Wiklander * Possible buffer overflow of length at most POLARSSL_MEMORY_ALIGN_MULTIPLE 2961817466cbSJens Wiklander if memory_buffer_alloc_init() was called with buf not aligned and len not 2962817466cbSJens Wiklander a multiple of POLARSSL_MEMORY_ALIGN_MULTIPLE (not triggerable remotely). 2963817466cbSJens Wiklander * User set CFLAGS were ignored by Cmake with gcc (introduced in 1.3.9, found 2964817466cbSJens Wiklander by Julian Ospald). 2965817466cbSJens Wiklander * Fix potential undefined behaviour in Camellia. 2966817466cbSJens Wiklander * Fix potential failure in ECDSA signatures when POLARSSL_ECP_MAX_BITS is a 2967817466cbSJens Wiklander multiple of 8 (found by Gergely Budai). 2968817466cbSJens Wiklander * Fix unchecked return code in x509_crt_parse_path() on Windows (found by 2969817466cbSJens Wiklander Peter Vaskovic). 2970817466cbSJens Wiklander * Fix assembly selection for MIPS64 (thanks to James Cowgill). 2971817466cbSJens Wiklander * ssl_get_verify_result() now works even if the handshake was aborted due 2972817466cbSJens Wiklander to a failed verification (found by Fredrik Axelsson). 2973817466cbSJens Wiklander * Skip writing and parsing signature_algorithm extension if none of the 2974817466cbSJens Wiklander key exchanges enabled needs certificates. This fixes a possible interop 2975817466cbSJens Wiklander issue with some servers when a zero-length extension was sent. (Reported 2976817466cbSJens Wiklander by Peter Dettman.) 2977817466cbSJens Wiklander * On a 0-length input, base64_encode() did not correctly set output length 2978817466cbSJens Wiklander (found by Hendrik van den Boogaard). 2979817466cbSJens Wiklander 2980817466cbSJens WiklanderChanges 2981817466cbSJens Wiklander * Use deterministic nonces for AEAD ciphers in TLS by default (possible to 2982817466cbSJens Wiklander switch back to random with POLARSSL_SSL_AEAD_RANDOM_IV in config.h). 2983817466cbSJens Wiklander * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined. 2984817466cbSJens Wiklander * ssl_set_own_cert() now returns an error on key-certificate mismatch. 2985817466cbSJens Wiklander * Forbid repeated extensions in X.509 certificates. 2986817466cbSJens Wiklander * debug_print_buf() now prints a text view in addition to hexadecimal. 2987817466cbSJens Wiklander * A specific error is now returned when there are ciphersuites in common 2988817466cbSJens Wiklander but none of them is usable due to external factors such as no certificate 2989817466cbSJens Wiklander with a suitable (extended)KeyUsage or curve or no PSK set. 2990817466cbSJens Wiklander * It is now possible to disable negotiation of truncated HMAC server-side 2991817466cbSJens Wiklander at runtime with ssl_set_truncated_hmac(). 2992817466cbSJens Wiklander * Example programs for SSL client and server now disable SSLv3 by default. 2993817466cbSJens Wiklander * Example programs for SSL client and server now disable RC4 by default. 2994817466cbSJens Wiklander * Use platform.h in all test suites and programs. 2995817466cbSJens Wiklander 2996817466cbSJens Wiklander= PolarSSL 1.3.9 released 2014-10-20 2997817466cbSJens WiklanderSecurity 2998817466cbSJens Wiklander * Lowest common hash was selected from signature_algorithms extension in 2999817466cbSJens Wiklander TLS 1.2 (found by Darren Bane) (introduced in 1.3.8). 3000817466cbSJens Wiklander * Remotely-triggerable memory leak when parsing some X.509 certificates 3001817466cbSJens Wiklander (server is not affected if it doesn't ask for a client certificate) 3002817466cbSJens Wiklander (found using Codenomicon Defensics). 3003817466cbSJens Wiklander * Remotely-triggerable memory leak when parsing crafted ClientHello 3004817466cbSJens Wiklander (not affected if ECC support was compiled out) (found using Codenomicon 3005817466cbSJens Wiklander Defensics). 3006817466cbSJens Wiklander 3007817466cbSJens WiklanderBugfix 3008817466cbSJens Wiklander * Support escaping of commas in x509_string_to_names() 3009817466cbSJens Wiklander * Fix compile error in ssl_pthread_server (found by Julian Ospald). 3010817466cbSJens Wiklander * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). 3011817466cbSJens Wiklander * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). 3012817466cbSJens Wiklander * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). 3013817466cbSJens Wiklander * Fix compile error in timing.c when POLARSSL_NET_C and POLARSSL_SELFTEST 3014817466cbSJens Wiklander are defined but not POLARSSL_HAVE_TIME (found by Stephane Di Vito). 3015817466cbSJens Wiklander * Remove non-existent file from VS projects (found by Peter Vaskovic). 3016817466cbSJens Wiklander * ssl_read() could return non-application data records on server while 3017817466cbSJens Wiklander renegotation was pending, and on client when a HelloRequest was received. 3018817466cbSJens Wiklander * Server-initiated renegotiation would fail with non-blocking I/O if the 3019817466cbSJens Wiklander write callback returned WANT_WRITE when requesting renegotiation. 3020817466cbSJens Wiklander * ssl_close_notify() could send more than one message in some circumstances 3021817466cbSJens Wiklander with non-blocking I/O. 3022817466cbSJens Wiklander * Fix compiler warnings on iOS (found by Sander Niemeijer). 3023817466cbSJens Wiklander * x509_crt_parse() did not increase total_failed on PEM error 3024817466cbSJens Wiklander * Fix compile error with armcc in mpi_is_prime() 3025817466cbSJens Wiklander * Fix potential bad read in parsing ServerHello (found by Adrien 3026817466cbSJens Wiklander Vialletelle). 3027817466cbSJens Wiklander 3028817466cbSJens WiklanderChanges 3029817466cbSJens Wiklander * Ciphersuites using SHA-256 or SHA-384 now require TLS 1.x (there is no 3030817466cbSJens Wiklander standard defining how to use SHA-2 with SSL 3.0). 3031817466cbSJens Wiklander * Ciphersuites using RSA-PSK key exchange new require TLS 1.x (the spec is 3032817466cbSJens Wiklander ambiguous on how to encode some packets with SSL 3.0). 3033817466cbSJens Wiklander * Made buffer size in pk_write_(pub)key_pem() more dynamic, eg smaller if 3034817466cbSJens Wiklander RSA is disabled, larger if POLARSSL_MPI_MAX_SIZE is larger. 3035817466cbSJens Wiklander * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than 3036817466cbSJens Wiklander POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts. 3037817466cbSJens Wiklander * POLARSSL_MPI_MAX_SIZE now defaults to 1024 in order to allow 8192 bits 3038817466cbSJens Wiklander RSA keys. 3039817466cbSJens Wiklander * Accept spaces at end of line or end of buffer in base64_decode(). 3040817466cbSJens Wiklander * X.509 certificates with more than one AttributeTypeAndValue per 3041817466cbSJens Wiklander RelativeDistinguishedName are not accepted any more. 3042817466cbSJens Wiklander 3043817466cbSJens Wiklander= PolarSSL 1.3.8 released 2014-07-11 3044817466cbSJens WiklanderSecurity 3045817466cbSJens Wiklander * Fix length checking for AEAD ciphersuites (found by Codenomicon). 3046817466cbSJens Wiklander It was possible to crash the server (and client) using crafted messages 3047817466cbSJens Wiklander when a GCM suite was chosen. 3048817466cbSJens Wiklander 3049817466cbSJens WiklanderFeatures 3050817466cbSJens Wiklander * Add CCM module and cipher mode to Cipher Layer 3051817466cbSJens Wiklander * Support for CCM and CCM_8 ciphersuites 3052817466cbSJens Wiklander * Support for parsing and verifying RSASSA-PSS signatures in the X.509 3053817466cbSJens Wiklander modules (certificates, CRLs and CSRs). 3054817466cbSJens Wiklander * Blowfish in the cipher layer now supports variable length keys. 3055817466cbSJens Wiklander * Add example config.h for PSK with CCM, optimized for low RAM usage. 3056817466cbSJens Wiklander * Optimize for RAM usage in example config.h for NSA Suite B profile. 3057817466cbSJens Wiklander * Add POLARSSL_REMOVE_ARC4_CIPHERSUITES to allow removing RC4 ciphersuites 3058817466cbSJens Wiklander from the default list (inactive by default). 3059817466cbSJens Wiklander * Add server-side enforcement of sent renegotiation requests 3060817466cbSJens Wiklander (ssl_set_renegotiation_enforced()) 3061817466cbSJens Wiklander * Add SSL_CIPHERSUITES config.h flag to allow specifying a list of 3062817466cbSJens Wiklander ciphersuites to use and save some memory if the list is small. 3063817466cbSJens Wiklander 3064817466cbSJens WiklanderChanges 3065817466cbSJens Wiklander * Add LINK_WITH_PTHREAD option in CMake for explicit linking that is 3066817466cbSJens Wiklander required on some platforms (e.g. OpenBSD) 3067817466cbSJens Wiklander * Migrate zeroizing of data to polarssl_zeroize() instead of memset() 3068817466cbSJens Wiklander against unwanted compiler optimizations 3069817466cbSJens Wiklander * md_list() now returns hashes strongest first 3070817466cbSJens Wiklander * Selection of hash for signing ServerKeyExchange in TLS 1.2 now picks 3071817466cbSJens Wiklander strongest offered by client. 3072817466cbSJens Wiklander * All public contexts have _init() and _free() functions now for simpler 3073817466cbSJens Wiklander usage pattern 3074817466cbSJens Wiklander 3075817466cbSJens WiklanderBugfix 3076817466cbSJens Wiklander * Fix in debug_print_msg() 3077817466cbSJens Wiklander * Enforce alignment in the buffer allocator even if buffer is not aligned 3078817466cbSJens Wiklander * Remove less-than-zero checks on unsigned numbers 3079817466cbSJens Wiklander * Stricter check on SSL ClientHello internal sizes compared to actual packet 3080817466cbSJens Wiklander size (found by TrustInSoft) 3081817466cbSJens Wiklander * Fix WSAStartup() return value check (found by Peter Vaskovic) 3082817466cbSJens Wiklander * Other minor issues (found by Peter Vaskovic) 3083817466cbSJens Wiklander * Fix symlink command for cross compiling with CMake (found by Andre 3084817466cbSJens Wiklander Heinecke) 3085817466cbSJens Wiklander * Fix DER output of gen_key app (found by Gergely Budai) 3086817466cbSJens Wiklander * Very small records were incorrectly rejected when truncated HMAC was in 3087817466cbSJens Wiklander use with some ciphersuites and versions (RC4 in all versions, CBC with 3088817466cbSJens Wiklander versions < TLS 1.1). 3089817466cbSJens Wiklander * Very large records using more than 224 bytes of padding were incorrectly 3090817466cbSJens Wiklander rejected with CBC-based ciphersuites and TLS >= 1.1 3091817466cbSJens Wiklander * Very large records using less padding could cause a buffer overread of up 3092817466cbSJens Wiklander to 32 bytes with CBC-based ciphersuites and TLS >= 1.1 3093817466cbSJens Wiklander * Restore ability to use a v1 cert as a CA if trusted locally. (This had 3094817466cbSJens Wiklander been removed in 1.3.6.) 3095817466cbSJens Wiklander * Restore ability to locally trust a self-signed cert that is not a proper 3096817466cbSJens Wiklander CA for use as an end entity certificate. (This had been removed in 3097817466cbSJens Wiklander 1.3.6.) 3098817466cbSJens Wiklander * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). 3099817466cbSJens Wiklander * Use \n\t rather than semicolons for bn_mul asm, since some assemblers 3100817466cbSJens Wiklander interpret semicolons as comment delimiters (found by Barry K. Nathan). 3101817466cbSJens Wiklander * Fix off-by-one error in parsing Supported Point Format extension that 3102817466cbSJens Wiklander caused some handshakes to fail. 3103817466cbSJens Wiklander * Fix possible miscomputation of the premaster secret with DHE-PSK key 3104817466cbSJens Wiklander exchange that caused some handshakes to fail with other implementations. 3105817466cbSJens Wiklander (Failure rate <= 1/255 with common DHM moduli.) 3106817466cbSJens Wiklander * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). 3107817466cbSJens Wiklander * Fix base64_decode() to return and check length correctly (in case of 3108817466cbSJens Wiklander tight buffers) 3109817466cbSJens Wiklander * Fix mpi_write_string() to write "00" as hex output for empty MPI (found 3110817466cbSJens Wiklander by Hui Dong) 3111817466cbSJens Wiklander 3112817466cbSJens Wiklander= PolarSSL 1.3.7 released on 2014-05-02 3113817466cbSJens WiklanderFeatures 3114817466cbSJens Wiklander * debug_set_log_mode() added to determine raw or full logging 3115817466cbSJens Wiklander * debug_set_threshold() added to ignore messages over threshold level 3116817466cbSJens Wiklander * version_check_feature() added to check for compile-time options at 3117817466cbSJens Wiklander run-time 3118817466cbSJens Wiklander 3119817466cbSJens WiklanderChanges 3120817466cbSJens Wiklander * POLARSSL_CONFIG_OPTIONS has been removed. All values are individually 3121817466cbSJens Wiklander checked and filled in the relevant module headers 3122817466cbSJens Wiklander * Debug module only outputs full lines instead of parts 3123817466cbSJens Wiklander * Better support for the different Attribute Types from IETF PKIX (RFC 5280) 3124817466cbSJens Wiklander * AES-NI now compiles with "old" assemblers too 3125817466cbSJens Wiklander * Ciphersuites based on RC4 now have the lowest priority by default 3126817466cbSJens Wiklander 3127817466cbSJens WiklanderBugfix 3128817466cbSJens Wiklander * Only iterate over actual certificates in ssl_write_certificate_request() 3129817466cbSJens Wiklander (found by Matthew Page) 3130817466cbSJens Wiklander * Typos in platform.c and pkcs11.c (found by Daniel Phillips and Steffan 3131817466cbSJens Wiklander Karger) 3132817466cbSJens Wiklander * cert_write app should use subject of issuer certificate as issuer of cert 3133817466cbSJens Wiklander * Fix false reject in padding check in ssl_decrypt_buf() for CBC 3134817466cbSJens Wiklander ciphersuites, for full SSL frames of data. 3135817466cbSJens Wiklander * Improve interoperability by not writing extension length in ClientHello / 3136817466cbSJens Wiklander ServerHello when no extensions are present (found by Matthew Page) 3137817466cbSJens Wiklander * rsa_check_pubkey() now allows an E up to N 3138817466cbSJens Wiklander * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings 3139817466cbSJens Wiklander * mpi_fill_random() was creating numbers larger than requested on 3140817466cbSJens Wiklander big-endian platform when size was not an integer number of limbs 3141817466cbSJens Wiklander * Fix dependencies issues in X.509 test suite. 3142817466cbSJens Wiklander * Some parts of ssl_tls.c were compiled even when the module was disabled. 3143817466cbSJens Wiklander * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer) 3144817466cbSJens Wiklander * Fix detection of Clang on some Apple platforms with CMake 3145817466cbSJens Wiklander (found by Barry K. Nathan) 3146817466cbSJens Wiklander 3147817466cbSJens Wiklander= PolarSSL 1.3.6 released on 2014-04-11 3148817466cbSJens Wiklander 3149817466cbSJens WiklanderFeatures 3150817466cbSJens Wiklander * Support for the ALPN SSL extension 3151817466cbSJens Wiklander * Add option 'use_dev_random' to gen_key application 3152817466cbSJens Wiklander * Enable verification of the keyUsage extension for CA and leaf 3153817466cbSJens Wiklander certificates (POLARSSL_X509_CHECK_KEY_USAGE) 3154817466cbSJens Wiklander * Enable verification of the extendedKeyUsage extension 3155817466cbSJens Wiklander (POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE) 3156817466cbSJens Wiklander 3157817466cbSJens WiklanderChanges 3158817466cbSJens Wiklander * x509_crt_info() now prints information about parsed extensions as well 3159817466cbSJens Wiklander * pk_verify() now returns a specific error code when the signature is valid 3160817466cbSJens Wiklander but shorter than the supplied length. 3161817466cbSJens Wiklander * Use UTC time to check certificate validity. 3162817466cbSJens Wiklander * Reject certificates with times not in UTC, per RFC 5280. 3163817466cbSJens Wiklander 3164817466cbSJens WiklanderSecurity 3165817466cbSJens Wiklander * Avoid potential timing leak in ecdsa_sign() by blinding modular division. 3166817466cbSJens Wiklander (Found by Watson Ladd.) 3167817466cbSJens Wiklander * The notAfter date of some certificates was no longer checked since 1.3.5. 3168817466cbSJens Wiklander This affects certificates in the user-supplied chain except the top 3169817466cbSJens Wiklander certificate. If the user-supplied chain contains only one certificates, 3170817466cbSJens Wiklander it is not affected (ie, its notAfter date is properly checked). 3171817466cbSJens Wiklander * Prevent potential NULL pointer dereference in ssl_read_record() (found by 3172817466cbSJens Wiklander TrustInSoft) 3173817466cbSJens Wiklander 3174817466cbSJens WiklanderBugfix 3175817466cbSJens Wiklander * The length of various ClientKeyExchange messages was not properly checked. 3176817466cbSJens Wiklander * Some example server programs were not sending the close_notify alert. 3177817466cbSJens Wiklander * Potential memory leak in mpi_exp_mod() when error occurs during 3178817466cbSJens Wiklander calculation of RR. 3179817466cbSJens Wiklander * Fixed malloc/free default #define in platform.c (found by Gergely Budai). 3180817466cbSJens Wiklander * Fixed type which made POLARSSL_ENTROPY_FORCE_SHA256 uneffective (found by 3181817466cbSJens Wiklander Gergely Budai). 3182817466cbSJens Wiklander * Fix #include path in ecdsa.h which wasn't accepted by some compilers. 3183817466cbSJens Wiklander (found by Gergely Budai) 3184817466cbSJens Wiklander * Fix compile errors when POLARSSL_ERROR_STRERROR_BC is undefined (found by 3185817466cbSJens Wiklander Shuo Chen). 3186817466cbSJens Wiklander * oid_get_numeric_string() used to truncate the output without returning an 3187817466cbSJens Wiklander error if the output buffer was just 1 byte too small. 3188817466cbSJens Wiklander * dhm_parse_dhm() (hence dhm_parse_dhmfile()) did not set dhm->len. 3189817466cbSJens Wiklander * Calling pk_debug() on an RSA-alt key would segfault. 3190817466cbSJens Wiklander * pk_get_size() and pk_get_len() were off by a factor 8 for RSA-alt keys. 3191817466cbSJens Wiklander * Potential buffer overwrite in pem_write_buffer() because of low length 3192817466cbSJens Wiklander indication (found by Thijs Alkemade) 3193817466cbSJens Wiklander * EC curves constants, which should be only in ROM since 1.3.3, were also 3194817466cbSJens Wiklander stored in RAM due to missing 'const's (found by Gergely Budai). 3195817466cbSJens Wiklander 3196817466cbSJens Wiklander= PolarSSL 1.3.5 released on 2014-03-26 3197817466cbSJens WiklanderFeatures 3198817466cbSJens Wiklander * HMAC-DRBG as a separate module 3199817466cbSJens Wiklander * Option to set the Curve preference order (disabled by default) 3200817466cbSJens Wiklander * Single Platform compatilibity layer (for memory / printf / fprintf) 3201817466cbSJens Wiklander * Ability to provide alternate timing implementation 3202817466cbSJens Wiklander * Ability to force the entropy module to use SHA-256 as its basis 3203817466cbSJens Wiklander (POLARSSL_ENTROPY_FORCE_SHA256) 3204817466cbSJens Wiklander * Testing script ssl-opt.sh added for testing 'live' ssl option 3205817466cbSJens Wiklander interoperability against OpenSSL and PolarSSL 3206817466cbSJens Wiklander * Support for reading EC keys that use SpecifiedECDomain in some cases. 3207817466cbSJens Wiklander * Entropy module now supports seed writing and reading 3208817466cbSJens Wiklander 3209817466cbSJens WiklanderChanges 3210817466cbSJens Wiklander * Deprecated the Memory layer 3211817466cbSJens Wiklander * entropy_add_source(), entropy_update_manual() and entropy_gather() 3212817466cbSJens Wiklander now thread-safe if POLARSSL_THREADING_C defined 3213817466cbSJens Wiklander * Improvements to the CMake build system, contributed by Julian Ospald. 3214817466cbSJens Wiklander * Work around a bug of the version of Clang shipped by Apple with Mavericks 3215817466cbSJens Wiklander that prevented bignum.c from compiling. (Reported by Rafael Baptista.) 3216817466cbSJens Wiklander * Revamped the compat.sh interoperatibility script to include support for 3217817466cbSJens Wiklander testing against GnuTLS 3218817466cbSJens Wiklander * Deprecated ssl_set_own_cert_rsa() and ssl_set_own_cert_rsa_alt() 3219817466cbSJens Wiklander * Improvements to tests/Makefile, contributed by Oden Eriksson. 3220817466cbSJens Wiklander 3221817466cbSJens WiklanderSecurity 3222817466cbSJens Wiklander * Forbid change of server certificate during renegotiation to prevent 3223817466cbSJens Wiklander "triple handshake" attack when authentication mode is 'optional' (the 3224817466cbSJens Wiklander attack was already impossible when authentication is required). 3225817466cbSJens Wiklander * Check notBefore timestamp of certificates and CRLs from the future. 3226817466cbSJens Wiklander * Forbid sequence number wrapping 3227817466cbSJens Wiklander * Fixed possible buffer overflow with overlong PSK 3228817466cbSJens Wiklander * Possible remotely-triggered out-of-bounds memory access fixed (found by 3229817466cbSJens Wiklander TrustInSoft) 3230817466cbSJens Wiklander 3231817466cbSJens WiklanderBugfix 3232817466cbSJens Wiklander * ecp_gen_keypair() does more tries to prevent failure because of 3233817466cbSJens Wiklander statistics 3234817466cbSJens Wiklander * Fixed bug in RSA PKCS#1 v1.5 "reversed" operations 3235817466cbSJens Wiklander * Fixed testing with out-of-source builds using cmake 3236817466cbSJens Wiklander * Fixed version-major intolerance in server 3237817466cbSJens Wiklander * Fixed CMake symlinking on out-of-source builds 3238817466cbSJens Wiklander * Fixed dependency issues in test suite 3239817466cbSJens Wiklander * Programs rsa_sign_pss and rsa_verify_pss were not using PSS since 1.3.0 3240817466cbSJens Wiklander * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by 3241817466cbSJens Wiklander Alex Wilson.) 3242817466cbSJens Wiklander * ssl_cache was creating entries when max_entries=0 if TIMING_C was enabled. 3243817466cbSJens Wiklander * m_sleep() was sleeping twice too long on most Unix platforms. 3244817466cbSJens Wiklander * Fixed bug with session tickets and non-blocking I/O in the unlikely case 3245817466cbSJens Wiklander send() would return an EAGAIN error when sending the ticket. 3246817466cbSJens Wiklander * ssl_cache was leaking memory when reusing a timed out entry containing a 3247817466cbSJens Wiklander client certificate. 3248817466cbSJens Wiklander * ssl_srv was leaking memory when client presented a timed out ticket 3249817466cbSJens Wiklander containing a client certificate 3250817466cbSJens Wiklander * ssl_init() was leaving a dirty pointer in ssl_context if malloc of 3251817466cbSJens Wiklander out_ctr failed 3252817466cbSJens Wiklander * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc 3253817466cbSJens Wiklander of one of them failed 3254817466cbSJens Wiklander * Fix typo in rsa_copy() that impacted PKCS#1 v2 contexts 3255817466cbSJens Wiklander * x509_get_current_time() uses localtime_r() to prevent thread issues 3256817466cbSJens Wiklander 3257817466cbSJens Wiklander= PolarSSL 1.3.4 released on 2014-01-27 3258817466cbSJens WiklanderFeatures 3259817466cbSJens Wiklander * Support for the Koblitz curves: secp192k1, secp224k1, secp256k1 3260817466cbSJens Wiklander * Support for RIPEMD-160 3261817466cbSJens Wiklander * Support for AES CFB8 mode 3262817466cbSJens Wiklander * Support for deterministic ECDSA (RFC 6979) 3263817466cbSJens Wiklander 3264817466cbSJens WiklanderBugfix 3265817466cbSJens Wiklander * Potential memory leak in bignum_selftest() 3266817466cbSJens Wiklander * Replaced expired test certificate 3267817466cbSJens Wiklander * ssl_mail_client now terminates lines with CRLF, instead of LF 3268817466cbSJens Wiklander * net module handles timeouts on blocking sockets better (found by Tilman 3269817466cbSJens Wiklander Sauerbeck) 3270817466cbSJens Wiklander * Assembly format fixes in bn_mul.h 3271817466cbSJens Wiklander 3272817466cbSJens WiklanderSecurity 3273817466cbSJens Wiklander * Missing MPI_CHK calls added around unguarded mpi calls (found by 3274817466cbSJens Wiklander TrustInSoft) 3275817466cbSJens Wiklander 3276817466cbSJens Wiklander= PolarSSL 1.3.3 released on 2013-12-31 3277817466cbSJens WiklanderFeatures 3278817466cbSJens Wiklander * EC key generation support in gen_key app 3279817466cbSJens Wiklander * Support for adhering to client ciphersuite order preference 3280817466cbSJens Wiklander (POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE) 3281817466cbSJens Wiklander * Support for Curve25519 3282817466cbSJens Wiklander * Support for ECDH-RSA and ECDH-ECDSA key exchanges and ciphersuites 3283817466cbSJens Wiklander * Support for IPv6 in the NET module 3284817466cbSJens Wiklander * AES-NI support for AES, AES-GCM and AES key scheduling 3285817466cbSJens Wiklander * SSL Pthread-based server example added (ssl_pthread_server) 3286817466cbSJens Wiklander 3287817466cbSJens WiklanderChanges 3288817466cbSJens Wiklander * gen_prime() speedup 3289817466cbSJens Wiklander * Speedup of ECP multiplication operation 3290817466cbSJens Wiklander * Relaxed some SHA2 ciphersuite's version requirements 3291817466cbSJens Wiklander * Dropped use of readdir_r() instead of readdir() with threading support 3292817466cbSJens Wiklander * More constant-time checks in the RSA module 3293817466cbSJens Wiklander * Split off curves from ecp.c into ecp_curves.c 3294817466cbSJens Wiklander * Curves are now stored fully in ROM 3295817466cbSJens Wiklander * Memory usage optimizations in ECP module 3296817466cbSJens Wiklander * Removed POLARSSL_THREADING_DUMMY 3297817466cbSJens Wiklander 3298817466cbSJens WiklanderBugfix 3299817466cbSJens Wiklander * Fixed bug in mpi_set_bit() on platforms where t_uint is wider than int 3300817466cbSJens Wiklander * Fixed X.509 hostname comparison (with non-regular characters) 3301817466cbSJens Wiklander * SSL now gracefully handles missing RNG 3302817466cbSJens Wiklander * Missing defines / cases for RSA_PSK key exchange 3303817466cbSJens Wiklander * crypt_and_hash app checks MAC before final decryption 3304817466cbSJens Wiklander * Potential memory leak in ssl_ticket_keys_init() 3305817466cbSJens Wiklander * Memory leak in benchmark application 3306817466cbSJens Wiklander * Fixed x509_crt_parse_path() bug on Windows platforms 3307817466cbSJens Wiklander * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by 3308817466cbSJens Wiklander TrustInSoft) 3309817466cbSJens Wiklander * Fixed potential overflow in certificate size verification in 3310817466cbSJens Wiklander ssl_write_certificate() (found by TrustInSoft) 3311817466cbSJens Wiklander 3312817466cbSJens WiklanderSecurity 3313817466cbSJens Wiklander * Possible remotely-triggered out-of-bounds memory access fixed (found by 3314817466cbSJens Wiklander TrustInSoft) 3315817466cbSJens Wiklander 3316817466cbSJens Wiklander= PolarSSL 1.3.2 released on 2013-11-04 3317817466cbSJens WiklanderFeatures 3318817466cbSJens Wiklander * PK tests added to test framework 3319817466cbSJens Wiklander * Added optional optimization for NIST MODP curves (POLARSSL_ECP_NIST_OPTIM) 3320817466cbSJens Wiklander * Support for Camellia-GCM mode and ciphersuites 3321817466cbSJens Wiklander 3322817466cbSJens WiklanderChanges 3323817466cbSJens Wiklander * Padding checks in cipher layer are now constant-time 3324817466cbSJens Wiklander * Value comparisons in SSL layer are now constant-time 3325817466cbSJens Wiklander * Support for serialNumber, postalAddress and postalCode in X509 names 3326817466cbSJens Wiklander * SSL Renegotiation was refactored 3327817466cbSJens Wiklander 3328817466cbSJens WiklanderBugfix 3329817466cbSJens Wiklander * More stringent checks in cipher layer 3330817466cbSJens Wiklander * Server does not send out extensions not advertised by client 3331817466cbSJens Wiklander * Prevent possible alignment warnings on casting from char * to 'aligned *' 3332817466cbSJens Wiklander * Misc fixes and additions to dependency checks 3333817466cbSJens Wiklander * Const correctness 3334817466cbSJens Wiklander * cert_write with selfsign should use issuer_name as subject_name 3335817466cbSJens Wiklander * Fix ECDSA corner case: missing reduction mod N (found by DualTachyon) 3336817466cbSJens Wiklander * Defines to handle UEFI environment under MSVC 3337817466cbSJens Wiklander * Server-side initiated renegotiations send HelloRequest 3338817466cbSJens Wiklander 3339817466cbSJens Wiklander= PolarSSL 1.3.1 released on 2013-10-15 3340817466cbSJens WiklanderFeatures 3341817466cbSJens Wiklander * Support for Brainpool curves and TLS ciphersuites (RFC 7027) 3342817466cbSJens Wiklander * Support for ECDHE-PSK key-exchange and ciphersuites 3343817466cbSJens Wiklander * Support for RSA-PSK key-exchange and ciphersuites 3344817466cbSJens Wiklander 3345817466cbSJens WiklanderChanges 3346817466cbSJens Wiklander * RSA blinding locks for a smaller amount of time 3347817466cbSJens Wiklander * TLS compression only allocates working buffer once 3348817466cbSJens Wiklander * Introduced POLARSSL_HAVE_READDIR_R for systems without it 3349817466cbSJens Wiklander * config.h is more script-friendly 3350817466cbSJens Wiklander 3351817466cbSJens WiklanderBugfix 3352817466cbSJens Wiklander * Missing MSVC defines added 3353817466cbSJens Wiklander * Compile errors with POLARSSL_RSA_NO_CRT 3354817466cbSJens Wiklander * Header files with 'polarssl/' 3355817466cbSJens Wiklander * Const correctness 3356817466cbSJens Wiklander * Possible naming collision in dhm_context 3357817466cbSJens Wiklander * Better support for MSVC 3358817466cbSJens Wiklander * threading_set_alt() name 3359817466cbSJens Wiklander * Added missing x509write_crt_set_version() 3360817466cbSJens Wiklander 3361817466cbSJens Wiklander= PolarSSL 1.3.0 released on 2013-10-01 3362817466cbSJens WiklanderFeatures 3363817466cbSJens Wiklander * Elliptic Curve Cryptography module added 3364817466cbSJens Wiklander * Elliptic Curve Diffie Hellman module added 3365817466cbSJens Wiklander * Ephemeral Elliptic Curve Diffie Hellman support for SSL/TLS 3366817466cbSJens Wiklander (ECDHE-based ciphersuites) 3367817466cbSJens Wiklander * Ephemeral Elliptic Curve Digital Signature Algorithm support for SSL/TLS 3368817466cbSJens Wiklander (ECDSA-based ciphersuites) 3369817466cbSJens Wiklander * Ability to specify allowed ciphersuites based on the protocol version. 3370817466cbSJens Wiklander * PSK and DHE-PSK based ciphersuites added 3371817466cbSJens Wiklander * Memory allocation abstraction layer added 3372817466cbSJens Wiklander * Buffer-based memory allocator added (no malloc() / free() / HEAP usage) 3373817466cbSJens Wiklander * Threading abstraction layer added (dummy / pthread / alternate) 3374817466cbSJens Wiklander * Public Key abstraction layer added 3375817466cbSJens Wiklander * Parsing Elliptic Curve keys 3376817466cbSJens Wiklander * Parsing Elliptic Curve certificates 3377817466cbSJens Wiklander * Support for max_fragment_length extension (RFC 6066) 3378817466cbSJens Wiklander * Support for truncated_hmac extension (RFC 6066) 3379817466cbSJens Wiklander * Support for zeros-and-length (ANSI X.923) padding, one-and-zeros 3380817466cbSJens Wiklander (ISO/IEC 7816-4) padding and zero padding in the cipher layer 3381817466cbSJens Wiklander * Support for session tickets (RFC 5077) 3382817466cbSJens Wiklander * Certificate Request (CSR) generation with extensions (key_usage, 3383817466cbSJens Wiklander ns_cert_type) 3384817466cbSJens Wiklander * X509 Certificate writing with extensions (basic_constraints, 3385817466cbSJens Wiklander issuer_key_identifier, etc) 3386817466cbSJens Wiklander * Optional blinding for RSA, DHM and EC 3387817466cbSJens Wiklander * Support for multiple active certificate / key pairs in SSL servers for 3388817466cbSJens Wiklander the same host (Not to be confused with SNI!) 3389817466cbSJens Wiklander 3390817466cbSJens WiklanderChanges 3391817466cbSJens Wiklander * Ability to enable / disable SSL v3 / TLS 1.0 / TLS 1.1 / TLS 1.2 3392817466cbSJens Wiklander individually 3393817466cbSJens Wiklander * Introduced separate SSL Ciphersuites module that is based on 3394817466cbSJens Wiklander Cipher and MD information 3395817466cbSJens Wiklander * Internals for SSL module adapted to have separate IV pointer that is 3396817466cbSJens Wiklander dynamically set (Better support for hardware acceleration) 3397817466cbSJens Wiklander * Moved all OID functionality to a separate module. RSA function 3398817466cbSJens Wiklander prototypes for the RSA sign and verify functions changed as a result 3399817466cbSJens Wiklander * Split up the GCM module into a starts/update/finish cycle 3400817466cbSJens Wiklander * Client and server now filter sent and accepted ciphersuites on minimum 3401817466cbSJens Wiklander and maximum protocol version 3402817466cbSJens Wiklander * Ability to disable server_name extension (RFC 6066) 3403817466cbSJens Wiklander * Renamed error_strerror() to the less conflicting polarssl_strerror() 3404817466cbSJens Wiklander (Ability to keep old as well with POLARSSL_ERROR_STRERROR_BC) 3405817466cbSJens Wiklander * SHA2 renamed to SHA256, SHA4 renamed to SHA512 and functions accordingly 3406817466cbSJens Wiklander * All RSA operations require a random generator for blinding purposes 3407817466cbSJens Wiklander * X509 core refactored 3408817466cbSJens Wiklander * x509_crt_verify() now case insensitive for cn (RFC 6125 6.4) 3409817466cbSJens Wiklander * Also compiles / runs without time-based functions (!POLARSSL_HAVE_TIME) 3410817466cbSJens Wiklander * Support faulty X509 v1 certificates with extensions 3411817466cbSJens Wiklander (POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3) 3412817466cbSJens Wiklander 3413817466cbSJens WiklanderBugfix 3414817466cbSJens Wiklander * Fixed parse error in ssl_parse_certificate_request() 3415817466cbSJens Wiklander * zlib compression/decompression skipped on empty blocks 3416817466cbSJens Wiklander * Support for AIX header locations in net.c module 3417817466cbSJens Wiklander * Fixed file descriptor leaks 3418817466cbSJens Wiklander 3419817466cbSJens WiklanderSecurity 3420817466cbSJens Wiklander * RSA blinding on CRT operations to counter timing attacks 3421817466cbSJens Wiklander (found by Cyril Arnaud and Pierre-Alain Fouque) 3422817466cbSJens Wiklander 3423817466cbSJens Wiklander 3424817466cbSJens Wiklander= Version 1.2.14 released 2015-05-?? 3425817466cbSJens Wiklander 3426817466cbSJens WiklanderSecurity 3427817466cbSJens Wiklander * Fix potential invalid memory read in the server, that allows a client to 3428817466cbSJens Wiklander crash it remotely (found by Caj Larsson). 3429817466cbSJens Wiklander * Fix potential invalid memory read in certificate parsing, that allows a 3430817466cbSJens Wiklander client to crash the server remotely if client authentication is enabled 3431817466cbSJens Wiklander (found using Codenomicon Defensics). 3432817466cbSJens Wiklander * Add countermeasure against "Lucky 13 strikes back" cache-based attack, 3433817466cbSJens Wiklander https://dl.acm.org/citation.cfm?id=2714625 3434817466cbSJens Wiklander 3435817466cbSJens WiklanderBugfix 3436817466cbSJens Wiklander * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). 3437817466cbSJens Wiklander * Fix hardclock() (only used in the benchmarking program) with some 3438817466cbSJens Wiklander versions of mingw64 (found by kxjhlele). 3439817466cbSJens Wiklander * Fix warnings from mingw64 in timing.c (found by kxjklele). 3440817466cbSJens Wiklander * Fix potential unintended sign extension in asn1_get_len() on 64-bit 3441817466cbSJens Wiklander platforms (found with Coverity Scan). 3442817466cbSJens Wiklander 3443817466cbSJens Wiklander= Version 1.2.13 released 2015-02-16 3444817466cbSJens WiklanderNote: Although PolarSSL has been renamed to mbed TLS, no changes reflecting 3445817466cbSJens Wiklander this will be made in the 1.2 branch at this point. 3446817466cbSJens Wiklander 3447817466cbSJens WiklanderSecurity 3448817466cbSJens Wiklander * Fix remotely-triggerable uninitialised pointer dereference caused by 3449817466cbSJens Wiklander crafted X.509 certificate (TLS server is not affected if it doesn't ask 3450817466cbSJens Wiklander for a client certificate) (found using Codenomicon Defensics). 3451817466cbSJens Wiklander * Fix remotely-triggerable memory leak caused by crafted X.509 certificates 3452817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 3453817466cbSJens Wiklander (found using Codenomicon Defensics). 3454817466cbSJens Wiklander * Fix potential stack overflow while parsing crafted X.509 certificates 3455817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate) 3456817466cbSJens Wiklander found using Codenomicon Defensics). 3457817466cbSJens Wiklander * Fix buffer overread of size 1 when parsing crafted X.509 certificates 3458817466cbSJens Wiklander (TLS server is not affected if it doesn't ask for a client certificate). 3459817466cbSJens Wiklander 3460817466cbSJens WiklanderBugfix 3461817466cbSJens Wiklander * Fix potential undefined behaviour in Camellia. 3462817466cbSJens Wiklander * Fix memory leaks in PKCS#5 and PKCS#12. 3463817466cbSJens Wiklander * Stack buffer overflow if ctr_drbg_update() is called with too large 3464817466cbSJens Wiklander add_len (found by Jean-Philippe Aumasson) (not triggerable remotely). 3465817466cbSJens Wiklander * Fix bug in MPI/bignum on s390/s390x (reported by Dan Horák) (introduced 3466817466cbSJens Wiklander in 1.2.12). 3467817466cbSJens Wiklander * Fix unchecked return code in x509_crt_parse_path() on Windows (found by 3468817466cbSJens Wiklander Peter Vaskovic). 3469817466cbSJens Wiklander * Fix assembly selection for MIPS64 (thanks to James Cowgill). 3470817466cbSJens Wiklander * ssl_get_verify_result() now works even if the handshake was aborted due 3471817466cbSJens Wiklander to a failed verification (found by Fredrik Axelsson). 3472817466cbSJens Wiklander * Skip writing and parsing signature_algorithm extension if none of the 3473817466cbSJens Wiklander key exchanges enabled needs certificates. This fixes a possible interop 3474817466cbSJens Wiklander issue with some servers when a zero-length extension was sent. (Reported 3475817466cbSJens Wiklander by Peter Dettman.) 3476817466cbSJens Wiklander * On a 0-length input, base64_encode() did not correctly set output length 3477817466cbSJens Wiklander (found by Hendrik van den Boogaard). 3478817466cbSJens Wiklander 3479817466cbSJens WiklanderChanges 3480817466cbSJens Wiklander * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined. 3481817466cbSJens Wiklander * Forbid repeated extensions in X.509 certificates. 3482817466cbSJens Wiklander * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the 3483817466cbSJens Wiklander length of an X.509 verification chain (default = 8). 3484817466cbSJens Wiklander= Version 1.2.12 released 2014-10-24 3485817466cbSJens Wiklander 3486817466cbSJens WiklanderSecurity 3487817466cbSJens Wiklander * Remotely-triggerable memory leak when parsing some X.509 certificates 3488817466cbSJens Wiklander (server is not affected if it doesn't ask for a client certificate). 3489817466cbSJens Wiklander (Found using Codenomicon Defensics.) 3490817466cbSJens Wiklander 3491817466cbSJens WiklanderBugfix 3492817466cbSJens Wiklander * Fix potential bad read in parsing ServerHello (found by Adrien 3493817466cbSJens Wiklander Vialletelle). 3494817466cbSJens Wiklander * ssl_close_notify() could send more than one message in some circumstances 3495817466cbSJens Wiklander with non-blocking I/O. 3496817466cbSJens Wiklander * x509_crt_parse() did not increase total_failed on PEM error 3497817466cbSJens Wiklander * Fix compiler warnings on iOS (found by Sander Niemeijer). 3498817466cbSJens Wiklander * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). 3499817466cbSJens Wiklander * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). 3500817466cbSJens Wiklander * ssl_read() could return non-application data records on server while 3501817466cbSJens Wiklander renegotation was pending, and on client when a HelloRequest was received. 3502817466cbSJens Wiklander * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). 3503817466cbSJens Wiklander 3504817466cbSJens WiklanderChanges 3505817466cbSJens Wiklander * X.509 certificates with more than one AttributeTypeAndValue per 3506817466cbSJens Wiklander RelativeDistinguishedName are not accepted any more. 3507817466cbSJens Wiklander * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than 3508817466cbSJens Wiklander POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts. 3509817466cbSJens Wiklander * Accept spaces at end of line or end of buffer in base64_decode(). 3510817466cbSJens Wiklander 3511817466cbSJens Wiklander= Version 1.2.11 released 2014-07-11 3512817466cbSJens WiklanderFeatures 3513817466cbSJens Wiklander * Entropy module now supports seed writing and reading 3514817466cbSJens Wiklander 3515817466cbSJens WiklanderChanges 3516817466cbSJens Wiklander * Introduced POLARSSL_HAVE_READDIR_R for systems without it 3517817466cbSJens Wiklander * Improvements to the CMake build system, contributed by Julian Ospald. 3518817466cbSJens Wiklander * Work around a bug of the version of Clang shipped by Apple with Mavericks 3519817466cbSJens Wiklander that prevented bignum.c from compiling. (Reported by Rafael Baptista.) 3520817466cbSJens Wiklander * Improvements to tests/Makefile, contributed by Oden Eriksson. 3521817466cbSJens Wiklander * Use UTC time to check certificate validity. 3522817466cbSJens Wiklander * Reject certificates with times not in UTC, per RFC 5280. 3523817466cbSJens Wiklander * Migrate zeroizing of data to polarssl_zeroize() instead of memset() 3524817466cbSJens Wiklander against unwanted compiler optimizations 3525817466cbSJens Wiklander 3526817466cbSJens WiklanderSecurity 3527817466cbSJens Wiklander * Forbid change of server certificate during renegotiation to prevent 3528817466cbSJens Wiklander "triple handshake" attack when authentication mode is optional (the 3529817466cbSJens Wiklander attack was already impossible when authentication is required). 3530817466cbSJens Wiklander * Check notBefore timestamp of certificates and CRLs from the future. 3531817466cbSJens Wiklander * Forbid sequence number wrapping 3532817466cbSJens Wiklander * Prevent potential NULL pointer dereference in ssl_read_record() (found by 3533817466cbSJens Wiklander TrustInSoft) 3534817466cbSJens Wiklander * Fix length checking for AEAD ciphersuites (found by Codenomicon). 3535817466cbSJens Wiklander It was possible to crash the server (and client) using crafted messages 3536817466cbSJens Wiklander when a GCM suite was chosen. 3537817466cbSJens Wiklander 3538817466cbSJens WiklanderBugfix 3539817466cbSJens Wiklander * Fixed X.509 hostname comparison (with non-regular characters) 3540817466cbSJens Wiklander * SSL now gracefully handles missing RNG 3541817466cbSJens Wiklander * crypt_and_hash app checks MAC before final decryption 3542817466cbSJens Wiklander * Fixed x509_crt_parse_path() bug on Windows platforms 3543817466cbSJens Wiklander * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by 3544817466cbSJens Wiklander TrustInSoft) 3545817466cbSJens Wiklander * Fixed potential overflow in certificate size verification in 3546817466cbSJens Wiklander ssl_write_certificate() (found by TrustInSoft) 3547817466cbSJens Wiklander * Fix ASM format in bn_mul.h 3548817466cbSJens Wiklander * Potential memory leak in bignum_selftest() 3549817466cbSJens Wiklander * Replaced expired test certificate 3550817466cbSJens Wiklander * ssl_mail_client now terminates lines with CRLF, instead of LF 3551817466cbSJens Wiklander * Fix bug in RSA PKCS#1 v1.5 "reversed" operations 3552817466cbSJens Wiklander * Fixed testing with out-of-source builds using cmake 3553817466cbSJens Wiklander * Fixed version-major intolerance in server 3554817466cbSJens Wiklander * Fixed CMake symlinking on out-of-source builds 3555817466cbSJens Wiklander * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by 3556817466cbSJens Wiklander Alex Wilson.) 3557817466cbSJens Wiklander * ssl_init() was leaving a dirty pointer in ssl_context if malloc of 3558817466cbSJens Wiklander out_ctr failed 3559817466cbSJens Wiklander * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc 3560817466cbSJens Wiklander of one of them failed 3561817466cbSJens Wiklander * x509_get_current_time() uses localtime_r() to prevent thread issues 3562817466cbSJens Wiklander * Some example server programs were not sending the close_notify alert. 3563817466cbSJens Wiklander * Potential memory leak in mpi_exp_mod() when error occurs during 3564817466cbSJens Wiklander calculation of RR. 3565817466cbSJens Wiklander * Improve interoperability by not writing extension length in ClientHello 3566817466cbSJens Wiklander when no extensions are present (found by Matthew Page) 3567817466cbSJens Wiklander * rsa_check_pubkey() now allows an E up to N 3568817466cbSJens Wiklander * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings 3569817466cbSJens Wiklander * mpi_fill_random() was creating numbers larger than requested on 3570817466cbSJens Wiklander big-endian platform when size was not an integer number of limbs 3571817466cbSJens Wiklander * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer) 3572817466cbSJens Wiklander * Stricter check on SSL ClientHello internal sizes compared to actual packet 3573817466cbSJens Wiklander size (found by TrustInSoft) 3574817466cbSJens Wiklander * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). 3575817466cbSJens Wiklander * Use \n\t rather than semicolons for bn_mul asm, since some assemblers 3576817466cbSJens Wiklander interpret semicolons as comment delimiters (found by Barry K. Nathan). 3577817466cbSJens Wiklander * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). 3578817466cbSJens Wiklander * Fix base64_decode() to return and check length correctly (in case of 3579817466cbSJens Wiklander tight buffers) 3580817466cbSJens Wiklander 3581817466cbSJens Wiklander= Version 1.2.10 released 2013-10-07 3582817466cbSJens WiklanderChanges 3583817466cbSJens Wiklander * Changed RSA blinding to a slower but thread-safe version 3584817466cbSJens Wiklander 3585817466cbSJens WiklanderBugfix 3586817466cbSJens Wiklander * Fixed memory leak in RSA as a result of introduction of blinding 3587817466cbSJens Wiklander * Fixed ssl_pkcs11_decrypt() prototype 3588817466cbSJens Wiklander * Fixed MSVC project files 3589817466cbSJens Wiklander 3590817466cbSJens Wiklander= Version 1.2.9 released 2013-10-01 3591817466cbSJens WiklanderChanges 3592817466cbSJens Wiklander * x509_verify() now case insensitive for cn (RFC 6125 6.4) 3593817466cbSJens Wiklander 3594817466cbSJens WiklanderBugfix 3595817466cbSJens Wiklander * Fixed potential memory leak when failing to resume a session 3596817466cbSJens Wiklander * Fixed potential file descriptor leaks (found by Remi Gacogne) 3597817466cbSJens Wiklander * Minor fixes 3598817466cbSJens Wiklander 3599817466cbSJens WiklanderSecurity 3600817466cbSJens Wiklander * Fixed potential heap buffer overflow on large hostname setting 3601817466cbSJens Wiklander * Fixed potential negative value misinterpretation in load_file() 3602817466cbSJens Wiklander * RSA blinding on CRT operations to counter timing attacks 3603817466cbSJens Wiklander (found by Cyril Arnaud and Pierre-Alain Fouque) 3604817466cbSJens Wiklander 3605817466cbSJens Wiklander= Version 1.2.8 released 2013-06-19 3606817466cbSJens WiklanderFeatures 3607817466cbSJens Wiklander * Parsing of PKCS#8 encrypted private key files 3608817466cbSJens Wiklander * PKCS#12 PBE and derivation functions 3609817466cbSJens Wiklander * Centralized module option values in config.h to allow user-defined 3610817466cbSJens Wiklander settings without editing header files by using POLARSSL_CONFIG_OPTIONS 3611817466cbSJens Wiklander 3612817466cbSJens WiklanderChanges 3613817466cbSJens Wiklander * HAVEGE random generator disabled by default 3614817466cbSJens Wiklander * Internally split up x509parse_key() into a (PEM) handler function 3615817466cbSJens Wiklander and specific DER parser functions for the PKCS#1 and unencrypted 3616817466cbSJens Wiklander PKCS#8 private key formats 3617817466cbSJens Wiklander * Added mechanism to provide alternative implementations for all 3618817466cbSJens Wiklander symmetric cipher and hash algorithms (e.g. POLARSSL_AES_ALT in 3619817466cbSJens Wiklander config.h) 3620817466cbSJens Wiklander * PKCS#5 module added. Moved PBKDF2 functionality inside and deprecated 3621817466cbSJens Wiklander old PBKDF2 module 3622817466cbSJens Wiklander 3623817466cbSJens WiklanderBugfix 3624817466cbSJens Wiklander * Secure renegotiation extension should only be sent in case client 3625817466cbSJens Wiklander supports secure renegotiation 3626817466cbSJens Wiklander * Fixed offset for cert_type list in ssl_parse_certificate_request() 3627817466cbSJens Wiklander * Fixed const correctness issues that have no impact on the ABI 3628817466cbSJens Wiklander * x509parse_crt() now better handles PEM error situations 3629817466cbSJens Wiklander * ssl_parse_certificate() now calls x509parse_crt_der() directly 3630817466cbSJens Wiklander instead of the x509parse_crt() wrapper that can also parse PEM 3631817466cbSJens Wiklander certificates 3632817466cbSJens Wiklander * x509parse_crtpath() is now reentrant and uses more portable stat() 3633817466cbSJens Wiklander * Fixed bignum.c and bn_mul.h to support Thumb2 and LLVM compiler 3634817466cbSJens Wiklander * Fixed values for 2-key Triple DES in cipher layer 3635817466cbSJens Wiklander * ssl_write_certificate_request() can handle empty ca_chain 3636817466cbSJens Wiklander 3637817466cbSJens WiklanderSecurity 3638817466cbSJens Wiklander * A possible DoS during the SSL Handshake, due to faulty parsing of 3639817466cbSJens Wiklander PEM-encoded certificates has been fixed (found by Jack Lloyd) 3640817466cbSJens Wiklander 3641817466cbSJens Wiklander= Version 1.2.7 released 2013-04-13 3642817466cbSJens WiklanderFeatures 3643817466cbSJens Wiklander * Ability to specify allowed ciphersuites based on the protocol version. 3644817466cbSJens Wiklander 3645817466cbSJens WiklanderChanges 3646817466cbSJens Wiklander * Default Blowfish keysize is now 128-bits 3647817466cbSJens Wiklander * Test suites made smaller to accommodate Raspberry Pi 3648817466cbSJens Wiklander 3649817466cbSJens WiklanderBugfix 3650817466cbSJens Wiklander * Fix for MPI assembly for ARM 3651817466cbSJens Wiklander * GCM adapted to support sizes > 2^29 3652817466cbSJens Wiklander 3653817466cbSJens Wiklander= Version 1.2.6 released 2013-03-11 3654817466cbSJens WiklanderBugfix 3655817466cbSJens Wiklander * Fixed memory leak in ssl_free() and ssl_reset() for active session 3656817466cbSJens Wiklander * Corrected GCM counter incrementation to use only 32-bits instead of 3657817466cbSJens Wiklander 128-bits (found by Yawning Angel) 3658817466cbSJens Wiklander * Fixes for 64-bit compilation with MS Visual Studio 3659817466cbSJens Wiklander * Fixed net_bind() for specified IP addresses on little endian systems 3660817466cbSJens Wiklander * Fixed assembly code for ARM (Thumb and regular) for some compilers 3661817466cbSJens Wiklander 3662817466cbSJens WiklanderChanges 3663817466cbSJens Wiklander * Internally split up rsa_pkcs1_encrypt(), rsa_pkcs1_decrypt(), 3664817466cbSJens Wiklander rsa_pkcs1_sign() and rsa_pkcs1_verify() to separate PKCS#1 v1.5 and 3665817466cbSJens Wiklander PKCS#1 v2.1 functions 3666817466cbSJens Wiklander * Added support for custom labels when using rsa_rsaes_oaep_encrypt() 3667817466cbSJens Wiklander or rsa_rsaes_oaep_decrypt() 3668817466cbSJens Wiklander * Re-added handling for SSLv2 Client Hello when the define 3669817466cbSJens Wiklander POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO is set 3670817466cbSJens Wiklander * The SSL session cache module (ssl_cache) now also retains peer_cert 3671817466cbSJens Wiklander information (not the entire chain) 3672817466cbSJens Wiklander 3673817466cbSJens WiklanderSecurity 3674817466cbSJens Wiklander * Removed further timing differences during SSL message decryption in 3675817466cbSJens Wiklander ssl_decrypt_buf() 3676817466cbSJens Wiklander * Removed timing differences due to bad padding from 3677817466cbSJens Wiklander rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5 3678817466cbSJens Wiklander operations 3679817466cbSJens Wiklander 3680817466cbSJens Wiklander= Version 1.2.5 released 2013-02-02 3681817466cbSJens WiklanderChanges 3682817466cbSJens Wiklander * Allow enabling of dummy error_strerror() to support some use-cases 3683817466cbSJens Wiklander * Debug messages about padding errors during SSL message decryption are 3684817466cbSJens Wiklander disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL 3685817466cbSJens Wiklander * Sending of security-relevant alert messages that do not break 3686817466cbSJens Wiklander interoperability can be switched on/off with the flag 3687817466cbSJens Wiklander POLARSSL_SSL_ALL_ALERT_MESSAGES 3688817466cbSJens Wiklander 3689817466cbSJens WiklanderSecurity 3690817466cbSJens Wiklander * Removed timing differences during SSL message decryption in 3691817466cbSJens Wiklander ssl_decrypt_buf() due to badly formatted padding 3692817466cbSJens Wiklander 3693817466cbSJens Wiklander= Version 1.2.4 released 2013-01-25 3694817466cbSJens WiklanderChanges 3695817466cbSJens Wiklander * More advanced SSL ciphersuite representation and moved to more dynamic 3696817466cbSJens Wiklander SSL core 3697817466cbSJens Wiklander * Added ssl_handshake_step() to allow single stepping the handshake process 3698817466cbSJens Wiklander 3699817466cbSJens WiklanderBugfix 3700817466cbSJens Wiklander * Memory leak when using RSA_PKCS_V21 operations fixed 3701817466cbSJens Wiklander * Handle future version properly in ssl_write_certificate_request() 3702817466cbSJens Wiklander * Correctly handle CertificateRequest message in client for <= TLS 1.1 3703817466cbSJens Wiklander without DN list 3704817466cbSJens Wiklander 3705817466cbSJens Wiklander= Version 1.2.3 released 2012-11-26 3706817466cbSJens WiklanderBugfix 3707817466cbSJens Wiklander * Server not always sending correct CertificateRequest message 3708817466cbSJens Wiklander 3709817466cbSJens Wiklander= Version 1.2.2 released 2012-11-24 3710817466cbSJens WiklanderChanges 3711817466cbSJens Wiklander * Added p_hw_data to ssl_context for context specific hardware acceleration 3712817466cbSJens Wiklander data 3713817466cbSJens Wiklander * During verify trust-CA is only checked for expiration and CRL presence 3714817466cbSJens Wiklander 3715817466cbSJens WiklanderBugfixes 3716817466cbSJens Wiklander * Fixed client authentication compatibility 3717817466cbSJens Wiklander * Fixed dependency on POLARSSL_SHA4_C in SSL modules 3718817466cbSJens Wiklander 3719817466cbSJens Wiklander= Version 1.2.1 released 2012-11-20 3720817466cbSJens WiklanderChanges 3721817466cbSJens Wiklander * Depth that the certificate verify callback receives is now numbered 3722817466cbSJens Wiklander bottom-up (Peer cert depth is 0) 3723817466cbSJens Wiklander 3724817466cbSJens WiklanderBugfixes 3725817466cbSJens Wiklander * Fixes for MSVC6 3726817466cbSJens Wiklander * Moved mpi_inv_mod() outside POLARSSL_GENPRIME 3727817466cbSJens Wiklander * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel 3728817466cbSJens Wiklander Pégourié-Gonnard) 3729817466cbSJens Wiklander * Fixed possible segfault in mpi_shift_r() (found by Manuel 3730817466cbSJens Wiklander Pégourié-Gonnard) 3731817466cbSJens Wiklander * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1 3732817466cbSJens Wiklander 3733817466cbSJens Wiklander= Version 1.2.0 released 2012-10-31 3734817466cbSJens WiklanderFeatures 3735817466cbSJens Wiklander * Added support for NULL cipher (POLARSSL_CIPHER_NULL_CIPHER) and weak 3736817466cbSJens Wiklander ciphersuites (POLARSSL_ENABLE_WEAK_CIPHERSUITES). They are disabled by 3737817466cbSJens Wiklander default! 3738817466cbSJens Wiklander * Added support for wildcard certificates 3739817466cbSJens Wiklander * Added support for multi-domain certificates through the X509 Subject 3740817466cbSJens Wiklander Alternative Name extension 3741817466cbSJens Wiklander * Added preliminary ASN.1 buffer writing support 3742817466cbSJens Wiklander * Added preliminary X509 Certificate Request writing support 3743817466cbSJens Wiklander * Added key_app_writer example application 3744817466cbSJens Wiklander * Added cert_req example application 3745817466cbSJens Wiklander * Added base Galois Counter Mode (GCM) for AES 3746817466cbSJens Wiklander * Added TLS 1.2 support (RFC 5246) 3747817466cbSJens Wiklander * Added GCM suites to TLS 1.2 (RFC 5288) 3748817466cbSJens Wiklander * Added commandline error code convertor (util/strerror) 3749817466cbSJens Wiklander * Added support for Hardware Acceleration hooking in SSL/TLS 3750817466cbSJens Wiklander * Added OpenSSL / PolarSSL compatibility script (tests/compat.sh) and 3751817466cbSJens Wiklander example application (programs/ssl/o_p_test) (requires OpenSSL) 3752817466cbSJens Wiklander * Added X509 CA Path support 3753817466cbSJens Wiklander * Added Thumb assembly optimizations 3754817466cbSJens Wiklander * Added DEFLATE compression support as per RFC3749 (requires zlib) 3755817466cbSJens Wiklander * Added blowfish algorithm (Generic and cipher layer) 3756817466cbSJens Wiklander * Added PKCS#5 PBKDF2 key derivation function 3757817466cbSJens Wiklander * Added Secure Renegotiation (RFC 5746) 3758817466cbSJens Wiklander * Added predefined DHM groups from RFC 5114 3759817466cbSJens Wiklander * Added simple SSL session cache implementation 3760817466cbSJens Wiklander * Added ServerName extension parsing (SNI) at server side 3761817466cbSJens Wiklander * Added option to add minimum accepted SSL/TLS protocol version 3762817466cbSJens Wiklander 3763817466cbSJens WiklanderChanges 3764817466cbSJens Wiklander * Removed redundant POLARSSL_DEBUG_MSG define 3765817466cbSJens Wiklander * AES code only check for Padlock once 3766817466cbSJens Wiklander * Fixed const-correctness mpi_get_bit() 3767817466cbSJens Wiklander * Documentation for mpi_lsb() and mpi_msb() 3768817466cbSJens Wiklander * Moved out_msg to out_hdr + 32 to support hardware acceleration 3769817466cbSJens Wiklander * Changed certificate verify behaviour to comply with RFC 6125 section 6.3 3770817466cbSJens Wiklander to not match CN if subjectAltName extension is present (Closes ticket #56) 3771817466cbSJens Wiklander * Cipher layer cipher_mode_t POLARSSL_MODE_CFB128 is renamed to 3772817466cbSJens Wiklander POLARSSL_MODE_CFB, to also handle different block size CFB modes. 3773817466cbSJens Wiklander * Removed handling for SSLv2 Client Hello (as per RFC 5246 recommendation) 3774817466cbSJens Wiklander * Revamped session resumption handling 3775817466cbSJens Wiklander * Generalized external private key implementation handling (like PKCS#11) 3776817466cbSJens Wiklander in SSL/TLS 3777817466cbSJens Wiklander * Revamped x509_verify() and the SSL f_vrfy callback implementations 3778817466cbSJens Wiklander * Moved from unsigned long to fixed width uint32_t types throughout code 3779817466cbSJens Wiklander * Renamed ciphersuites naming scheme to IANA reserved names 3780817466cbSJens Wiklander 3781817466cbSJens WiklanderBugfix 3782817466cbSJens Wiklander * Fixed handling error in mpi_cmp_mpi() on longer B values (found by 3783817466cbSJens Wiklander Hui Dong) 3784817466cbSJens Wiklander * Fixed potential heap corruption in x509_name allocation 3785817466cbSJens Wiklander * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54) 3786817466cbSJens Wiklander * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket 3787817466cbSJens Wiklander #52) 3788817466cbSJens Wiklander * Handle encryption with private key and decryption with public key as per 3789817466cbSJens Wiklander RFC 2313 3790817466cbSJens Wiklander * Handle empty certificate subject names 3791817466cbSJens Wiklander * Prevent reading over buffer boundaries on X509 certificate parsing 3792817466cbSJens Wiklander * mpi_add_abs() now correctly handles adding short numbers to long numbers 3793817466cbSJens Wiklander with carry rollover (found by Ruslan Yushchenko) 3794817466cbSJens Wiklander * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob 3795817466cbSJens Wiklander * Fixed MPI assembly for SPARC64 platform 3796817466cbSJens Wiklander 3797817466cbSJens WiklanderSecurity 3798817466cbSJens Wiklander * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi 3799817466cbSJens Wiklander Vanderbeken) 3800817466cbSJens Wiklander 3801817466cbSJens Wiklander= Version 1.1.8 released on 2013-10-01 3802817466cbSJens WiklanderBugfix 3803817466cbSJens Wiklander * Fixed potential memory leak when failing to resume a session 3804817466cbSJens Wiklander * Fixed potential file descriptor leaks 3805817466cbSJens Wiklander 3806817466cbSJens WiklanderSecurity 3807817466cbSJens Wiklander * Potential buffer-overflow for ssl_read_record() (independently found by 3808817466cbSJens Wiklander both TrustInSoft and Paul Brodeur of Leviathan Security Group) 3809817466cbSJens Wiklander * Potential negative value misinterpretation in load_file() 3810817466cbSJens Wiklander * Potential heap buffer overflow on large hostname setting 3811817466cbSJens Wiklander 3812817466cbSJens Wiklander= Version 1.1.7 released on 2013-06-19 3813817466cbSJens WiklanderChanges 3814817466cbSJens Wiklander * HAVEGE random generator disabled by default 3815817466cbSJens Wiklander 3816817466cbSJens WiklanderBugfix 3817817466cbSJens Wiklander * x509parse_crt() now better handles PEM error situations 3818817466cbSJens Wiklander * ssl_parse_certificate() now calls x509parse_crt_der() directly 3819817466cbSJens Wiklander instead of the x509parse_crt() wrapper that can also parse PEM 3820817466cbSJens Wiklander certificates 3821817466cbSJens Wiklander * Fixed values for 2-key Triple DES in cipher layer 3822817466cbSJens Wiklander * ssl_write_certificate_request() can handle empty ca_chain 3823817466cbSJens Wiklander 3824817466cbSJens WiklanderSecurity 3825817466cbSJens Wiklander * A possible DoS during the SSL Handshake, due to faulty parsing of 3826817466cbSJens Wiklander PEM-encoded certificates has been fixed (found by Jack Lloyd) 3827817466cbSJens Wiklander 3828817466cbSJens Wiklander= Version 1.1.6 released on 2013-03-11 3829817466cbSJens WiklanderBugfix 3830817466cbSJens Wiklander * Fixed net_bind() for specified IP addresses on little endian systems 3831817466cbSJens Wiklander 3832817466cbSJens WiklanderChanges 3833817466cbSJens Wiklander * Allow enabling of dummy error_strerror() to support some use-cases 3834817466cbSJens Wiklander * Debug messages about padding errors during SSL message decryption are 3835817466cbSJens Wiklander disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL 3836817466cbSJens Wiklander 3837817466cbSJens WiklanderSecurity 3838817466cbSJens Wiklander * Removed timing differences during SSL message decryption in 3839817466cbSJens Wiklander ssl_decrypt_buf() 3840817466cbSJens Wiklander * Removed timing differences due to bad padding from 3841817466cbSJens Wiklander rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5 3842817466cbSJens Wiklander operations 3843817466cbSJens Wiklander 3844817466cbSJens Wiklander= Version 1.1.5 released on 2013-01-16 3845817466cbSJens WiklanderBugfix 3846817466cbSJens Wiklander * Fixed MPI assembly for SPARC64 platform 3847817466cbSJens Wiklander * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob 3848817466cbSJens Wiklander * mpi_add_abs() now correctly handles adding short numbers to long numbers 3849817466cbSJens Wiklander with carry rollover 3850817466cbSJens Wiklander * Moved mpi_inv_mod() outside POLARSSL_GENPRIME 3851817466cbSJens Wiklander * Prevent reading over buffer boundaries on X509 certificate parsing 3852817466cbSJens Wiklander * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket 3853817466cbSJens Wiklander #52) 3854817466cbSJens Wiklander * Fixed possible segfault in mpi_shift_r() (found by Manuel 3855817466cbSJens Wiklander Pégourié-Gonnard) 3856817466cbSJens Wiklander * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel 3857817466cbSJens Wiklander Pégourié-Gonnard) 3858817466cbSJens Wiklander * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1 3859817466cbSJens Wiklander * Memory leak when using RSA_PKCS_V21 operations fixed 3860817466cbSJens Wiklander * Handle encryption with private key and decryption with public key as per 3861817466cbSJens Wiklander RFC 2313 3862817466cbSJens Wiklander * Fixes for MSVC6 3863817466cbSJens Wiklander 3864817466cbSJens WiklanderSecurity 3865817466cbSJens Wiklander * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi 3866817466cbSJens Wiklander Vanderbeken) 3867817466cbSJens Wiklander 3868817466cbSJens Wiklander= Version 1.1.4 released on 2012-05-31 3869817466cbSJens WiklanderBugfix 3870817466cbSJens Wiklander * Correctly handle empty SSL/TLS packets (Found by James Yonan) 3871817466cbSJens Wiklander * Fixed potential heap corruption in x509_name allocation 3872817466cbSJens Wiklander * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54) 3873817466cbSJens Wiklander 3874817466cbSJens Wiklander= Version 1.1.3 released on 2012-04-29 3875817466cbSJens WiklanderBugfix 3876817466cbSJens Wiklander * Fixed random MPI generation to not generate more size than requested. 3877817466cbSJens Wiklander 3878817466cbSJens Wiklander= Version 1.1.2 released on 2012-04-26 3879817466cbSJens WiklanderBugfix 3880817466cbSJens Wiklander * Fixed handling error in mpi_cmp_mpi() on longer B values (found by 3881817466cbSJens Wiklander Hui Dong) 3882817466cbSJens Wiklander 3883817466cbSJens WiklanderSecurity 3884817466cbSJens Wiklander * Fixed potential memory corruption on miscrafted client messages (found by 3885817466cbSJens Wiklander Frama-C team at CEA LIST) 3886817466cbSJens Wiklander * Fixed generation of DHM parameters to correct length (found by Ruslan 3887817466cbSJens Wiklander Yushchenko) 3888817466cbSJens Wiklander 3889817466cbSJens Wiklander= Version 1.1.1 released on 2012-01-23 3890817466cbSJens WiklanderBugfix 3891817466cbSJens Wiklander * Check for failed malloc() in ssl_set_hostname() and x509_get_entries() 3892817466cbSJens Wiklander (Closes ticket #47, found by Hugo Leisink) 3893817466cbSJens Wiklander * Fixed issues with Intel compiler on 64-bit systems (Closes ticket #50) 3894817466cbSJens Wiklander * Fixed multiple compiler warnings for VS6 and armcc 3895817466cbSJens Wiklander * Fixed bug in CTR_CRBG selftest 3896817466cbSJens Wiklander 3897817466cbSJens Wiklander= Version 1.1.0 released on 2011-12-22 3898817466cbSJens WiklanderFeatures 3899817466cbSJens Wiklander * Added ssl_session_reset() to allow better multi-connection pools of 3900817466cbSJens Wiklander SSL contexts without needing to set all non-connection-specific 3901817466cbSJens Wiklander data and pointers again. Adapted ssl_server to use this functionality. 3902817466cbSJens Wiklander * Added ssl_set_max_version() to allow clients to offer a lower maximum 3903817466cbSJens Wiklander supported version to a server to help buggy server implementations. 3904817466cbSJens Wiklander (Closes ticket #36) 3905817466cbSJens Wiklander * Added cipher_get_cipher_mode() and cipher_get_cipher_operation() 3906817466cbSJens Wiklander introspection functions (Closes ticket #40) 3907817466cbSJens Wiklander * Added CTR_DRBG based on AES-256-CTR (NIST SP 800-90) random generator 3908817466cbSJens Wiklander * Added a generic entropy accumulator that provides support for adding 3909817466cbSJens Wiklander custom entropy sources and added some generic and platform dependent 3910817466cbSJens Wiklander entropy sources 3911817466cbSJens Wiklander 3912817466cbSJens WiklanderChanges 3913817466cbSJens Wiklander * Documentation for AES and Camellia in modes CTR and CFB128 clarified. 3914817466cbSJens Wiklander * Fixed rsa_encrypt and rsa_decrypt examples to use public key for 3915817466cbSJens Wiklander encryption and private key for decryption. (Closes ticket #34) 3916817466cbSJens Wiklander * Inceased maximum size of ASN1 length reads to 32-bits. 3917817466cbSJens Wiklander * Added an EXPLICIT tag number parameter to x509_get_ext() 3918817466cbSJens Wiklander * Added a separate CRL entry extension parsing function 3919817466cbSJens Wiklander * Separated the ASN.1 parsing code from the X.509 specific parsing code. 3920817466cbSJens Wiklander So now there is a module that is controlled with POLARSSL_ASN1_PARSE_C. 3921817466cbSJens Wiklander * Changed the defined key-length of DES ciphers in cipher.h to include the 3922817466cbSJens Wiklander parity bits, to prevent mistakes in copying data. (Closes ticket #33) 3923817466cbSJens Wiklander * Loads of minimal changes to better support WINCE as a build target 3924817466cbSJens Wiklander (Credits go to Marco Lizza) 3925817466cbSJens Wiklander * Added POLARSSL_MPI_WINDOW_SIZE definition to allow easier time to memory 3926817466cbSJens Wiklander trade-off 3927817466cbSJens Wiklander * Introduced POLARSSL_MPI_MAX_SIZE and POLARSSL_MPI_MAX_BITS for MPI size 3928817466cbSJens Wiklander management (Closes ticket #44) 3929817466cbSJens Wiklander * Changed the used random function pointer to more flexible format. Renamed 3930817466cbSJens Wiklander havege_rand() to havege_random() to prevent mistakes. Lots of changes as 3931817466cbSJens Wiklander a consequence in library code and programs 3932817466cbSJens Wiklander * Moved all examples programs to use the new entropy and CTR_DRBG 3933817466cbSJens Wiklander * Added permissive certificate parsing to x509parse_crt() and 3934817466cbSJens Wiklander x509parse_crtfile(). With permissive parsing the parsing does not stop on 3935817466cbSJens Wiklander encountering a parse-error. Beware that the meaning of return values has 3936817466cbSJens Wiklander changed! 3937817466cbSJens Wiklander * All error codes are now negative. Even on mermory failures and IO errors. 3938817466cbSJens Wiklander 3939817466cbSJens WiklanderBugfix 3940817466cbSJens Wiklander * Fixed faulty HMAC-MD2 implementation. Found by dibac. (Closes 3941817466cbSJens Wiklander ticket #37) 3942817466cbSJens Wiklander * Fixed a bug where the CRL parser expected an EXPLICIT ASN.1 tag 3943817466cbSJens Wiklander before version numbers 3944817466cbSJens Wiklander * Allowed X509 key usage parsing to accept 4 byte values instead of the 3945817466cbSJens Wiklander standard 1 byte version sometimes used by Microsoft. (Closes ticket #38) 3946817466cbSJens Wiklander * Fixed incorrect behaviour in case of RSASSA-PSS with a salt length 3947817466cbSJens Wiklander smaller than the hash length. (Closes ticket #41) 3948817466cbSJens Wiklander * If certificate serial is longer than 32 octets, serial number is now 3949817466cbSJens Wiklander appended with '....' after first 28 octets 3950817466cbSJens Wiklander * Improved build support for s390x and sparc64 in bignum.h 3951817466cbSJens Wiklander * Fixed MS Visual C++ name clash with int64 in sha4.h 3952817466cbSJens Wiklander * Corrected removal of leading "00:" in printing serial numbers in 3953817466cbSJens Wiklander certificates and CRLs 3954817466cbSJens Wiklander 3955817466cbSJens Wiklander= Version 1.0.0 released on 2011-07-27 3956817466cbSJens WiklanderFeatures 3957817466cbSJens Wiklander * Expanded cipher layer with support for CFB128 and CTR mode 3958817466cbSJens Wiklander * Added rsa_encrypt and rsa_decrypt simple example programs. 3959817466cbSJens Wiklander 3960817466cbSJens WiklanderChanges 3961817466cbSJens Wiklander * The generic cipher and message digest layer now have normal error 3962817466cbSJens Wiklander codes instead of integers 3963817466cbSJens Wiklander 3964817466cbSJens WiklanderBugfix 3965817466cbSJens Wiklander * Undid faulty bug fix in ssl_write() when flushing old data (Ticket 3966817466cbSJens Wiklander #18) 3967817466cbSJens Wiklander 3968817466cbSJens Wiklander= Version 0.99-pre5 released on 2011-05-26 3969817466cbSJens WiklanderFeatures 3970817466cbSJens Wiklander * Added additional Cipher Block Modes to symmetric ciphers 3971817466cbSJens Wiklander (AES CTR, Camellia CTR, XTEA CBC) including the option to 3972817466cbSJens Wiklander enable and disable individual modes when needed 3973817466cbSJens Wiklander * Functions requiring File System functions can now be disabled 3974817466cbSJens Wiklander by undefining POLARSSL_FS_IO 3975817466cbSJens Wiklander * A error_strerror function() has been added to translate between 3976817466cbSJens Wiklander error codes and their description. 3977817466cbSJens Wiklander * Added mpi_get_bit() and mpi_set_bit() individual bit setter/getter 3978817466cbSJens Wiklander functions. 3979817466cbSJens Wiklander * Added ssl_mail_client and ssl_fork_server as example programs. 3980817466cbSJens Wiklander 3981817466cbSJens WiklanderChanges 3982817466cbSJens Wiklander * Major argument / variable rewrite. Introduced use of size_t 3983817466cbSJens Wiklander instead of int for buffer lengths and loop variables for 3984817466cbSJens Wiklander better unsigned / signed use. Renamed internal bigint types 3985817466cbSJens Wiklander t_int and t_dbl to t_uint and t_udbl in the process 3986817466cbSJens Wiklander * mpi_init() and mpi_free() now only accept a single MPI 3987817466cbSJens Wiklander argument and do not accept variable argument lists anymore. 3988817466cbSJens Wiklander * The error codes have been remapped and combining error codes 3989817466cbSJens Wiklander is now done with a PLUS instead of an OR as error codes 3990817466cbSJens Wiklander used are negative. 3991817466cbSJens Wiklander * Changed behaviour of net_read(), ssl_fetch_input() and ssl_recv(). 3992817466cbSJens Wiklander net_recv() now returns 0 on EOF instead of 3993817466cbSJens Wiklander POLARSSL_ERR_NET_CONN_RESET. ssl_fetch_input() returns 3994817466cbSJens Wiklander POLARSSL_ERR_SSL_CONN_EOF on an EOF from its f_recv() function. 3995817466cbSJens Wiklander ssl_read() returns 0 if a POLARSSL_ERR_SSL_CONN_EOF is received 3996817466cbSJens Wiklander after the handshake. 3997817466cbSJens Wiklander * Network functions now return POLARSSL_ERR_NET_WANT_READ or 3998817466cbSJens Wiklander POLARSSL_ERR_NET_WANT_WRITE instead of the ambiguous 3999817466cbSJens Wiklander POLARSSL_ERR_NET_TRY_AGAIN 4000817466cbSJens Wiklander 4001817466cbSJens Wiklander= Version 0.99-pre4 released on 2011-04-01 4002817466cbSJens WiklanderFeatures 4003817466cbSJens Wiklander * Added support for PKCS#1 v2.1 encoding and thus support 4004817466cbSJens Wiklander for the RSAES-OAEP and RSASSA-PSS operations. 4005817466cbSJens Wiklander * Reading of Public Key files incorporated into default x509 4006817466cbSJens Wiklander functionality as well. 4007817466cbSJens Wiklander * Added mpi_fill_random() for centralized filling of big numbers 4008817466cbSJens Wiklander with random data (Fixed ticket #10) 4009817466cbSJens Wiklander 4010817466cbSJens WiklanderChanges 4011817466cbSJens Wiklander * Debug print of MPI now removes leading zero octets and 4012817466cbSJens Wiklander displays actual bit size of the value. 4013817466cbSJens Wiklander * x509parse_key() (and as a consequence x509parse_keyfile()) 4014817466cbSJens Wiklander does not zeroize memory in advance anymore. Use rsa_init() 4015817466cbSJens Wiklander before parsing a key or keyfile! 4016817466cbSJens Wiklander 4017817466cbSJens WiklanderBugfix 4018817466cbSJens Wiklander * Debug output of MPI's now the same independent of underlying 4019817466cbSJens Wiklander platform (32-bit / 64-bit) (Fixes ticket #19, found by Mads 4020817466cbSJens Wiklander Kiilerich and Mihai Militaru) 4021817466cbSJens Wiklander * Fixed bug in ssl_write() when flushing old data (Fixed ticket 4022817466cbSJens Wiklander #18, found by Nikolay Epifanov) 4023817466cbSJens Wiklander * Fixed proper handling of RSASSA-PSS verification with variable 4024817466cbSJens Wiklander length salt lengths 4025817466cbSJens Wiklander 4026817466cbSJens Wiklander= Version 0.99-pre3 released on 2011-02-28 4027817466cbSJens WiklanderThis release replaces version 0.99-pre2 which had possible copyright issues. 4028817466cbSJens WiklanderFeatures 4029817466cbSJens Wiklander * Parsing PEM private keys encrypted with DES and AES 4030817466cbSJens Wiklander are now supported as well (Fixes ticket #5) 4031817466cbSJens Wiklander * Added crl_app program to allow easy reading and 4032817466cbSJens Wiklander printing of X509 CRLs from file 4033817466cbSJens Wiklander 4034817466cbSJens WiklanderChanges 4035817466cbSJens Wiklander * Parsing of PEM files moved to separate module (Fixes 4036817466cbSJens Wiklander ticket #13). Also possible to remove PEM support for 4037817466cbSJens Wiklander systems only using DER encoding 4038817466cbSJens Wiklander 4039817466cbSJens WiklanderBugfixes 4040817466cbSJens Wiklander * Corrected parsing of UTCTime dates before 1990 and 4041817466cbSJens Wiklander after 1950 4042817466cbSJens Wiklander * Support more exotic OID's when parsing certificates 4043817466cbSJens Wiklander (found by Mads Kiilerich) 4044817466cbSJens Wiklander * Support more exotic name representations when parsing 4045817466cbSJens Wiklander certificates (found by Mads Kiilerich) 4046817466cbSJens Wiklander * Replaced the expired test certificates 4047817466cbSJens Wiklander * Do not bail out if no client certificate specified. Try 4048817466cbSJens Wiklander to negotiate anonymous connection (Fixes ticket #12, 4049817466cbSJens Wiklander found by Boris Krasnovskiy) 4050817466cbSJens Wiklander 4051817466cbSJens WiklanderSecurity fixes 4052817466cbSJens Wiklander * Fixed a possible Man-in-the-Middle attack on the 4053817466cbSJens Wiklander Diffie Hellman key exchange (thanks to Larry Highsmith, 4054817466cbSJens Wiklander Subreption LLC) 4055817466cbSJens Wiklander 4056817466cbSJens Wiklander= Version 0.99-pre1 released on 2011-01-30 4057817466cbSJens WiklanderFeatures 4058817466cbSJens WiklanderNote: Most of these features have been donated by Fox-IT 4059817466cbSJens Wiklander * Added Doxygen source code documentation parts 4060817466cbSJens Wiklander * Added reading of DHM context from memory and file 4061817466cbSJens Wiklander * Improved X509 certificate parsing to include extended 4062817466cbSJens Wiklander certificate fields, including Key Usage 4063817466cbSJens Wiklander * Improved certificate verification and verification 4064817466cbSJens Wiklander against the available CRLs 4065817466cbSJens Wiklander * Detection for DES weak keys and parity bits added 4066817466cbSJens Wiklander * Improvements to support integration in other 4067817466cbSJens Wiklander applications: 4068817466cbSJens Wiklander + Added generic message digest and cipher wrapper 4069817466cbSJens Wiklander + Improved information about current capabilities, 4070817466cbSJens Wiklander status, objects and configuration 4071817466cbSJens Wiklander + Added verification callback on certificate chain 4072817466cbSJens Wiklander verification to allow external blacklisting 4073817466cbSJens Wiklander + Additional example programs to show usage 4074817466cbSJens Wiklander * Added support for PKCS#11 through the use of the 4075817466cbSJens Wiklander libpkcs11-helper library 4076817466cbSJens Wiklander 4077817466cbSJens WiklanderChanges 4078817466cbSJens Wiklander * x509parse_time_expired() checks time in addition to 4079817466cbSJens Wiklander the existing date check 4080817466cbSJens Wiklander * The ciphers member of ssl_context and the cipher member 4081817466cbSJens Wiklander of ssl_session have been renamed to ciphersuites and 4082817466cbSJens Wiklander ciphersuite respectively. This clarifies the difference 4083817466cbSJens Wiklander with the generic cipher layer and is better naming 4084817466cbSJens Wiklander altogether 4085817466cbSJens Wiklander 4086817466cbSJens Wiklander= Version 0.14.0 released on 2010-08-16 4087817466cbSJens WiklanderFeatures 4088817466cbSJens Wiklander * Added support for SSL_EDH_RSA_AES_128_SHA and 4089817466cbSJens Wiklander SSL_EDH_RSA_CAMELLIA_128_SHA ciphersuites 4090817466cbSJens Wiklander * Added compile-time and run-time version information 4091817466cbSJens Wiklander * Expanded ssl_client2 arguments for more flexibility 4092817466cbSJens Wiklander * Added support for TLS v1.1 4093817466cbSJens Wiklander 4094817466cbSJens WiklanderChanges 4095817466cbSJens Wiklander * Made Makefile cleaner 4096817466cbSJens Wiklander * Removed dependency on rand() in rsa_pkcs1_encrypt(). 4097817466cbSJens Wiklander Now using random fuction provided to function and 4098817466cbSJens Wiklander changed the prototype of rsa_pkcs1_encrypt(), 4099817466cbSJens Wiklander rsa_init() and rsa_gen_key(). 4100817466cbSJens Wiklander * Some SSL defines were renamed in order to avoid 4101817466cbSJens Wiklander future confusion 4102817466cbSJens Wiklander 4103817466cbSJens WiklanderBug fixes 4104817466cbSJens Wiklander * Fixed CMake out of source build for tests (found by 4105817466cbSJens Wiklander kkert) 4106817466cbSJens Wiklander * rsa_check_private() now supports PKCS1v2 keys as well 4107817466cbSJens Wiklander * Fixed deadlock in rsa_pkcs1_encrypt() on failing random 4108817466cbSJens Wiklander generator 4109817466cbSJens Wiklander 4110817466cbSJens Wiklander= Version 0.13.1 released on 2010-03-24 4111817466cbSJens WiklanderBug fixes 4112817466cbSJens Wiklander * Fixed Makefile in library that was mistakenly merged 4113817466cbSJens Wiklander * Added missing const string fixes 4114817466cbSJens Wiklander 4115817466cbSJens Wiklander= Version 0.13.0 released on 2010-03-21 4116817466cbSJens WiklanderFeatures 4117817466cbSJens Wiklander * Added option parsing for host and port selection to 4118817466cbSJens Wiklander ssl_client2 4119817466cbSJens Wiklander * Added support for GeneralizedTime in X509 parsing 4120817466cbSJens Wiklander * Added cert_app program to allow easy reading and 4121817466cbSJens Wiklander printing of X509 certificates from file or SSL 4122817466cbSJens Wiklander connection. 4123817466cbSJens Wiklander 4124817466cbSJens WiklanderChanges 4125817466cbSJens Wiklander * Added const correctness for main code base 4126817466cbSJens Wiklander * X509 signature algorithm determination is now 4127817466cbSJens Wiklander in a function to allow easy future expansion 4128817466cbSJens Wiklander * Changed symmetric cipher functions to 4129817466cbSJens Wiklander identical interface (returning int result values) 4130817466cbSJens Wiklander * Changed ARC4 to use separate input/output buffer 4131817466cbSJens Wiklander * Added reset function for HMAC context as speed-up 4132817466cbSJens Wiklander for specific use-cases 4133817466cbSJens Wiklander 4134817466cbSJens WiklanderBug fixes 4135817466cbSJens Wiklander * Fixed bug resulting in failure to send the last 4136817466cbSJens Wiklander certificate in the chain in ssl_write_certificate() and 4137817466cbSJens Wiklander ssl_write_certificate_request() (found by fatbob) 4138817466cbSJens Wiklander * Added small fixes for compiler warnings on a Mac 4139817466cbSJens Wiklander (found by Frank de Brabander) 4140817466cbSJens Wiklander * Fixed algorithmic bug in mpi_is_prime() (found by 4141817466cbSJens Wiklander Smbat Tonoyan) 4142817466cbSJens Wiklander 4143817466cbSJens Wiklander= Version 0.12.1 released on 2009-10-04 4144817466cbSJens WiklanderChanges 4145817466cbSJens Wiklander * Coverage test definitions now support 'depends_on' 4146817466cbSJens Wiklander tagging system. 4147817466cbSJens Wiklander * Tests requiring specific hashing algorithms now honor 4148817466cbSJens Wiklander the defines. 4149817466cbSJens Wiklander 4150817466cbSJens WiklanderBug fixes 4151817466cbSJens Wiklander * Changed typo in #ifdef in x509parse.c (found 4152817466cbSJens Wiklander by Eduardo) 4153817466cbSJens Wiklander 4154817466cbSJens Wiklander= Version 0.12.0 released on 2009-07-28 4155817466cbSJens WiklanderFeatures 4156817466cbSJens Wiklander * Added CMake makefiles as alternative to regular Makefiles. 4157817466cbSJens Wiklander * Added preliminary Code Coverage tests for AES, ARC4, 4158817466cbSJens Wiklander Base64, MPI, SHA-family, MD-family, HMAC-SHA-family, 4159817466cbSJens Wiklander Camellia, DES, 3-DES, RSA PKCS#1, XTEA, Diffie-Hellman 4160817466cbSJens Wiklander and X509parse. 4161817466cbSJens Wiklander 4162817466cbSJens WiklanderChanges 4163817466cbSJens Wiklander * Error codes are not (necessarily) negative. Keep 4164817466cbSJens Wiklander this is mind when checking for errors. 4165817466cbSJens Wiklander * RSA_RAW renamed to SIG_RSA_RAW for consistency. 4166817466cbSJens Wiklander * Fixed typo in name of POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE. 4167817466cbSJens Wiklander * Changed interface for AES and Camellia setkey functions 4168817466cbSJens Wiklander to indicate invalid key lengths. 4169817466cbSJens Wiklander 4170817466cbSJens WiklanderBug fixes 4171817466cbSJens Wiklander * Fixed include location of endian.h on FreeBSD (found by 4172817466cbSJens Wiklander Gabriel) 4173817466cbSJens Wiklander * Fixed include location of endian.h and name clash on 4174817466cbSJens Wiklander Apples (found by Martin van Hensbergen) 4175817466cbSJens Wiklander * Fixed HMAC-MD2 by modifying md2_starts(), so that the 4176817466cbSJens Wiklander required HMAC ipad and opad variables are not cleared. 4177817466cbSJens Wiklander (found by code coverage tests) 4178817466cbSJens Wiklander * Prevented use of long long in bignum if 4179817466cbSJens Wiklander POLARSSL_HAVE_LONGLONG not defined (found by Giles 4180817466cbSJens Wiklander Bathgate). 4181817466cbSJens Wiklander * Fixed incorrect handling of negative strings in 4182817466cbSJens Wiklander mpi_read_string() (found by code coverage tests). 4183817466cbSJens Wiklander * Fixed segfault on handling empty rsa_context in 4184817466cbSJens Wiklander rsa_check_pubkey() and rsa_check_privkey() (found by 4185817466cbSJens Wiklander code coverage tests). 4186817466cbSJens Wiklander * Fixed incorrect handling of one single negative input 4187817466cbSJens Wiklander value in mpi_add_abs() (found by code coverage tests). 4188817466cbSJens Wiklander * Fixed incorrect handling of negative first input 4189817466cbSJens Wiklander value in mpi_sub_abs() (found by code coverage tests). 4190817466cbSJens Wiklander * Fixed incorrect handling of negative first input 4191817466cbSJens Wiklander value in mpi_mod_mpi() and mpi_mod_int(). Resulting 4192817466cbSJens Wiklander change also affects mpi_write_string() (found by code 4193817466cbSJens Wiklander coverage tests). 4194817466cbSJens Wiklander * Corrected is_prime() results for 0, 1 and 2 (found by 4195817466cbSJens Wiklander code coverage tests). 4196817466cbSJens Wiklander * Fixed Camellia and XTEA for 64-bit Windows systems. 4197817466cbSJens Wiklander 4198817466cbSJens Wiklander= Version 0.11.1 released on 2009-05-17 4199817466cbSJens Wiklander * Fixed missing functionality for SHA-224, SHA-256, SHA384, 4200817466cbSJens Wiklander SHA-512 in rsa_pkcs1_sign() 4201817466cbSJens Wiklander 4202817466cbSJens Wiklander= Version 0.11.0 released on 2009-05-03 4203817466cbSJens Wiklander * Fixed a bug in mpi_gcd() so that it also works when both 4204817466cbSJens Wiklander input numbers are even and added testcases to check 4205817466cbSJens Wiklander (found by Pierre Habouzit). 4206817466cbSJens Wiklander * Added support for SHA-224, SHA-256, SHA-384 and SHA-512 4207817466cbSJens Wiklander one way hash functions with the PKCS#1 v1.5 signing and 4208817466cbSJens Wiklander verification. 4209817466cbSJens Wiklander * Fixed minor bug regarding mpi_gcd located within the 4210817466cbSJens Wiklander POLARSSL_GENPRIME block. 4211817466cbSJens Wiklander * Fixed minor memory leak in x509parse_crt() and added better 4212817466cbSJens Wiklander handling of 'full' certificate chains (found by Mathias 4213817466cbSJens Wiklander Olsson). 4214817466cbSJens Wiklander * Centralized file opening and reading for x509 files into 4215817466cbSJens Wiklander load_file() 4216817466cbSJens Wiklander * Made definition of net_htons() endian-clean for big endian 4217817466cbSJens Wiklander systems (Found by Gernot). 4218817466cbSJens Wiklander * Undefining POLARSSL_HAVE_ASM now also handles prevents asm in 4219817466cbSJens Wiklander padlock and timing code. 4220817466cbSJens Wiklander * Fixed an off-by-one buffer allocation in ssl_set_hostname() 4221817466cbSJens Wiklander responsible for crashes and unwanted behaviour. 4222817466cbSJens Wiklander * Added support for Certificate Revocation List (CRL) parsing. 4223817466cbSJens Wiklander * Added support for CRL revocation to x509parse_verify() and 4224817466cbSJens Wiklander SSL/TLS code. 4225817466cbSJens Wiklander * Fixed compatibility of XTEA and Camellia on a 64-bit system 4226817466cbSJens Wiklander (found by Felix von Leitner). 4227817466cbSJens Wiklander 4228817466cbSJens Wiklander= Version 0.10.0 released on 2009-01-12 4229817466cbSJens Wiklander * Migrated XySSL to PolarSSL 4230817466cbSJens Wiklander * Added XTEA symmetric cipher 4231817466cbSJens Wiklander * Added Camellia symmetric cipher 4232817466cbSJens Wiklander * Added support for ciphersuites: SSL_RSA_CAMELLIA_128_SHA, 4233817466cbSJens Wiklander SSL_RSA_CAMELLIA_256_SHA and SSL_EDH_RSA_CAMELLIA_256_SHA 4234817466cbSJens Wiklander * Fixed dangerous bug that can cause a heap overflow in 4235817466cbSJens Wiklander rsa_pkcs1_decrypt (found by Christophe Devine) 4236817466cbSJens Wiklander 4237817466cbSJens Wiklander================================================================ 4238817466cbSJens WiklanderXySSL ChangeLog 4239817466cbSJens Wiklander 4240817466cbSJens Wiklander= Version 0.9 released on 2008-03-16 4241817466cbSJens Wiklander 4242817466cbSJens Wiklander * Added support for ciphersuite: SSL_RSA_AES_128_SHA 4243817466cbSJens Wiklander * Enabled support for large files by default in aescrypt2.c 4244817466cbSJens Wiklander * Preliminary openssl wrapper contributed by David Barrett 4245817466cbSJens Wiklander * Fixed a bug in ssl_write() that caused the same payload to 4246817466cbSJens Wiklander be sent twice in non-blocking mode when send returns EAGAIN 4247817466cbSJens Wiklander * Fixed ssl_parse_client_hello(): session id and challenge must 4248817466cbSJens Wiklander not be swapped in the SSLv2 ClientHello (found by Greg Robson) 4249817466cbSJens Wiklander * Added user-defined callback debug function (Krystian Kolodziej) 4250817466cbSJens Wiklander * Before freeing a certificate, properly zero out all cert. data 4251817466cbSJens Wiklander * Fixed the "mode" parameter so that encryption/decryption are 4252817466cbSJens Wiklander not swapped on PadLock; also fixed compilation on older versions 4253817466cbSJens Wiklander of gcc (bug reported by David Barrett) 4254817466cbSJens Wiklander * Correctly handle the case in padlock_xcryptcbc() when input or 42555b25c76aSJerome Forissier output data is non-aligned by falling back to the software 4256817466cbSJens Wiklander implementation, as VIA Nehemiah cannot handle non-aligned buffers 4257817466cbSJens Wiklander * Fixed a memory leak in x509parse_crt() which was reported by Greg 4258817466cbSJens Wiklander Robson-Garth; some x509write.c fixes by Pascal Vizeli, thanks to 4259817466cbSJens Wiklander Matthew Page who reported several bugs 4260817466cbSJens Wiklander * Fixed x509_get_ext() to accept some rare certificates which have 4261817466cbSJens Wiklander an INTEGER instead of a BOOLEAN for BasicConstraints::cA. 4262817466cbSJens Wiklander * Added support on the client side for the TLS "hostname" extension 4263817466cbSJens Wiklander (patch contributed by David Patino) 4264817466cbSJens Wiklander * Make x509parse_verify() return BADCERT_CN_MISMATCH when an empty 4265817466cbSJens Wiklander string is passed as the CN (bug reported by spoofy) 4266817466cbSJens Wiklander * Added an option to enable/disable the BN assembly code 4267817466cbSJens Wiklander * Updated rsa_check_privkey() to verify that (D*E) = 1 % (P-1)*(Q-1) 4268817466cbSJens Wiklander * Disabled obsolete hash functions by default (MD2, MD4); updated 4269817466cbSJens Wiklander selftest and benchmark to not test ciphers that have been disabled 4270817466cbSJens Wiklander * Updated x509parse_cert_info() to correctly display byte 0 of the 4271817466cbSJens Wiklander serial number, setup correct server port in the ssl client example 4272817466cbSJens Wiklander * Fixed a critical denial-of-service with X.509 cert. verification: 4273817466cbSJens Wiklander peer may cause xyssl to loop indefinitely by sending a certificate 4274817466cbSJens Wiklander for which the RSA signature check fails (bug reported by Benoit) 4275817466cbSJens Wiklander * Added test vectors for: AES-CBC, AES-CFB, DES-CBC and 3DES-CBC, 4276817466cbSJens Wiklander HMAC-MD5, HMAC-SHA1, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 4277817466cbSJens Wiklander * Fixed HMAC-SHA-384 and HMAC-SHA-512 (thanks to Josh Sinykin) 4278817466cbSJens Wiklander * Modified ssl_parse_client_key_exchange() to protect against 4279817466cbSJens Wiklander Daniel Bleichenbacher attack on PKCS#1 v1.5 padding, as well 4280817466cbSJens Wiklander as the Klima-Pokorny-Rosa extension of Bleichenbacher's attack 4281817466cbSJens Wiklander * Updated rsa_gen_key() so that ctx->N is always nbits in size 4282817466cbSJens Wiklander * Fixed assembly PPC compilation errors on Mac OS X, thanks to 4283817466cbSJens Wiklander David Barrett and Dusan Semen 4284817466cbSJens Wiklander 4285817466cbSJens Wiklander= Version 0.8 released on 2007-10-20 4286817466cbSJens Wiklander 4287817466cbSJens Wiklander * Modified the HMAC functions to handle keys larger 4288817466cbSJens Wiklander than 64 bytes, thanks to Stephane Desneux and gary ng 4289817466cbSJens Wiklander * Fixed ssl_read_record() to properly update the handshake 4290817466cbSJens Wiklander message digests, which fixes IE6/IE7 client authentication 4291817466cbSJens Wiklander * Cleaned up the XYSSL* #defines, suggested by Azriel Fasten 4292817466cbSJens Wiklander * Fixed net_recv(), thanks to Lorenz Schori and Egon Kocjan 4293817466cbSJens Wiklander * Added user-defined callbacks for handling I/O and sessions 4294817466cbSJens Wiklander * Added lots of debugging output in the SSL/TLS functions 4295817466cbSJens Wiklander * Added preliminary X.509 cert. writing by Pascal Vizeli 4296817466cbSJens Wiklander * Added preliminary support for the VIA PadLock routines 4297817466cbSJens Wiklander * Added AES-CFB mode of operation, contributed by chmike 4298817466cbSJens Wiklander * Added an SSL/TLS stress testing program (ssl_test.c) 4299817466cbSJens Wiklander * Updated the RSA PKCS#1 code to allow choosing between 4300817466cbSJens Wiklander RSA_PUBLIC and RSA_PRIVATE, as suggested by David Barrett 4301817466cbSJens Wiklander * Updated ssl_read() to skip 0-length records from OpenSSL 4302817466cbSJens Wiklander * Fixed the make install target to comply with *BSD make 4303817466cbSJens Wiklander * Fixed a bug in mpi_read_binary() on 64-bit platforms 4304817466cbSJens Wiklander * mpi_is_prime() speedups, thanks to Kevin McLaughlin 4305817466cbSJens Wiklander * Fixed a long standing memory leak in mpi_is_prime() 4306817466cbSJens Wiklander * Replaced realloc with malloc in mpi_grow(), and set 4307817466cbSJens Wiklander the sign of zero as positive in mpi_init() (reported 4308817466cbSJens Wiklander by Jonathan M. McCune) 4309817466cbSJens Wiklander 4310817466cbSJens Wiklander= Version 0.7 released on 2007-07-07 4311817466cbSJens Wiklander 4312817466cbSJens Wiklander * Added support for the MicroBlaze soft-core processor 4313817466cbSJens Wiklander * Fixed a bug in ssl_tls.c which sometimes prevented SSL 4314817466cbSJens Wiklander connections from being established with non-blocking I/O 4315817466cbSJens Wiklander * Fixed a couple bugs in the VS6 and UNIX Makefiles 4316817466cbSJens Wiklander * Fixed the "PIC register ebx clobbered in asm" bug 4317817466cbSJens Wiklander * Added HMAC starts/update/finish support functions 4318817466cbSJens Wiklander * Added the SHA-224, SHA-384 and SHA-512 hash functions 4319817466cbSJens Wiklander * Fixed the net_set_*block routines, thanks to Andreas 4320817466cbSJens Wiklander * Added a few demonstration programs: md5sum, sha1sum, 4321817466cbSJens Wiklander dh_client, dh_server, rsa_genkey, rsa_sign, rsa_verify 4322817466cbSJens Wiklander * Added new bignum import and export helper functions 4323817466cbSJens Wiklander * Rewrote README.txt in program/ssl/ca to better explain 4324817466cbSJens Wiklander how to create a test PKI 4325817466cbSJens Wiklander 4326817466cbSJens Wiklander= Version 0.6 released on 2007-04-01 4327817466cbSJens Wiklander 4328817466cbSJens Wiklander * Ciphers used in SSL/TLS can now be disabled at compile 4329817466cbSJens Wiklander time, to reduce the memory footprint on embedded systems 4330817466cbSJens Wiklander * Added multiply assembly code for the TriCore and modified 4331817466cbSJens Wiklander havege_struct for this processor, thanks to David Patiño 4332817466cbSJens Wiklander * Added multiply assembly code for 64-bit PowerPCs, 4333817466cbSJens Wiklander thanks to Peking University and the OSU Open Source Lab 4334817466cbSJens Wiklander * Added experimental support of Quantum Cryptography 4335817466cbSJens Wiklander * Added support for autoconf, contributed by Arnaud Cornet 4336817466cbSJens Wiklander * Fixed "long long" compilation issues on IA-64 and PPC64 4337817466cbSJens Wiklander * Fixed a bug introduced in xyssl-0.5/timing.c: hardclock 4338817466cbSJens Wiklander was not being correctly defined on ARM and MIPS 4339817466cbSJens Wiklander 4340817466cbSJens Wiklander= Version 0.5 released on 2007-03-01 4341817466cbSJens Wiklander 4342817466cbSJens Wiklander * Added multiply assembly code for SPARC and Alpha 4343817466cbSJens Wiklander * Added (beta) support for non-blocking I/O operations 4344817466cbSJens Wiklander * Implemented session resuming and client authentication 4345817466cbSJens Wiklander * Fixed some portability issues on WinCE, MINIX 3, Plan9 4346817466cbSJens Wiklander (thanks to Benjamin Newman), HP-UX, FreeBSD and Solaris 4347817466cbSJens Wiklander * Improved the performance of the EDH key exchange 4348817466cbSJens Wiklander * Fixed a bug that caused valid packets with a payload 4349817466cbSJens Wiklander size of 16384 bytes to be rejected 4350817466cbSJens Wiklander 4351817466cbSJens Wiklander= Version 0.4 released on 2007-02-01 4352817466cbSJens Wiklander 4353817466cbSJens Wiklander * Added support for Ephemeral Diffie-Hellman key exchange 4354817466cbSJens Wiklander * Added multiply asm code for SSE2, ARM, PPC, MIPS and M68K 4355817466cbSJens Wiklander * Various improvement to the modular exponentiation code 4356817466cbSJens Wiklander * Rewrote the headers to generate the API docs with doxygen 4357817466cbSJens Wiklander * Fixed a bug in ssl_encrypt_buf (incorrect padding was 4358817466cbSJens Wiklander generated) and in ssl_parse_client_hello (max. client 4359817466cbSJens Wiklander version was not properly set), thanks to Didier Rebeix 4360817466cbSJens Wiklander * Fixed another bug in ssl_parse_client_hello: clients with 4361817466cbSJens Wiklander cipherlists larger than 96 bytes were incorrectly rejected 4362817466cbSJens Wiklander * Fixed a couple memory leak in x509_read.c 4363817466cbSJens Wiklander 4364817466cbSJens Wiklander= Version 0.3 released on 2007-01-01 4365817466cbSJens Wiklander 4366817466cbSJens Wiklander * Added server-side SSLv3 and TLSv1.0 support 4367817466cbSJens Wiklander * Multiple fixes to enhance the compatibility with g++, 4368817466cbSJens Wiklander thanks to Xosé Antón Otero Ferreira 4369817466cbSJens Wiklander * Fixed a bug in the CBC code, thanks to dowst; also, 4370817466cbSJens Wiklander the bignum code is no longer dependent on long long 4371817466cbSJens Wiklander * Updated rsa_pkcs1_sign to handle arbitrary large inputs 4372817466cbSJens Wiklander * Updated timing.c for improved compatibility with i386 4373817466cbSJens Wiklander and 486 processors, thanks to Arnaud Cornet 4374817466cbSJens Wiklander 4375817466cbSJens Wiklander= Version 0.2 released on 2006-12-01 4376817466cbSJens Wiklander 4377817466cbSJens Wiklander * Updated timing.c to support ARM and MIPS arch 4378817466cbSJens Wiklander * Updated the MPI code to support 8086 on MSVC 1.5 4379817466cbSJens Wiklander * Added the copyright notice at the top of havege.h 4380817466cbSJens Wiklander * Fixed a bug in sha2_hmac, thanks to newsoft/Wenfang Zhang 4381817466cbSJens Wiklander * Fixed a bug reported by Adrian Rüegsegger in x509_read_key 4382817466cbSJens Wiklander * Fixed a bug reported by Torsten Lauter in ssl_read_record 4383817466cbSJens Wiklander * Fixed a bug in rsa_check_privkey that would wrongly cause 4384817466cbSJens Wiklander valid RSA keys to be dismissed (thanks to oldwolf) 4385817466cbSJens Wiklander * Fixed a bug in mpi_is_prime that caused some primes to fail 4386817466cbSJens Wiklander the Miller-Rabin primality test 4387817466cbSJens Wiklander 4388817466cbSJens Wiklander I'd also like to thank Younès Hafri for the CRUX linux port, 4389817466cbSJens Wiklander Khalil Petit who added XySSL into pkgsrc and Arnaud Cornet 4390817466cbSJens Wiklander who maintains the Debian package :-) 4391817466cbSJens Wiklander 4392817466cbSJens Wiklander= Version 0.1 released on 2006-11-01 4393