|
1 | 1 | mbed TLS ChangeLog (Sorted per branch, date)
|
2 | 2 |
|
| 3 | += mbed TLS 2.27.0 branch released 2021-07-07 |
| 4 | + |
| 5 | +API changes |
| 6 | + * Update AEAD output size macros to bring them in line with the PSA Crypto |
| 7 | + API version 1.0 spec. This version of the spec parameterizes them on the |
| 8 | + key type used, as well as the key bit-size in the case of |
| 9 | + PSA_AEAD_TAG_LENGTH. |
| 10 | + The old versions of these macros were renamed and deprecated as follows: |
| 11 | + - PSA_AEAD_TAG_LENGTH -> PSA_AEAD_TAG_LENGTH_1_ARG |
| 12 | + - PSA_AEAD_ENCRYPT_OUTPUT_SIZE -> PSA_AEAD_ENCRYPT_OUTPUT_SIZE_2_ARG |
| 13 | + - PSA_AEAD_DECRYPT_OUTPUT_SIZE -> PSA_AEAD_DECRYPT_OUTPUT_SIZE_2_ARG |
| 14 | + - PSA_AEAD_UPDATE_OUTPUT_SIZE -> PSA_AEAD_UPDATE_OUTPUT_SIZE_2_ARG |
| 15 | + - PSA_AEAD_FINISH_OUTPUT_SIZE -> PSA_AEAD_FINISH_OUTPUT_SIZE_1_ARG |
| 16 | + - PSA_AEAD_VERIFY_OUTPUT_SIZE -> PSA_AEAD_VERIFY_OUTPUT_SIZE_1_ARG |
| 17 | + * Implement one-shot cipher functions, psa_cipher_encrypt and |
| 18 | + psa_cipher_decrypt, according to the PSA Crypto API 1.0.0 |
| 19 | + specification. |
| 20 | + |
| 21 | +Requirement changes |
| 22 | + * The library now uses the %zu format specifier with the printf() family of |
| 23 | + functions, so requires a toolchain that supports it. This change does not |
| 24 | + affect the maintained LTS branches, so when contributing changes please |
| 25 | + bear this in mind and do not add them to backported code. |
| 26 | + |
| 27 | +Features |
| 28 | + * Add mbedtls_rsa_rsassa_pss_sign_ext() function allowing to generate a |
| 29 | + signature with a specific salt length. This function allows to validate |
| 30 | + test cases provided in the NIST's CAVP test suite. Contributed by Cédric |
| 31 | + Meuter in PR #3183. |
| 32 | + * Added support for built-in driver keys through the PSA opaque crypto |
| 33 | + driver interface. Refer to the documentation of |
| 34 | + MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS for more information. |
| 35 | + * Implement psa_sign_message() and psa_verify_message(). |
| 36 | + * The new function mbedtls_mpi_random() generates a random value in a |
| 37 | + given range uniformly. |
| 38 | + * Implement psa_mac_compute() and psa_mac_verify() as defined in the |
| 39 | + PSA Cryptograpy API 1.0.0 specification. |
| 40 | + * MBEDTLS_ECP_MAX_BITS is now determined automatically from the configured |
| 41 | + curves and no longer needs to be configured explicitly to save RAM. |
| 42 | + |
| 43 | +Security |
| 44 | + * Fix a bias in the generation of finite-field Diffie-Hellman-Merkle (DHM) |
| 45 | + private keys and of blinding values for DHM and elliptic curves (ECP) |
| 46 | + computations. Reported by FlorianF89 in #4245. |
| 47 | + * Fix a potential side channel vulnerability in ECDSA ephemeral key generation. |
| 48 | + An adversary who is capable of very precise timing measurements could |
| 49 | + learn partial information about the leading bits of the nonce used for the |
| 50 | + signature, allowing the recovery of the private key after observing a |
| 51 | + large number of signature operations. This completes a partial fix in |
| 52 | + Mbed TLS 2.20.0. |
| 53 | + * It was possible to configure MBEDTLS_ECP_MAX_BITS to a value that is |
| 54 | + too small, leading to buffer overflows in ECC operations. Fail the build |
| 55 | + in such a case. |
| 56 | + * An adversary with access to precise enough information about memory |
| 57 | + accesses (typically, an untrusted operating system attacking a secure |
| 58 | + enclave) could recover an RSA private key after observing the victim |
| 59 | + performing a single private-key operation. Found and reported by |
| 60 | + Zili KOU, Wenjian HE, Sharad Sinha, and Wei ZHANG. |
| 61 | + * An adversary with access to precise enough timing information (typically, a |
| 62 | + co-located process) could recover a Curve25519 or Curve448 static ECDH key |
| 63 | + after inputting a chosen public key and observing the victim performing the |
| 64 | + corresponding private-key operation. Found and reported by Leila Batina, |
| 65 | + Lukas Chmielewski, Björn Haase, Niels Samwel and Peter Schwabe. |
| 66 | + |
| 67 | +Bugfix |
| 68 | + * Add printf function attributes to mbedtls_debug_print_msg to ensure we |
| 69 | + get printf format specifier warnings. |
| 70 | + * Fix premature fopen() call in mbedtls_entropy_write_seed_file which may |
| 71 | + lead to seed file corruption in the case where the path to the seed file is |
| 72 | + equal to MBEDTLS_PLATFORM_STD_NV_SEED_FILE. Contributed by Victor |
| 73 | + Krasnoshchok in #3616. |
| 74 | + * PSA functions other than psa_open_key now return PSA_ERROR_INVALID_HANDLE |
| 75 | + rather than PSA_ERROR_DOES_NOT_EXIST for an invalid handle, bringing them |
| 76 | + in line with version 1.0.0 of the specification. Fix #4162. |
| 77 | + * PSA functions creating a key now return PSA_ERROR_INVALID_ARGUMENT rather |
| 78 | + than PSA_ERROR_INVALID_HANDLE when the identifier specified for the key |
| 79 | + to create is not valid, bringing them in line with version 1.0.0 of the |
| 80 | + specification. Fix #4271. |
| 81 | + * Fix some cases in the bignum module where the library constructed an |
| 82 | + unintended representation of the value 0 which was not processed |
| 83 | + correctly by some bignum operations. This could happen when |
| 84 | + mbedtls_mpi_read_string() was called on "-0", or when |
| 85 | + mbedtls_mpi_mul_mpi() and mbedtls_mpi_mul_int() was called with one of |
| 86 | + the arguments being negative and the other being 0. Fixes #4643. |
| 87 | + * Fix a bug in ECDSA that would cause it to fail when the hash is all-bits |
| 88 | + zero. Fixes #1792 |
| 89 | + * Fix a compilation error when MBEDTLS_ECP_RANDOMIZE_MXZ_ALT is |
| 90 | + defined. Fixes #4217. |
| 91 | + * Fix an incorrect error code when parsing a PKCS#8 private key. |
| 92 | + * In a TLS client, enforce the Diffie-Hellman minimum parameter size |
| 93 | + set with mbedtls_ssl_conf_dhm_min_bitlen() precisely. Before, the |
| 94 | + minimum size was rounded down to the nearest multiple of 8. |
| 95 | + * In library/net_sockets.c, _POSIX_C_SOURCE and _XOPEN_SOURCE are |
| 96 | + defined to specific values. If the code is used in a context |
| 97 | + where these are already defined, this can result in a compilation |
| 98 | + error. Instead, assume that if they are defined, the values will |
| 99 | + be adequate to build Mbed TLS. |
| 100 | + * The cipher suite TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384 was not available |
| 101 | + when SHA-1 was disabled and was offered when SHA-1 was enabled but SHA-384 |
| 102 | + was disabled. Fix the dependency. Fixes #4472. |
| 103 | + * Do not offer SHA384 cipher suites when SHA-384 is disabled. Fixes #4499. |
| 104 | + * With MBEDTLS_PSA_CRYPTO_C disabled, some functions were getting built |
| 105 | + nonetheless, resulting in undefined reference errors when building a |
| 106 | + shared library. Reported by Guillermo Garcia M. in #4411. |
| 107 | + * Fix test suite code on platforms where int32_t is not int, such as |
| 108 | + Arm Cortex-M. Fixes #4530. |
| 109 | + * Fix some issues affecting MBEDTLS_ARIA_ALT implementations: a misplaced |
| 110 | + directive in a header and a missing initialization in the self-test. |
| 111 | + * Fix a missing initialization in the Camellia self-test, affecting |
| 112 | + MBEDTLS_CAMELLIA_ALT implementations. |
| 113 | + * Restore the ability to configure PSA via Mbed TLS options to support RSA |
| 114 | + key pair operations but exclude RSA key generation. When MBEDTLS_GENPRIME |
| 115 | + is not defined PSA will no longer attempt to use mbedtls_rsa_gen_key(). |
| 116 | + Fixes #4512. |
| 117 | + * Fix a regression introduced in 2.24.0 which broke (D)TLS CBC ciphersuites |
| 118 | + (when the encrypt-then-MAC extension is not in use) with some ALT |
| 119 | + implementations of the underlying hash (SHA-1, SHA-256, SHA-384), causing |
| 120 | + the affected side to wrongly reject valid messages. Fixes #4118. |
| 121 | + * Remove outdated check-config.h check that prevented implementing the |
| 122 | + timing module on Mbed OS. Fixes #4633. |
| 123 | + * Fix PSA_ALG_TLS12_PRF and PSA_ALG_TLS12_PSK_TO_MS being too permissive |
| 124 | + about missing inputs. |
| 125 | + * Fix mbedtls_net_poll() and mbedtls_net_recv_timeout() often failing with |
| 126 | + MBEDTLS_ERR_NET_POLL_FAILED on Windows. Fixes #4465. |
| 127 | + * Fix a resource leak in a test suite with an alternative AES |
| 128 | + implementation. Fixes #4176. |
| 129 | + * Fix a crash in mbedtls_mpi_debug_mpi on a bignum having 0 limbs. This |
| 130 | + could notably be triggered by setting the TLS debug level to 3 or above |
| 131 | + and using a Montgomery curve for the key exchange. Reported by lhuang04 |
| 132 | + in #4578. Fixes #4608. |
| 133 | + * psa_verify_hash() was relying on implementation-specific behavior of |
| 134 | + mbedtls_rsa_rsassa_pss_verify() and was causing failures in some _ALT |
| 135 | + implementations. This reliance is now removed. Fixes #3990. |
| 136 | + * Disallow inputs of length different from the corresponding hash when |
| 137 | + signing or verifying with PSA_ALG_RSA_PSS (The PSA Crypto API mandates |
| 138 | + that PSA_ALG_RSA_PSS uses the same hash throughout the algorithm.) |
| 139 | + * Fix a null pointer dereference when mbedtls_mpi_exp_mod() was called with |
| 140 | + A=0 represented with 0 limbs. Up to and including Mbed TLS 2.26, this bug |
| 141 | + could not be triggered by code that constructed A with one of the |
| 142 | + mbedtls_mpi_read_xxx functions (including in particular TLS code) since |
| 143 | + those always built an mpi object with at least one limb. |
| 144 | + Credit to OSS-Fuzz. Fixes #4641. |
| 145 | + * Fix mbedtls_mpi_gcd(G,A,B) when the value of B is zero. This had no |
| 146 | + effect on Mbed TLS's internal use of mbedtls_mpi_gcd(), but may affect |
| 147 | + applications that call mbedtls_mpi_gcd() directly. Fixes #4642. |
| 148 | + * The PSA API no longer allows the creation or destruction of keys with a |
| 149 | + read-only lifetime. The persistence level PSA_KEY_PERSISTENCE_READ_ONLY |
| 150 | + can now only be used as intended, for keys that cannot be modified through |
| 151 | + normal use of the API. |
| 152 | + * When MBEDTLS_PSA_CRYPTO_SPM is enabled, crypto_spe.h was not included |
| 153 | + in all the right places. Include it from crypto_platform.h, which is |
| 154 | + the natural place. Fixes #4649. |
| 155 | + * mbedtls_pk_sign() and mbedtls_pk_verify() and their extended and |
| 156 | + restartable variants now always honor the specified hash length if |
| 157 | + nonzero. Before, for RSA, hash_len was ignored in favor of the length of |
| 158 | + the specified hash algorithm. |
| 159 | + * Fix which alert is sent in some cases to conform to the |
| 160 | + applicable RFC: on an invalid Finished message value, an |
| 161 | + invalid max_fragment_length extension, or an |
| 162 | + unsupported extension used by the server. |
| 163 | + * Correct (change from 12 to 13 bytes) the value of the macro describing the |
| 164 | + maximum nonce length returned by psa_aead_generate_nonce(). |
| 165 | + |
| 166 | +Changes |
| 167 | + * Add extra printf compiler warning flags to builds. |
| 168 | + * Fix memsan build false positive in x509_crt.c with Clang 11 |
| 169 | + * Fix the setting of the read timeout in the DTLS sample programs. |
| 170 | + * Remove the AES sample application programs/aes/aescrypt2 which shows |
| 171 | + bad cryptographic practice. Fix #1906. |
| 172 | + * Alternative implementations of CMAC may now opt to not support 3DES as a |
| 173 | + CMAC block cipher, and still pass the CMAC self test. |
| 174 | + * Remove configs/config-psa-crypto.h, which was identical to the default |
| 175 | + configuration except for having some extra cryptographic mechanisms |
| 176 | + enabled and for unintended differences. This configuration was primarily |
| 177 | + intended to demonstrate the PSA API, and lost most of its usefulness when |
| 178 | + MBEDTLS_PSA_CRYPTO_C became enabled by default. |
| 179 | + * When building the test suites with GNU make, invoke python3 or python, not |
| 180 | + python2, which is no longer supported upstream. |
| 181 | + * When using session cache based session resumption on the server, |
| 182 | + double-check that custom session cache implementations return |
| 183 | + sessions which are consistent with the negotiated ciphersuite |
| 184 | + and compression method. |
| 185 | + * Fix build failure on MinGW toolchain when __USE_MING_ANSI_STDIO is on. |
| 186 | + When that flag is on, standard GNU C printf format specifiers |
| 187 | + should be used. |
| 188 | + * Reduce the default value of MBEDTLS_ECP_WINDOW_SIZE. This reduces RAM usage |
| 189 | + during ECC operations at a negligible performance cost. |
| 190 | + * mbedtls_mpi_read_binary(), mbedtls_mpi_read_binary_le() and |
| 191 | + mbedtls_mpi_read_string() now construct an mbedtls_mpi object with 0 limbs |
| 192 | + when their input has length 0. Note that this is an implementation detail |
| 193 | + and can change at any time, so this change should be transparent, but it |
| 194 | + may result in mbedtls_mpi_write_binary() or mbedtls_mpi_write_string() |
| 195 | + now writing an empty string where it previously wrote one or more |
| 196 | + zero digits when operating from values constructed with an mpi_read |
| 197 | + function and some mpi operations. |
| 198 | + * Implicitly add PSA_KEY_USAGE_SIGN_MESSAGE key usage policy flag when |
| 199 | + PSA_KEY_USAGE_SIGN_HASH flag is set and PSA_KEY_USAGE_VERIFY_MESSAGE flag |
| 200 | + when PSA_KEY_USAGE_VERIFY_HASH flag is set. This usage flag extension |
| 201 | + is also applied when loading a key from storage. |
| 202 | + |
3 | 203 | = mbed TLS 2.26.0 branch released 2021-03-08
|
4 | 204 |
|
5 | 205 | API changes
|
@@ -202,7 +402,7 @@ Security
|
202 | 402 | Johan Malmgren and Johan Uppman Bruce from Sectra.
|
203 | 403 |
|
204 | 404 | Bugfix
|
205 |
| - * Fix an invalid (but nonzero) return code from mbedtls_pk_parse_subpubkey() |
| 405 | + * Fix an invalid (but non-zero) return code from mbedtls_pk_parse_subpubkey() |
206 | 406 | when the input has trailing garbage. Fixes #2512.
|
207 | 407 | * Fix build failure in configurations where MBEDTLS_USE_PSA_CRYPTO is
|
208 | 408 | enabled but ECDSA is disabled. Contributed by jdurkop. Fixes #3294.
|
|
0 commit comments