-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
mbedtls_ssl_get_record_expansion() returns wrong result for CBC suites in TLS >= 1.1 #1914
Labels
Comments
ARM Internal Ref: IOTSSL-2462 |
mpg
added a commit
to mpg/mbedtls
that referenced
this issue
Aug 13, 2018
fixes Mbed-TLS#1914 TODO: needs backports
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Aug 14, 2018
fixes Mbed-TLS#1914 TODO: needs backports
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Aug 17, 2018
`mbedtls_ssl_get_record_expansion()` is supposed to return the maximum difference between the size of a protected record and the size of the encapsulated plaintext. Previously, it did not correctly estimate the maximum record expansion in case of CBC ciphersuites in (D)TLS versions 1.1 and higher, in which case the ciphertext is prefixed by an explicit IV. This commit fixes this bug. Fixes Mbed-TLS#1914.
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Aug 17, 2018
`mbedtls_ssl_get_record_expansion()` is supposed to return the maximum difference between the size of a protected record and the size of the encapsulated plaintext. Previously, it did not correctly estimate the maximum record expansion in case of CBC ciphersuites in (D)TLS versions 1.1 and higher, in which case the ciphertext is prefixed by an explicit IV. This commit fixes this bug. Fixes Mbed-TLS#1914.
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Aug 17, 2018
`mbedtls_ssl_get_record_expansion()` is supposed to return the maximum difference between the size of a protected record and the size of the encapsulated plaintext. Previously, it did not correctly estimate the maximum record expansion in case of CBC ciphersuites in (D)TLS versions 1.1 and higher, in which case the ciphertext is prefixed by an explicit IV. This commit fixes this bug. Fixes Mbed-TLS#1914.
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Aug 17, 2018
`mbedtls_ssl_get_record_expansion()` is supposed to return the maximum difference between the size of a protected record and the size of the encapsulated plaintext. Previously, it did not correctly estimate the maximum record expansion in case of CBC ciphersuites in (D)TLS versions 1.1 and higher, in which case the ciphertext is prefixed by an explicit IV. This commit fixes this bug. Fixes Mbed-TLS#1914.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
mbedtls_ssl_get_record_expansion()
in IOTSSL-165 DTLS handshake fragmentation #1879Bug
OS
All
Mbed TLS build:
Version: all versions supporting (D)TLS 1.1 or higher.
Configuration: Any configuration allowing (D)TLS 1.1 or higher.
Description
The public function
mbedtls_ssl_get_record_expansion()
is supposed to return the maximum difference between the length of a protected record and the length of the plaintext it encapsulates, with respect to the currently enabled outgoing record protection.In (D)TLS 1.1 or higher, CBC ciphersuites use an explicit initialization vector at the beginning of the record which is not taken into account in
In total, there are three components contributing to the expansion: Pre-expansion due to explicit IV, post-expansion due to MAC, post-expansion due to padding.
Impact
Currently, there is no internal impact on the library as Mbed TLS does not use
mbedtls_ssl_get_record_expansion()
. However, PR #1879 starts to make use ofmbedtls_ssl_get_record_expansion()
to deduce the maximum plaintext length from the maximum MTU, and miscalculation will lead to Mbed TLS not obeying the MTU.The text was updated successfully, but these errors were encountered: