Skip to content

Commit 38181b6

Browse files
Assemble ChangeLog
Signed-off-by: Minos Galanakis <[email protected]>
1 parent e5862c0 commit 38181b6

Some content is hidden

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

50 files changed

+256
-307
lines changed

ChangeLog

Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,261 @@
11
Mbed TLS ChangeLog (Sorted per branch, date)
22

3+
= Mbed TLS 4.0.0 branch released 2025-10-15
4+
5+
API changes
6+
* Align the mbedtls_ssl_ticket_setup() function with the PSA Crypto API.
7+
Instead of taking a mbedtls_cipher_type_t as an argument, this function
8+
now takes 3 new arguments: a PSA algorithm, key type and key size, to
9+
specify the AEAD for ticket protection.
10+
* The PSA and Mbed TLS error spaces are now unified. mbedtls_xxx()
11+
functions can now return PSA_ERROR_xxx values.
12+
There is no longer a distinction between "low-level" and "high-level"
13+
Mbed TLS error codes.
14+
This will not affect most applications since the error values are
15+
between -32767 and -1 as before.
16+
* All API functions now use the PSA random generator psa_generate_random()
17+
internally. As a consequence, functions no longer take RNG parameters.
18+
Please refer to the migration guide at :
19+
docs/4.0-migration-guide.md.
20+
* The list passed to mbedtls_ssl_conf_alpn_protocols() is now declared
21+
as having const elements, reflecting the fact that the library will
22+
not modify it
23+
* Change the serial argument of the mbedtls_x509write_crt_set_serial_raw
24+
function to a const to align with the rest of the API.
25+
* Change the signature of the runtime version information methods that took
26+
a char* as an argument to take zero arguments and return a const char*
27+
instead. This aligns us with the interface used in TF PSA Crypto 1.0.
28+
If you need to support linking against both Mbed TLS 3.x and 4.x, please
29+
use the build-time version macros or mbedtls_version_get_number() to
30+
determine the correct signature for mbedtls_version_get_string() and
31+
mbedtls_version_get_string_full() before calling them.
32+
Fixes issue #10308.
33+
* Make the following error codes aliases of their PSA equivalents, where
34+
xxx is a module, e.g. X509 or SSL.
35+
MBEDTLS_ERR_xxx_BAD_INPUT_DATA -> PSA_ERROR_INVALID_ARGUMENT
36+
MBEDTLS_ERR_xxx_ALLOC_FAILED -> PSA_ERROR_INSUFFICIENT_MEMORY
37+
MBEDTLS_ERR_xxx_BUFFER_TOO_SMALL -> PSA_ERROR_BUFFER_TOO_SMALL
38+
MBEDTLS_ERR_PKCS7_VERIFY_FAIL -> PSA_ERROR_INVALID_SIGNATURE
39+
* Add MBEDTLS_SSL_NULL_CIPHERSUITES configuration option. It enables
40+
TLS 1.2 ciphersuites without encryption and is disabled by default.
41+
This new option replaces MBEDTLS_CIPHER_NULL_CIPHER.
42+
43+
Default behavior changes
44+
* The X.509 and TLS modules now always use the PSA subsystem
45+
to perform cryptographic operations, with a few exceptions documented
46+
in docs/architecture/psa-migration/psa-limitations.md. This
47+
corresponds to the behavior of Mbed TLS 3.x when
48+
MBEDTLS_USE_PSA_CRYPTO is enabled. In effect, MBEDTLS_USE_PSA_CRYPTO
49+
is now always enabled.
50+
* psa_crypto_init() must be called before performing any cryptographic
51+
operation, including indirect requests such as parsing a key or
52+
certificate or starting a TLS handshake.
53+
* In TLS clients, if mbedtls_ssl_set_hostname() has not been called,
54+
mbedtls_ssl_handshake() now fails with
55+
MBEDTLS_ERR_SSL_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME
56+
if certificate-based authentication of the server is attempted.
57+
This is because authenticating a server without knowing what name
58+
to expect is usually insecure.
59+
60+
Removals
61+
* Remove support for the RSA-PSK key exchange in TLS 1.2.
62+
* Remove deprecated mbedtls_x509write_crt_set_serial(). The function was
63+
already deprecated and superseded by
64+
mbedtls_x509write_crt_set_serial_raw().
65+
* Remove the function mbedtls_ssl_conf_curves() which had been deprecated
66+
in favour of mbedtls_ssl_conf_groups() since Mbed TLS 3.1.
67+
* Remove support for the DHE-PSK key exchange in TLS 1.2.
68+
* Remove support for the DHE-RSA key exchange in TLS 1.2.
69+
* Following the removal of DHM module (#9972 and TF-PSA-Crypto#175) the
70+
following SSL functions are removed:
71+
- mbedtls_ssl_conf_dh_param_bin
72+
- mbedtls_ssl_conf_dh_param_ctx
73+
- mbedtls_ssl_conf_dhm_min_bitlen
74+
* Remove support for the RSA key exchange in TLS 1.2.
75+
* Remove mbedtls_low_level_strerr() and mbedtls_high_level_strerr(),
76+
since these concepts no longer exists. There is just mbedtls_strerror().
77+
* Sample programs for the legacy crypto API have been removed.
78+
pkey/rsa_genkey.c
79+
pkey/pk_decrypt.c
80+
pkey/dh_genprime.c
81+
pkey/rsa_verify.c
82+
pkey/mpi_demo.c
83+
pkey/rsa_decrypt.c
84+
pkey/key_app.c
85+
pkey/dh_server.c
86+
pkey/ecdh_curve25519.c
87+
pkey/pk_encrypt.c
88+
pkey/rsa_sign.c
89+
pkey/key_app_writer.c
90+
pkey/dh_client.c
91+
pkey/ecdsa.c
92+
pkey/rsa_encrypt.c
93+
wince_main.c
94+
aes/crypt_and_hash.c
95+
random/gen_random_ctr_drbg.c
96+
random/gen_entropy.c
97+
hash/md_hmac_demo.c
98+
hash/hello.c
99+
hash/generic_sum.c
100+
cipher/cipher_aead_demo.c
101+
* Remove compat-2-x.h header from mbedtls.
102+
* The library no longer offers interfaces to look up values by OID
103+
or OID by enum values.
104+
The header <mbedtls/oid.h> now only defines functions to convert
105+
between binary and dotted string OID representations, and macros
106+
for OID strings that are relevant to X.509.
107+
The compilation option MBEDTLS_OID_C no longer
108+
exists. OID tables are included in the build automatically as needed.
109+
* The header <mbedtls/check_config.h> no longer exists. Including it
110+
from a custom config file was no longer needed since Mbed TLS 3.0,
111+
and could lead to spurious errors. The checks that it performed are
112+
now done automatically when building the library.
113+
* Support for secp192k1, secp192r1, secp224k1 and secp224r1 EC curves is
114+
removed from TLS.
115+
* Remove mbedtls_pk_type_t from the public interface and replace it with
116+
mbedtls_pk_sigalg_t.
117+
* Remove MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT. Now only the
118+
standard version (defined in RFC 9146) of DTLS connection ID is supported.
119+
* Remove mbedtls_ssl_conf_min_version(), mbedtls_ssl_conf_max_version(), and
120+
the associated constants MBEDTLS_SSL_MAJOR_VERSION_x and
121+
MBEDTLS_SSL_MINOR_VERSION_y. Use mbedtls_ssl_conf_min_tls_version() and
122+
mbedtls_ssl_conf_max_tls_version() with MBEDTLS_SSL_VERSION_TLS1_y instead.
123+
Note that the new names of the new constants use the TLS protocol versions,
124+
unlike the old constants whose names are based on internal encodings.
125+
* Remove mbedtls_ssl_conf_sig_hashes(). Use mbedtls_ssl_conf_sig_algs()
126+
instead.
127+
* Removed all public key sample programs from the programs/pkey
128+
directory.
129+
* Removed support for TLS 1.2 static ECDH key
130+
exchanges (ECDH-ECDSA and ECDH-RSA).
131+
* Drop support for the GNU Make and Microsoft Visual Studio build systems.
132+
133+
Features
134+
* Add the function mbedtls_ssl_export_keying_material() which allows the
135+
client and server to extract additional shared symmetric keys from an SSL
136+
session, according to the TLS-Exporter specification in RFC 8446 and 5705.
137+
This requires MBEDTLS_SSL_KEYING_MATERIAL_EXPORT to be defined in
138+
mbedtls_config.h.
139+
140+
Security
141+
* With TLS 1.3, when a server enables optional authentication of the
142+
client, if the client-provided certificate does not have appropriate values
143+
in keyUsage or extKeyUsage extensions, then the return value of
144+
mbedtls_ssl_get_verify_result() would incorrectly have the
145+
MBEDTLS_X509_BADCERT_KEY_USAGE and MBEDTLS_X509_BADCERT_EXT_KEY_USAGE bits
146+
clear. As a result, an attacker that had a certificate valid for uses other
147+
than TLS client authentication could be able to use it for TLS client
148+
authentication anyway. Only TLS 1.3 servers were affected, and only with
149+
optional authentication (required would abort the handshake with a fatal
150+
alert).
151+
CVE-2024-45159
152+
* Note that TLS clients should generally call mbedtls_ssl_set_hostname()
153+
if they use certificate authentication (i.e. not pre-shared keys).
154+
Otherwise, in many scenarios, the server could be impersonated.
155+
The library will now prevent the handshake and return
156+
MBEDTLS_ERR_SSL_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME
157+
if mbedtls_ssl_set_hostname() has not been called.
158+
Reported by Daniel Stenberg.
159+
CVE-2025-27809
160+
* Fix a vulnerability in the TLS 1.2 handshake. If memory allocation failed
161+
or there was a cryptographic hardware failure when calculating the
162+
Finished message, it could be calculated incorrectly. This would break
163+
the security guarantees of the TLS handshake.
164+
CVE-2025-27810
165+
* Fix possible use-after-free or double-free in code calling
166+
mbedtls_x509_string_to_names(). This was caused by the function calling
167+
mbedtls_asn1_free_named_data_list() on its head argument, while the
168+
documentation did no suggest it did, making it likely for callers relying
169+
on the documented behaviour to still hold pointers to memory blocks after
170+
they were free()d, resulting in high risk of use-after-free or double-free,
171+
with consequences ranging up to arbitrary code execution.
172+
In particular, the two sample programs x509/cert_write and x509/cert_req
173+
were affected (use-after-free if the san string contains more than one DN).
174+
Code that does not call mbedtls_string_to_names() directly is not affected.
175+
Found by Linh Le and Ngan Nguyen from Calif.
176+
CVE-2025-47917
177+
* Fix a bug in mbedtls_x509_string_to_names() and the
178+
mbedtls_x509write_{crt,csr}_set_{subject,issuer}_name() functions,
179+
where some inputs would cause an inconsistent state to be reached, causing
180+
a NULL dereference either in the function itself, or in subsequent
181+
users of the output structure, such as mbedtls_x509_write_names(). This
182+
only affects applications that create (as opposed to consume) X.509
183+
certificates, CSRs or CRLs. Found by Linh Le and Ngan Nguyen from Calif.
184+
CVE-2025-48965
185+
* Fix a bug in tf-psa-crypto's mbedtls_asn1_store_named_data() where it
186+
would sometimes leave an item in the output list in an inconsistent
187+
state with val.p == NULL but val.len > 0. Affected functions used in X.509
188+
would then dereference a NULL pointer. Applications that do not
189+
call this function (directly, or indirectly through X.509 writing) are not
190+
affected. Found by Linh Le and Ngan Nguyen from Calif.
191+
192+
Bugfix
193+
* Fix TLS 1.3 client build and runtime when support for session tickets is
194+
disabled (MBEDTLS_SSL_SESSION_TICKETS configuration option). Fixes #6395.
195+
* Fix compilation error when memcpy() is a function-like macros. Fixes #8994.
196+
* Fix Clang compilation error when finite-field Diffie-Hellman is disabled.
197+
Reported by Michael Schuster in #9188.
198+
* Fix server mode only build when MBEDTLS_SSL_SRV_C is enabled but
199+
MBEDTLS_SSL_CLI_C is disabled. Reported by M-Bab on GitHub in #9186.
200+
* Fixes an issue where some TLS 1.2 clients could not connect to an
201+
Mbed TLS 3.6.0 server, due to incorrect handling of
202+
legacy_compression_methods in the ClientHello.
203+
fixes #8995, #9243.
204+
* Fixed a regression introduced in 3.6.0 where the CA callback set with
205+
mbedtls_ssl_conf_ca_cb() would stop working when connections were
206+
upgraded to TLS 1.3. Fixed by adding support for the CA callback with TLS
207+
1.3.
208+
* Fixed a regression introduced in 3.6.0 where clients that relied on
209+
optional/none authentication mode, by calling mbedtls_ssl_conf_authmode()
210+
with MBEDTLS_SSL_VERIFY_OPTIONAL or MBEDTLS_SSL_VERIFY_NONE, would stop
211+
working when connections were upgraded to TLS 1.3. Fixed by adding
212+
support for optional/none with TLS 1.3 as well. Note that the TLS 1.3
213+
standard makes server authentication mandatory; users are advised not to
214+
use authmode none, and to carefully check the results when using optional
215+
mode.
216+
* Fixed a regression introduced in 3.6.0 where context-specific certificate
217+
verify callbacks, set with mbedtls_ssl_set_verify() as opposed to
218+
mbedtls_ssl_conf_verify(), would stop working when connections were
219+
upgraded to TLS 1.3. Fixed by adding support for context-specific verify
220+
callback in TLS 1.3.
221+
* When MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE is disabled, work with
222+
peers that have middlebox compatibility enabled, as long as no
223+
problematic middlebox is in the way. Fixes #9551.
224+
* Use 'mbedtls_net_close' instead of 'close' in 'mbedtls_net_bind'
225+
and 'mbedtls_net_connect' to prevent possible double close fd
226+
problems. Fixes #9711.
227+
* Fix compilation on MS-DOS DJGPP. Fixes #9813.
228+
* Support re-assembly of fragmented handshake messages in TLS (both
229+
1.2 and 1.3). The lack of support was causing handshake failures with
230+
some servers, especially with TLS 1.3 in practice. There are a few
231+
limitations, notably a fragmented ClientHello is only supported when
232+
TLS 1.3 support is enabled. See the documentation of
233+
mbedtls_ssl_handshake() for details.
234+
* Fix definition of MBEDTLS_PRINTF_SIZET to prevent runtime crashes that
235+
occurred whenever SSL debugging was enabled on a copy of Mbed TLS built
236+
with Visual Studio 2013 or MinGW.
237+
Fixes #10017.
238+
* Silence spurious -Wunterminated-string-initialization warnings introduced
239+
by GCC 15. Fixes #9944.
240+
* Fix potential CMake parallel build failure when building both the static
241+
and shared libraries.
242+
* Fix a build error or incorrect TLS session
243+
lifetime on platforms where mbedtls_time_t
244+
is not time_t. Fixes #10236.
245+
246+
Changes
247+
* Functions regarding numeric string conversions for OIDs have been moved
248+
from the OID module and now reside in X.509 module. This helps to reduce
249+
the code size as these functions are not commonly used outside of X.509.
250+
* Move the crypto part of the library (content of tf-psa-crypto directory)
251+
from the Mbed TLS to the TF-PSA-Crypto repository. The crypto code and
252+
tests development will now occur in TF-PSA-Crypto, which Mbed TLS
253+
references as a Git submodule.
254+
* The function mbedtls_x509_string_to_names() now requires its head argument
255+
to point to NULL on entry. This makes it likely that existing risky uses of
256+
this function (see the entry in the Security section) will be detected and
257+
fixed.
258+
3259
= Mbed TLS 3.6.0 branch released 2024-03-28
4260

5261
API changes

ChangeLog.d/10285.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

ChangeLog.d/9684.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

ChangeLog.d/9685.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

ChangeLog.d/9874.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

ChangeLog.d/9892.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

ChangeLog.d/9956.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

ChangeLog.d/9964.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

ChangeLog.d/add-tls-exporter.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

ChangeLog.d/check_config.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)