Skip to content

Commit

Permalink
Merge pull request #978 from Mbed-TLS/mbedtls-2.28.2rc0-pr
Browse files Browse the repository at this point in the history
Mbedtls 2.28.2rc0 pr [DO NOT MERGE]
  • Loading branch information
daverodgman committed Dec 12, 2022
2 parents 5c581dd + d6f774f commit 89f040a
Show file tree
Hide file tree
Showing 27 changed files with 185 additions and 119 deletions.
3 changes: 2 additions & 1 deletion BRANCHES.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The following branches are currently maintained:
- [master](https://github.com/Mbed-TLS/mbedtls/tree/master)
- [`development`](https://github.com/Mbed-TLS/mbedtls/)
- [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28)
maintained until at least the end of 2024.
maintained until at least the end of 2024, see
<https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.2>.

Users are urged to always use the latest version of a maintained branch.
69 changes: 69 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,74 @@
Mbed TLS ChangeLog (Sorted per branch, date)

= Mbed TLS 2.28.2 branch released 2022-12-14

Security
* Fix potential heap buffer overread and overwrite in DTLS if
MBEDTLS_SSL_DTLS_CONNECTION_ID is enabled and
MBEDTLS_SSL_CID_IN_LEN_MAX > 2 * MBEDTLS_SSL_CID_OUT_LEN_MAX.
* An adversary with access to precise enough information about memory
accesses (typically, an untrusted operating system attacking a secure
enclave) could recover an RSA private key after observing the victim
performing a single private-key operation if the window size used for the
exponentiation was 3 or smaller. Found and reported by Zili KOU,
Wenjian HE, Sharad Sinha, and Wei ZHANG. See "Cache Side-channel Attacks
and Defenses of the Sliding Window Algorithm in TEEs" - Design, Automation
and Test in Europe 2023.

Bugfix
* Fix a long-standing build failure when building x86 PIC code with old
gcc (4.x). The code will be slower, but will compile. We do however
recommend upgrading to a more recent compiler instead. Fixes #1910.
* Fix support for little-endian Microblaze when MBEDTLS_HAVE_ASM is defined.
Contributed by Kazuyuki Kimura to fix #2020.
* Use double quotes to include private header file psa_crypto_cipher.h.
Fixes 'file not found with <angled> include' error
when building with Xcode.
* Fix handling of broken symlinks when loading certificates using
mbedtls_x509_crt_parse_path(). Instead of returning an error as soon as a
broken link is encountered, skip the broken link and continue parsing
other certificate files. Contributed by Eduardo Silva in #2602.
* Fix a compilation error when using CMake with an IAR toolchain.
Fixes #5964.
* Fix bugs and missing dependencies when building and testing
configurations with only one encryption type enabled in TLS 1.2.
* Provide the missing definition of mbedtls_setbuf() in some configurations
with MBEDTLS_PLATFORM_C disabled. Fixes #6118, #6196.
* Fix compilation errors when trying to build with
PSA drivers for AEAD (GCM, CCM, Chacha20-Poly1305).
* Fix memory leak in ssl_parse_certificate_request() caused by
mbedtls_x509_get_name() not freeing allocated objects in case of error.
Change mbedtls_x509_get_name() to clean up allocated objects on error.
* Fix checks on PK in check_config.h for builds with PSA and RSA. This does
not change which builds actually work, only moving a link-time error to
an early check.
* Fix ECDSA verification, where it was not always validating the
public key. This bug meant that it was possible to verify a
signature with an invalid public key, in some cases. Reported by
Guido Vranken using Cryptofuzz in #4420.
* Fix a possible null pointer dereference if a memory allocation fails
in TLS PRF code. Reported by Michael Madsen in #6516.
* Fix a bug in which mbedtls_x509_crt_info() would produce non-printable
bytes when parsing certificates containing a binary RFC 4108
HardwareModuleName as a Subject Alternative Name extension. Hardware
serial numbers are now rendered in hex format. Fixes #6262.
* Fix bug in error reporting in dh_genprime.c where upon failure,
the error code returned by mbedtls_mpi_write_file() is overwritten
and therefore not printed.
* In the bignum module, operations of the form (-A) - (+A) or (-A) - (-A)
with A > 0 created an unintended representation of the value 0 which was
not processed correctly by some bignum operations. Fix this. This had no
consequence on cryptography code, but might affect applications that call
bignum directly and use negative numbers.
* Fix undefined behavior (typically harmless in practice) of
mbedtls_mpi_add_mpi(), mbedtls_mpi_add_abs() and mbedtls_mpi_add_int()
when both operands are 0 and the left operand is represented with 0 limbs.
* Fix undefined behavior (typically harmless in practice) when some bignum
functions receive the most negative value of mbedtls_mpi_sint. Credit
to OSS-Fuzz. Fixes #6597.
* Fix undefined behavior (typically harmless in practice) in PSA ECB
encryption and decryption.

= Mbed TLS 2.28.1 branch released 2022-07-11

Default behavior changes
Expand Down
4 changes: 0 additions & 4 deletions ChangeLog.d/bn_mul-fix-x86-pic-compilation-for-gcc-4.txt

This file was deleted.

5 changes: 0 additions & 5 deletions ChangeLog.d/ecdsa-verify-fixes.txt

This file was deleted.

3 changes: 0 additions & 3 deletions ChangeLog.d/fix_aead_psa_driver_build.txt

This file was deleted.

3 changes: 0 additions & 3 deletions ChangeLog.d/fix_build_tls1_2_with_single_encryption_type.txt

This file was deleted.

3 changes: 0 additions & 3 deletions ChangeLog.d/fix_cmake_using_iar_toolchain.txt

This file was deleted.

4 changes: 0 additions & 4 deletions ChangeLog.d/fix_dh_genprime_error_reporting.txt

This file was deleted.

4 changes: 0 additions & 4 deletions ChangeLog.d/fix_psa_crypto_cipher_h_include.txt

This file was deleted.

4 changes: 0 additions & 4 deletions ChangeLog.d/fix_x509_get_name_mem_leak.txt

This file was deleted.

5 changes: 0 additions & 5 deletions ChangeLog.d/fix_x509_info_hwmodulename.txt

This file was deleted.

3 changes: 0 additions & 3 deletions ChangeLog.d/fix_zeroization.txt

This file was deleted.

4 changes: 0 additions & 4 deletions ChangeLog.d/mpi-add-0-ub.txt

This file was deleted.

4 changes: 0 additions & 4 deletions ChangeLog.d/mpi-most-negative-sint.txt

This file was deleted.

3 changes: 0 additions & 3 deletions ChangeLog.d/muladdc_microblaze.txt

This file was deleted.

6 changes: 0 additions & 6 deletions ChangeLog.d/negative-zero-from-add.txt

This file was deleted.

3 changes: 0 additions & 3 deletions ChangeLog.d/platform-setbuf.txt

This file was deleted.

3 changes: 0 additions & 3 deletions ChangeLog.d/psa-ecb-ub.txt

This file was deleted.

4 changes: 0 additions & 4 deletions ChangeLog.d/psa_rsa_needs_pk.txt

This file was deleted.

5 changes: 0 additions & 5 deletions ChangeLog.d/x509-broken-symlink-handling.txt

This file was deleted.

2 changes: 1 addition & 1 deletion doxygen/input/doc_mainpage.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

/**
* @mainpage mbed TLS v2.28.1 source code documentation
* @mainpage mbed TLS v2.28.2 source code documentation
*
* This documentation describes the internal structure of mbed TLS. It was
* automatically generated from specially formatted comment blocks in
Expand Down
2 changes: 1 addition & 1 deletion doxygen/mbedtls.doxyfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT_NAME = "mbed TLS v2.28.1"
PROJECT_NAME = "mbed TLS v2.28.2"
OUTPUT_DIRECTORY = ../apidoc/
FULL_PATH_NAMES = NO
OPTIMIZE_OUTPUT_FOR_C = YES
Expand Down
2 changes: 1 addition & 1 deletion include/mbedtls/ssl_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ struct mbedtls_ssl_transform
#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
uint8_t in_cid_len;
uint8_t out_cid_len;
unsigned char in_cid [ MBEDTLS_SSL_CID_OUT_LEN_MAX ];
unsigned char in_cid [ MBEDTLS_SSL_CID_IN_LEN_MAX ];
unsigned char out_cid[ MBEDTLS_SSL_CID_OUT_LEN_MAX ];
#endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */

Expand Down
8 changes: 4 additions & 4 deletions include/mbedtls/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@
*/
#define MBEDTLS_VERSION_MAJOR 2
#define MBEDTLS_VERSION_MINOR 28
#define MBEDTLS_VERSION_PATCH 1
#define MBEDTLS_VERSION_PATCH 2

/**
* The single version number has the following structure:
* MMNNPP00
* Major version | Minor version | Patch version
*/
#define MBEDTLS_VERSION_NUMBER 0x021C0100
#define MBEDTLS_VERSION_STRING "2.28.1"
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.28.1"
#define MBEDTLS_VERSION_NUMBER 0x021C0200
#define MBEDTLS_VERSION_STRING "2.28.2"
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.28.2"

#if defined(MBEDTLS_VERSION_C)

Expand Down
6 changes: 3 additions & 3 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ endif(USE_STATIC_MBEDTLS_LIBRARY)
if(USE_SHARED_MBEDTLS_LIBRARY)
set(CMAKE_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR})
add_library(${mbedcrypto_target} SHARED ${src_crypto})
set_target_properties(${mbedcrypto_target} PROPERTIES VERSION 2.28.1 SOVERSION 7)
set_target_properties(${mbedcrypto_target} PROPERTIES VERSION 2.28.2 SOVERSION 7)
target_link_libraries(${mbedcrypto_target} PUBLIC ${libs})

add_library(${mbedx509_target} SHARED ${src_x509})
set_target_properties(${mbedx509_target} PROPERTIES VERSION 2.28.1 SOVERSION 1)
set_target_properties(${mbedx509_target} PROPERTIES VERSION 2.28.2 SOVERSION 1)
target_link_libraries(${mbedx509_target} PUBLIC ${libs} ${mbedcrypto_target})

add_library(${mbedtls_target} SHARED ${src_tls})
set_target_properties(${mbedtls_target} PROPERTIES VERSION 2.28.1 SOVERSION 14)
set_target_properties(${mbedtls_target} PROPERTIES VERSION 2.28.2 SOVERSION 14)
target_link_libraries(${mbedtls_target} PUBLIC ${libs} ${mbedx509_target})
endif(USE_SHARED_MBEDTLS_LIBRARY)

Expand Down
Loading

0 comments on commit 89f040a

Please sign in to comment.