From 9678b5dccd42d745f734db01a7223007f580982f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 11 Feb 2016 10:35:13 +0100 Subject: [PATCH] Add precision about exploitability in ChangeLog Also fix some whitespace while at it. --- ChangeLog | 1 + library/rsa.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cff532e9c..5b88a2506 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ mbed TLS ChangeLog (Sorted per branch, date) Security * Fix potential integer overflow to buffer overflow in mbedtls_rsa_rsaes_pkcs1_v15_encrypt and mbedtls_rsa_rsaes_oaep_encrypt + (not triggerable remotely in (D)TLS). Bugfix * Fix bug in mbedtls_mpi_add_mpi() that caused wrong results when the three diff --git a/library/rsa.c b/library/rsa.c index 3cb92f40c..9150e8745 100644 --- a/library/rsa.c +++ b/library/rsa.c @@ -595,7 +595,7 @@ int mbedtls_rsa_rsaes_pkcs1_v15_encrypt( mbedtls_rsa_context *ctx, return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); olen = ctx->len; - + // first comparison checks for overflow if( ilen + 11 < ilen || olen < ilen + 11 ) return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );