go/src/math/big
Katie Hockman 1e1fa5903b 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>
Reviewed-on: https://go-review.googlesource.com/c/go/+/269657
Trust: Katie Hockman <katie@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2020-11-12 20:42:40 +00:00
..
accuracy_string.go
arith.go math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_386.s math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_amd64.go
arith_amd64.s math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_arm.s math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_arm64.s math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_decl.go math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_decl_pure.go math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_decl_s390x.go math/big: simplify hasVX checking on s390x 2020-04-27 20:20:53 +00:00
arith_mips64x.s math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_mipsx.s math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_ppc64x.s math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_riscv64.s math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_s390x.s math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_s390x_test.go math/big: rewrite subVW to use fast path on s390x 2020-04-24 14:50:59 +00:00
arith_test.go math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
arith_wasm.s math/big: replace division with multiplication by reciprocal word 2020-09-23 21:55:55 +00:00
bits_test.go
calibrate_test.go
decimal.go math/big: reduce allocations for building decimal strings 2020-10-29 22:45:29 +00:00
decimal_test.go
doc.go
example_rat_test.go
example_test.go math/big: add function example 2020-08-26 16:15:32 +00:00
float.go math/big: add a comment for SetMantExp 2020-08-28 16:25:32 +00:00
float_test.go
floatconv.go math/big: don't use Float in init to help linker discard 162 KiB 2020-04-14 20:50:19 +00:00
floatconv_test.go math/big: avoid MinExp exponent wrap-around in 'x' Text format 2019-09-18 04:48:34 +00:00
floatexample_test.go
floatmarsh.go
floatmarsh_test.go all: shorten some tests 2019-05-22 12:54:00 +00:00
ftoa.go math/big: avoid MinExp exponent wrap-around in 'x' Text format 2019-09-18 04:48:34 +00:00
gcd_test.go
hilbert_test.go
int.go math/big: add (*Int).FillBytes 2020-05-05 00:36:44 +00:00
int_test.go math/big: add (*Int).FillBytes 2020-05-05 00:36:44 +00:00
intconv.go math/big: document Int.String 2019-05-03 03:25:26 +00:00
intconv_test.go
intmarsh.go
intmarsh_test.go
link_test.go testing: clean up remaining TempDir issues from CL 231958 2020-05-19 19:55:14 +00:00
nat.go math/big: fix shift for recursive division 2020-11-12 20:42:40 +00:00
nat_test.go math/big: correct off-by-one access in divBasic 2020-04-08 20:53:58 +00:00
natconv.go
natconv_test.go all: shorten some tests 2019-05-22 12:54:00 +00:00
prime.go
prime_test.go all: shorten some tests 2019-05-22 12:54:00 +00:00
rat.go math/big: make Rat.Denom side-effect free 2019-10-24 03:34:24 +00:00
rat_test.go math/big: make Rat.Denom side-effect free 2019-10-24 03:34:24 +00:00
ratconv.go math/big: fix a duplicate "the" in a comment 2019-09-02 11:42:47 +00:00
ratconv_test.go
ratmarsh.go
ratmarsh_test.go
roundingmode_string.go
sqrt.go math/big: remove Direct Sqrt computation 2020-04-15 16:37:53 +00:00
sqrt_test.go all: shorten some tests 2019-05-22 12:54:00 +00:00