]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.10-security] crypto/elliptic: reduce subtraction term to prevent...
authorFilippo Valsorda <filippo@golang.org>
Tue, 22 Jan 2019 21:02:41 +0000 (16:02 -0500)
committerJulie Qiu <julieqiu@google.com>
Wed, 23 Jan 2019 17:28:54 +0000 (17:28 +0000)
commitd5f2dc6a5ca30590b121622af8f918d4484d4946
tree750a11205d2eafc04aa2207d4b7fb3713c545fea
parentf5ff72d62301c4e9d0a78167fab5914ca12919bd
[release-branch.go1.10-security] crypto/elliptic: reduce subtraction term to prevent long busy loop

If beta8 is unusually large, the addition loop might take a very long
time to bring x3-beta8 back positive.

This would lead to a DoS vulnerability in the implementation of the
P-521 and P-384 elliptic curves that may let an attacker craft inputs
to ScalarMult that consume excessive amounts of CPU.

This fixes CVE-2019-6486.

Change-Id: Ia969e8b5bf5ac4071a00722de9d5e4d856d8071a
Reviewed-on: https://team-review.git.corp.google.com/c/399777
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
(cherry picked from commit 746d6abe2dfb9ce7609f8e1e1a8dcb7e221f423e)
Reviewed-on: https://team-review.git.corp.google.com/c/401143
Reviewed-by: Filippo Valsorda <valsorda@google.com>
src/crypto/elliptic/elliptic.go