Skip to content

Commit dd79db1

Browse files
authored
Merge pull request #955 from Mbed-TLS/mbedtls-2.28.1rc0-pr
Mbed TLS 2.28.1rc0 pr
2 parents ada62f2 + fe9d08f commit dd79db1

Some content is hidden

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

47 files changed

+711
-186
lines changed

ChangeLog

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,98 @@
1-
mbed TLS ChangeLog (Sorted per branch, date)
1+
Mbed TLS ChangeLog (Sorted per branch, date)
2+
3+
= Mbed TLS 2.28.1 branch released 2022-07-11
4+
5+
Default behavior changes
6+
* mbedtls_cipher_set_iv will now fail with ChaCha20 and ChaCha20+Poly1305
7+
for IV lengths other than 12. The library was silently overwriting this
8+
length with 12, but did not inform the caller about it. Fixes #4301.
9+
10+
Features
11+
* When MBEDTLS_PSA_CRYPTO_CONFIG is enabled, you may list the PSA crypto
12+
feature requirements in the file named by the new macro
13+
MBEDTLS_PSA_CRYPTO_CONFIG_FILE instead of the default psa/crypto_config.h.
14+
Furthermore you may name an additional file to include after the main
15+
file with the macro MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE.
16+
17+
Security
18+
* Zeroize dynamically-allocated buffers used by the PSA Crypto key storage
19+
module before freeing them. These buffers contain secret key material, and
20+
could thus potentially leak the key through freed heap.
21+
* Fix a potential heap buffer overread in TLS 1.2 server-side when
22+
MBEDTLS_USE_PSA_CRYPTO is enabled, an opaque key (created with
23+
mbedtls_pk_setup_opaque()) is provisioned, and a static ECDH ciphersuite
24+
is selected. This may result in an application crash or potentially an
25+
information leak.
26+
* Fix a buffer overread in DTLS ClientHello parsing in servers with
27+
MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE enabled. An unauthenticated client
28+
or a man-in-the-middle could cause a DTLS server to read up to 255 bytes
29+
after the end of the SSL input buffer. The buffer overread only happens
30+
when MBEDTLS_SSL_IN_CONTENT_LEN is less than a threshold that depends on
31+
the exact configuration: 258 bytes if using mbedtls_ssl_cookie_check(),
32+
and possibly up to 571 bytes with a custom cookie check function.
33+
Reported by the Cybeats PSI Team.
34+
35+
Bugfix
36+
* Fix a memory leak if mbedtls_ssl_config_defaults() is called twice.
37+
* Fix several bugs (warnings, compiler and linker errors, test failures)
38+
in reduced configurations when MBEDTLS_USE_PSA_CRYPTO is enabled.
39+
* Fix a bug in (D)TLS curve negotiation: when MBEDTLS_USE_PSA_CRYPTO was
40+
enabled and an ECDHE-ECDSA or ECDHE-RSA key exchange was used, the
41+
client would fail to check that the curve selected by the server for
42+
ECDHE was indeed one that was offered. As a result, the client would
43+
accept any curve that it supported, even if that curve was not allowed
44+
according to its configuration. Fixes #5291.
45+
* Fix unit tests that used 0 as the file UID. This failed on some
46+
implementations of PSA ITS. Fixes #3838.
47+
* Fix API violation in mbedtls_md_process() test by adding a call to
48+
mbedtls_md_starts(). Fixes #2227.
49+
* Fix compile errors when MBEDTLS_HAVE_TIME is not defined. Add tests
50+
to catch bad uses of time.h.
51+
* Fix the library search path when building a shared library with CMake
52+
on Windows.
53+
* Fix bug in the alert sending function mbedtls_ssl_send_alert_message()
54+
potentially leading to corrupted alert messages being sent in case
55+
the function needs to be re-called after initially returning
56+
MBEDTLS_SSL_WANT_WRITE. Fixes #1916.
57+
* In configurations with MBEDTLS_SSL_DTLS_CONNECTION_ID enabled but none of
58+
MBEDTLS_SSL_HW_RECORD_ACCEL, MBEDTLS_SSL_EXPORT_KEYS or MBEDTLS_DEBUG_C,
59+
DTLS handshakes using CID would crash due to a null pointer dereference.
60+
Fix this. Fixes #3998.
61+
* Fix incorrect documentation of mbedtls_x509_crt_profile. The previous
62+
documentation stated that the `allowed_pks` field applies to signatures
63+
only, but in fact it does apply to the public key type of the end entity
64+
certificate, too. Fixes #1992.
65+
* Fix PSA cipher multipart operations using ARC4. Previously, an IV was
66+
required but discarded. Now, an IV is rejected, as it should be.
67+
* Fix undefined behavior in mbedtls_asn1_find_named_data(), where val is
68+
not NULL and val_len is zero.
69+
* psa_raw_key_agreement() now returns PSA_ERROR_BUFFER_TOO_SMALL when
70+
applicable. Fixes #5735.
71+
* Fix a bug in the x25519 example program where the removal of
72+
MBEDTLS_ECDH_LEGACY_CONTEXT caused the program not to run. Fixes #4901 and
73+
#3191.
74+
* Encode X.509 dates before 1/1/2000 as UTCTime rather than
75+
GeneralizedTime. Fixes #5465.
76+
* Fix order value of curve x448.
77+
* Fix string representation of DNs when outputting values containing commas
78+
and other special characters, conforming to RFC 1779. Fixes #769.
79+
* Silence a warning from GCC 12 in the selftest program. Fixes #5974.
80+
* Fix mbedtls_asn1_write_mpi() writing an incorrect encoding of 0.
81+
* Fix resource leaks in mbedtls_pk_parse_public_key() in low
82+
memory conditions.
83+
* Fix server connection identifier setting for outgoing encrypted records
84+
on DTLS 1.2 session resumption. After DTLS 1.2 session resumption with
85+
connection identifier, the Mbed TLS client now properly sends the server
86+
connection identifier in encrypted record headers. Fix #5872.
87+
* Fix a null pointer dereference when performing some operations on zero
88+
represented with 0 limbs (specifically mbedtls_mpi_mod_int() dividing
89+
by 2, and mbedtls_mpi_write_string() in base 2).
90+
* Fix record sizes larger than 16384 being sometimes accepted despite being
91+
non-compliant. This could not lead to a buffer overflow. In particular,
92+
application data size was already checked correctly.
93+
94+
Changes
95+
* Assume source files are in UTF-8 when using MSVC with CMake.
296

397
= mbed TLS 2.28.0 branch released 2021-12-17
498

ChangeLog.d/PSA-test-suites-NOT-using-UID-0.txt

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

ChangeLog.d/add-mbedtls_md_starts-to-mbedtls_md_process-test.txt

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

ChangeLog.d/alert_reentrant.txt

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

ChangeLog.d/asn1write-0-fix

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

ChangeLog.d/bug_x448.txt

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

ChangeLog.d/chacha20_invalid_iv_len_fix.txt

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

ChangeLog.d/cmake_msvc_utf8.txt

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

ChangeLog.d/doc-x509-profile-pk.txt

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

ChangeLog.d/dtls-cid-null.txt

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

0 commit comments

Comments
 (0)