Fix incrementing pointer instead of value #354

Merged
mpg merged 1 commit from fix-ecdsa-pointer-inc into development 2020-01-28 02:26:29 -06:00
mpg commented 2020-01-24 05:40:53 -06:00 (Migrated from github.com)

This was introduced by a hasty search-and-replace that embarrassingly didn't account for C's
operator precedence when changing those variables to pointer types.

Backports

ChangeLog entry

### Security

* Fix potential memory overread when performing an ECDSA signature
  operation. The overread only happens with cryptographically low
  probability (of the order of 2^-n where n is the bitsize of the curve)
  unless the RNG is broken, and could result in information disclosure or
  denial of service (application crash or extra resource consumption).
  Found by Auke Zeilstra and Peter Schwabe, using static analysis.
This was introduced by a hasty search-and-replace that embarrassingly didn't account for C's operator precedence when changing those variables to pointer types. ## Backports - [x] Mbed TLS 2.16: https://github.com/ARMmbed/mbedtls/pull/3007 - [x] Mbed TLS 2.7 is not affected (restartable ECC not introduced yet, so these variables are not pointers). ## ChangeLog entry ``` ### Security * Fix potential memory overread when performing an ECDSA signature operation. The overread only happens with cryptographically low probability (of the order of 2^-n where n is the bitsize of the curve) unless the RNG is broken, and could result in information disclosure or denial of service (application crash or extra resource consumption). Found by Auke Zeilstra and Peter Schwabe, using static analysis. ```
yanesca (Migrated from github.com) approved these changes 2020-01-24 09:23:56 -06:00
yanesca (Migrated from github.com) left a comment

LGTM

LGTM
mpg commented 2020-01-27 03:33:06 -06:00 (Migrated from github.com)

The CI passes all tests except the ones involving Mbed OS, which is a known issue independent from this PR, so it's as good as a pass as far as merging this PR is concerned.

The CI passes all tests except the ones involving Mbed OS, which is a known issue independent from this PR, so it's as good as a pass as far as merging this PR is concerned.
gilles-peskine-arm (Migrated from github.com) approved these changes 2020-01-27 11:36:20 -06:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-ARMmbed/mbed-crypto!354
No description provided.