]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.14-security] math/big: fix shift for recursive division
authorKatie Hockman <katie@golang.org>
Tue, 10 Nov 2020 20:54:12 +0000 (15:54 -0500)
committerFilippo Valsorda <filippo@golang.org>
Thu, 12 Nov 2020 14:40:27 +0000 (15:40 +0100)
commitf7a1fcf7a55d6b0bc97b02f5b9dd4a15d54aeafa
treeab212f6ca16a70cec8dd44d7985f1e9e658fe668
parentff5addb6be2fb3001f0cb026c3e4931090a85664
[release-branch.go1.14-security] math/big: fix shift for recursive division

The previous s value could cause a crash
for certain inputs.

Will check in tests and documentation improvements later.

Thanks to the Go Ethereum team and the OSS-Fuzz project for reporting this.
Thanks to Rémy Oudompheng and Robert Griesemer for their help
developing and validating the fix.

Fixes CVE-2020-28362

Change-Id: Ibbf455c4436bcdb07c84a34fa6551fb3422356d3
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/899974
Reviewed-by: Roland Shoemaker <bracewell@google.com>
Reviewed-by: Filippo Valsorda <valsorda@google.com>
(cherry picked from commit 28015462c2a83239543dc2bef651e9a5f234b633)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/901064
src/math/big/nat.go