mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-30 13:24:17 +01:00
Merge branch fix-base64-arithmetic-overflows
Fix potential integer overflows in the function mbedtls_base64_decode(). This overflow would mainly be exploitable in 32-bit systems and could cause buffer bound checks to be bypassed.
This commit is contained in:
commit
1ea2b05af4
@ -9,6 +9,8 @@ Bugfix
|
|||||||
cause buffer bound checks to be bypassed. Found by Eyal Itkin.
|
cause buffer bound checks to be bypassed. Found by Eyal Itkin.
|
||||||
* Fixed potential arithmetic overflow in mbedtls_md2_update() that could
|
* Fixed potential arithmetic overflow in mbedtls_md2_update() that could
|
||||||
cause buffer bound checks to be bypassed. Found by Eyal Itkin.
|
cause buffer bound checks to be bypassed. Found by Eyal Itkin.
|
||||||
|
* Fixed potential arithmetic overflow in mbedtls_base64_decode() that could
|
||||||
|
cause buffer bound checks to be bypassed. Found by Eyal Itkin.
|
||||||
|
|
||||||
= mbed TLS 2.1.6 branch released 2016-10-17
|
= mbed TLS 2.1.6 branch released 2016-10-17
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen,
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
n = ( ( n * 6 ) + 7 ) >> 3;
|
n = ( 6 * ( n >> 3 ) ) + ( ( 6 * ( n & 0x7 ) + 7 ) >> 3 );
|
||||||
n -= j;
|
n -= j;
|
||||||
|
|
||||||
if( dst == NULL || dlen < n )
|
if( dst == NULL || dlen < n )
|
||||||
|
Loading…
Reference in New Issue
Block a user