go/src/math
Robert Griesemer df9ce19db6 [release-branch.go1.15] math/big: check for excessive exponents in Rat.SetString
Found by OSS-Fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33284

Thanks to Emmanuel Odeke for reporting this issue.

Updates #45910
Fixes #46305
Fixes CVE-2021-33198

Change-Id: I61e7b04dbd80343420b57eede439e361c0f7b79c
Reviewed-on: https://go-review.googlesource.com/c/go/+/316149
Trust: Robert Griesemer <gri@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
(cherry picked from commit 6c591f79b0)
Reviewed-on: https://go-review.googlesource.com/c/go/+/321831
Run-TryBot: Katie Hockman <katie@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2021-05-27 19:50:22 +00:00
..
big [release-branch.go1.15] math/big: check for excessive exponents in Rat.SetString 2021-05-27 19:50:22 +00:00
bits cmd/compile: clean up codegen for branch-on-carry on s390x 2020-04-22 20:11:06 +00:00
cmplx math/cmplx: handle special cases 2020-05-01 03:16:37 +00:00
rand math/rand: update comment to avoid use of ^ for exponentiation 2019-12-04 21:14:24 +00:00
abs.go
acos_s390x.s
acosh.go
acosh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
all_test.go math: correct Atan2(±y,+∞) = ±0 on s390x 2020-03-25 04:06:34 +00:00
arith_s390x.go math: simplify hasVX checking on s390x 2020-04-27 20:06:57 +00:00
arith_s390x_test.go
asin.go
asin_386.s
asin_s390x.s
asinh.go
asinh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
atan.go
atan2.go
atan2_386.s
atan2_s390x.s math: correct Atan2(±y,+∞) = ±0 on s390x 2020-03-25 04:06:34 +00:00
atan_386.s
atan_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
atanh.go
atanh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
bits.go
cbrt.go
cbrt_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
const.go
copysign.go
cosh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
dim.go
dim_amd64.s
dim_arm64.s
dim_riscv64.s math: implement Min/Max in riscv64 assembly 2020-05-04 17:29:13 +00:00
dim_s390x.s
erf.go
erf_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
erfc_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
erfinv.go
example_test.go math: add function examples. 2020-05-02 20:22:19 +00:00
exp.go
exp2_386.s
exp_amd64.s math: fix dead link to springerlink (now link.springer) 2020-05-29 14:33:50 +00:00
exp_arm64.s
exp_asm.go all: remove nacl (part 3, more amd64p32) 2019-10-10 22:38:38 +00:00
exp_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
expm1.go
expm1_386.s all: this big patch remove whitespace from assembly files 2018-10-03 15:28:51 +00:00
expm1_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
export_s390x_test.go
export_test.go math: use constant rather than variable for exported test threshold 2018-12-13 06:33:18 +00:00
floor.go
floor_386.s
floor_amd64.s
floor_arm64.s
floor_ppc64x.s
floor_s390x.s
floor_wasm.s
fma.go math, cmd/compile: rename Fma to FMA 2019-11-07 14:51:06 +00:00
frexp.go
frexp_386.s
gamma.go
huge_test.go math/cmplx: implement Payne-Hanek range reduction 2020-03-14 04:12:41 +00:00
hypot.go
hypot_386.s
hypot_amd64.s
j0.go all: s/cancelation/cancellation/ 2019-04-16 20:27:15 +00:00
j1.go all: s/cancelation/cancellation/ 2019-04-16 20:27:15 +00:00
jn.go math: use Sincos instead of Sin and Cos in Jn and Yn 2019-03-25 22:41:37 +00:00
ldexp.go
ldexp_386.s
lgamma.go
log.go
log1p.go math: fix ternary correction statement in Log1p 2019-01-07 18:57:45 +00:00
log1p_386.s
log1p_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
log10.go
log10_386.s
log10_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
log_386.s
log_amd64.s
log_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
logb.go
mod.go math: use Abs in Mod rather than if x < 0 { x = -x} 2018-10-04 17:32:44 +00:00
mod_386.s
modf.go
modf_386.s
modf_arm64.s
modf_ppc64x.s
nextafter.go
pow.go math: use Abs in Pow rather than if x < 0 { x = -x } 2018-10-04 17:33:04 +00:00
pow10.go
pow_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
remainder.go math: fix math.Remainder(-x,x) (for Inf > x > 0) 2019-03-15 14:52:51 +00:00
remainder_386.s
signbit.go all: use "reports whether" consistently in the few places that didn't 2018-11-02 22:47:58 +00:00
sin.go src, misc: apply gofmt 2019-02-19 20:38:28 +00:00
sin_s390x.s
sincos.go src, misc: apply gofmt 2019-02-19 20:38:28 +00:00
sinh.go
sinh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
sqrt.go
sqrt_386.s all: this big patch remove whitespace from assembly files 2018-10-03 15:28:51 +00:00
sqrt_amd64.s
sqrt_arm.s all: this big patch remove whitespace from assembly files 2018-10-03 15:28:51 +00:00
sqrt_arm64.s
sqrt_mipsx.s
sqrt_ppc64x.s
sqrt_riscv64.s math: implement Sqrt in assembly for riscv64 2020-02-25 16:43:26 +00:00
sqrt_s390x.s
sqrt_wasm.s
stubs_386.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_amd64.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_arm.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_arm64.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_mips64x.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_mipsx.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_ppc64x.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_riscv64.s math: implement Min/Max in riscv64 assembly 2020-05-04 17:29:13 +00:00
stubs_s390x.s math: simplify hasVX checking on s390x 2020-04-27 20:06:57 +00:00
stubs_wasm.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
tan.go src, misc: apply gofmt 2019-02-19 20:38:28 +00:00
tan_s390x.s
tanh.go src, misc: apply gofmt 2019-02-19 20:38:28 +00:00
tanh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
trig_reduce.go math/cmplx: implement Payne-Hanek range reduction 2020-03-14 04:12:41 +00:00
unsafe.go math: document sign bit correspondence for floating-point/bits conversions 2018-12-06 22:27:54 +00:00