Skip to content

external/mbedtls: Upgrade version of MbedTLS v2.7.8 - #2586

Merged
pillip8282 merged 7 commits into
Samsung:masterfrom
SeonghoByeon:mbedtls_versionup
Jan 15, 2019
Merged

pillip8282 merged 7 commits into
Samsung:masterfrom
SeonghoByeon:mbedtls_versionup

Conversation

@SeonghoByeon

@SeonghoByeon SeonghoByeon commented Jan 8, 2019 •

Copy link
Copy Markdown
Contributor

1. external/mbedtls: Upgrade version of MbedTLS v2.7.5

  • Version 2.7.x becomes long-term support (stable version)
  • Due to critical CVEs confirmed in early 2018, CVE-2018-0488, CVE-2018-0487, CVE-2018-0498, and CVE-2018-0499, there was a need to upgrade, and since 2.7.x branch was chosen for long-term support, we chose to upgrade to the latest version in the branch, which was 2.7.5.

2. external/mbedtls: Add system remain memory-check before handshake

  • This commit adds a memory check routine before TLS handshake.
  • Shortage of system memory such as heap, stack can make wrong behavior in handshake. So now we always check a "System remain memory" before handshaking.

3. external/mbedtls: Allow passing multiple root CA certs as a bundle

  • This patch modifies SSL parameters parsing to take certificate bundles into account. Calling applications can now pass several CA certificates to be trusted when performing server certificate verification.

4. external/mbedtls: Refactor SEE API definitions

  • Refactor SEE API definitions

5. external/mbedtls: apply ocf.patch in mbedtls library

  • This commit applies an ocf.patch file on mbedtls library.
  • "MBEDTLS_OCF_PATCH" configure is added in include/config.h for enabling ocf custom code.

6. external/mbedtls: Add extensions Raw Public Keys for handshake in tls

  • Extensions RPK must be added for CoAP requests in DTLS (for Artik Cloud Secure Coap Server for example).

7. external/mbedtls: Version up to 2.7.8

- Version 2.7.x becomes long-term support (stable version)
- Due to critical CVEs confirmed in early 2018, CVE-2018-0488, CVE-2018-0487, CVE-2018-0498, and CVE-2018-0499, there was a need to upgrade, and since 2.7.x branch was chosen for long-term support, we chose to upgrade to the latest version in the branch, which was 2.7.5.
- This commit addes a memory check routine before TLS handshake.
Shortage of system memory such as heap, stack can make wrong
behavior in handshake. So now we always check a "System remain memory"
before handshaking.
- This patch modifies SSL parameters parsing to take certificate bundles into account. Calling applications can now pass several CA certificates to be trusted when performing server certificate verifications.
@seinfra

seinfra commented Jan 8, 2019

Copy link
Copy Markdown

Target : [5f1f732dc7575b2efc238fd27ef9eb25fd67787c] - Code Rule Check (C++) OK.

@seinfra

seinfra commented Jan 8, 2019

Copy link
Copy Markdown

Target : [5f1f732dc7575b2efc238fd27ef9eb25fd67787c] - Code Rule Check OK.

Comment thread external/mbedtls/see_api.c Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If CERT_INDEX always starts at zero.
i think you don't need index >= SEE_MIN_CERT_INDEX this logic
index variable is unsinged int
so this value always has a value greater than zero.

i think SEE_MIN_CERT_INDEX is not necessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JeongJunSik Thanks for the comment. Modification completed.

@seinfra

seinfra commented Jan 14, 2019

Copy link
Copy Markdown

Target : [200a694d0cc389d0f0186b092b32d9e046c38ca6] - Code Rule Check (C++) OK.

@seinfra

seinfra commented Jan 14, 2019

Copy link
Copy Markdown

Target : [200a694d0cc389d0f0186b092b32d9e046c38ca6] - Code Rule Check OK.

- Refactor SEE API definitions
- This commit applies an ocf.patch file on mbedtls library.
- "MBEDTLS_OCF_PATCH" configure is added in include/config.h for enabling ocf custom code.

    https://github.com/iotivity/iotivity
- Extensions RPK must be added for CoAP requests in DTLS (for Artik Cloud Secure Coap Server for example).
Mbed TLS version 2.7.8 has now been released for maintenance.

This release addresses two security issues, one of which we are issuing Security Advisory 18-03 for
(https://tls.mbed.org/tech-updates/security-advisories/mbedtls-security-advisory-2018-03).
Mbed TLS 2.7.8 is maintenance release, and intentionally does not contain new features to avoid changing the library interface and allow users to change library versions easily.
@seinfra

seinfra commented Jan 14, 2019

Copy link
Copy Markdown

Target : [917b3aa3d330222dd54b673d5b45fa7d1c2dacdc] -

@SeonghoByeon

Copy link
Copy Markdown
Contributor Author

Hello,
I have successfully tested this PR for st_things configuration.
Easy-setup for either software key or hardware key works well.

@seinfra

seinfra commented Jan 14, 2019

Copy link
Copy Markdown

Target : [f5d5d26] - Code Rule Check OK.

@seinfra

seinfra commented Jan 14, 2019

Copy link
Copy Markdown

Target : [f5d5d26] - Code Rule Check (C++) OK.

@pillip8282 pillip8282 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@pillip8282
pillip8282 merged commit b5f2390 into Samsung:master Jan 15, 2019
@SeonghoByeon
SeonghoByeon deleted the mbedtls_versionup branch January 15, 2019 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants