forked from Mbed-TLS/mbedtls
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mbedtls_mpi_sub_abs: fix buffer overflow in error case
Fix a buffer overflow in mbedtls_mpi_sub_abs() when calculating |A| - |B| where |B| is larger than |A| and has more limbs (so the function should return MBEDTLS_ERR_MPI_NEGATIVE_VALUE). Fix Mbed-TLS#4042 Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
- Loading branch information
1 parent
9a3cf31
commit 6260b70
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Security | ||
* Fix a buffer overflow in mbedtls_mpi_sub_abs() when calculating | ||
|A| - |B| where |B| is larger than |A| and has more limbs (so the | ||
function should return MBEDTLS_ERR_MPI_NEGATIVE_VALUE). Only | ||
applications calling mbedtls_mpi_sub_abs() directly are affected: | ||
all calls inside the library were safe since this function is | ||
only called with |A| >= |B|. Reported by Guido Vranken in #4042. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters