From 42b42f71cf8f5956c09e66230293dfb5db652360 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Tue, 22 Jan 2019 16:02:41 -0500 Subject: [release-branch.go1.11-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 Reviewed-by: Julie Qiu (cherry picked from commit 746d6abe2dfb9ce7609f8e1e1a8dcb7e221f423e) Reviewed-on: https://team-review.git.corp.google.com/c/401142 Reviewed-by: Filippo Valsorda --- src/crypto/elliptic/elliptic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crypto/elliptic/elliptic.go b/src/crypto/elliptic/elliptic.go index 4fc2b5e521..c84657c5e3 100644 --- a/src/crypto/elliptic/elliptic.go +++ b/src/crypto/elliptic/elliptic.go @@ -210,8 +210,9 @@ func (curve *CurveParams) doubleJacobian(x, y, z *big.Int) (*big.Int, *big.Int, x3 := new(big.Int).Mul(alpha, alpha) beta8 := new(big.Int).Lsh(beta, 3) + beta8.Mod(beta8, curve.P) x3.Sub(x3, beta8) - for x3.Sign() == -1 { + if x3.Sign() == -1 { x3.Add(x3, curve.P) } x3.Mod(x3, curve.P) -- cgit v1.2.3-54-g00ecf From 983d8092ef8cc5c92c5a598baf1b7a5dbfd51ef4 Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Wed, 23 Jan 2019 12:39:16 -0500 Subject: [release-branch.go1.11-security] doc: document Go 1.11.5 and Go 1.10.8 Change-Id: I97ce42e1e9a6d10bf1eeccc2763e043d8ebe5bab Reviewed-on: https://team-review.git.corp.google.com/c/400906 Reviewed-by: Filippo Valsorda (cherry picked from commit efe766c7c0918da96aa21e1ac03a9d3fa57ca156) Reviewed-on: https://team-review.git.corp.google.com/c/401144 --- doc/devel/release.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/devel/release.html b/doc/devel/release.html index 73f7a0e304..226148e93b 100644 --- a/doc/devel/release.html +++ b/doc/devel/release.html @@ -66,6 +66,13 @@ See the Go +1.11.5 milestone on our issue tracker for details. +

+

go1.10 (released 2018/02/16)

@@ -131,6 +138,13 @@ See the Go +1.10.8 milestone on our issue tracker for details. +

+

go1.9 (released 2017/08/24)

-- cgit v1.2.3-54-g00ecf From daef79d40510df2708dba127bb0721fb8548bc9e Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 11 Jan 2019 14:26:24 -0800 Subject: [release-branch.go1.11-security] net: pass if at least one matching entry in TestLookupGmailTXT Fixes #29698 Change-Id: I0531c0a274b120af8871aa2f5975744ff6c912a3 Reviewed-on: https://go-review.googlesource.com/c/157638 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick Reviewed-on: https://team-review.git.corp.google.com/c/401203 Reviewed-by: Filippo Valsorda --- src/net/lookup_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/net/lookup_test.go b/src/net/lookup_test.go index 5c66dfa260..f2adbc18c5 100644 --- a/src/net/lookup_test.go +++ b/src/net/lookup_test.go @@ -237,11 +237,16 @@ func TestLookupGmailTXT(t *testing.T) { if len(txts) == 0 { t.Error("got no record") } + found := false for _, txt := range txts { - if !strings.Contains(txt, tt.txt) || (!strings.HasSuffix(txt, tt.host) && !strings.HasSuffix(txt, tt.host+".")) { - t.Errorf("got %s; want a record containing %s, %s", txt, tt.txt, tt.host) + if strings.Contains(txt, tt.txt) && (strings.HasSuffix(txt, tt.host) || strings.HasSuffix(txt, tt.host+".")) { + found = true + break } } + if !found { + t.Errorf("got %v; want a record containing %s, %s", txts, tt.txt, tt.host) + } } } -- cgit v1.2.3-54-g00ecf From 35bb62e60a7779ff82c3067903b3306ff8666471 Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Wed, 23 Jan 2019 14:07:54 -0500 Subject: [release-branch.go1.11-security] go1.11.5 Change-Id: Ib957fc19ae0633f77e2a5a9219f7a11ceda3f092 Reviewed-on: https://team-review.git.corp.google.com/c/400909 Reviewed-by: Filippo Valsorda --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 2506b03408..04364e1646 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -go1.11.4 \ No newline at end of file +go1.11.5 \ No newline at end of file -- cgit v1.2.3-54-g00ecf