Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unchecked return codes from MD functions in TLS #1314

Open
andresag01 opened this issue Jan 25, 2018 · 2 comments · May be fixed by #1421
Open

Unchecked return codes from MD functions in TLS #1314

andresag01 opened this issue Jan 25, 2018 · 2 comments · May be fixed by #1421

Comments

@andresag01
Copy link
Contributor

Description

  • Type: Enhancement
  • Priority: Major

There are several places where functions from the MD modules (md.h sha256.h sha512.h etc) are called in the TLS stack (ssl_tls.c in particular), but it is assumed that the underlying implementation of the MD functionality can never fail. However, this is not the case when the underlying implementation of the MD module is a hardware accelerator instead of the default Mbed TLS software implementation.

Given that the PR #1294 adds return codes to the MD modules to facilitate checking for errors, the code in the TLS stack should be revised to make use of the return values.

@ciarmcom
Copy link

ARM Internal Ref: IOTSSL-2049

@Alonof Alonof linked a pull request Mar 8, 2018 that will close this issue
4 tasks
@gilles-peskine-arm
Copy link
Contributor

gilles-peskine-arm commented Mar 19, 2018

It's not just in the TLS stack: there are also:

  • unchecked calls to mbedtls_md in x509_crt.c and x509write_csr.c
  • unchecked calls to HMAC functions in hmac_drbg.c
  • an unchecked call to mbedtls_md in test_suite_ecdsa.function
  • unchecked calls in sample programs: aescrypt2.c and crypt_and_hash.c

[I've checked and crossed out some of these that no longer apply - @davidhorstmann-arm]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants