diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2019-11-05 07:10:49 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-06 14:49:33 +0000 |
commit | 198870249eb4b5b1104c21b028a27211abebc379 (patch) | |
tree | 0bb6834807e2bfe0741460492a2d855ea5c84118 /meta | |
parent | ccca64c80a2834d3faeb1c4abbac22565819241f (diff) | |
download | poky-198870249eb4b5b1104c21b028a27211abebc379.tar.gz |
go: fix CVE-2019-17596
https://github.com/golang/go/commit/2017d88dbc096381d4f348d2fb08bfb3c2b7ed73
(From OE-Core rev: 581de91fcf73675f638e7b739dd99291baf36f50)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/go/go-1.12.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch | 42 |
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.12.inc b/meta/recipes-devtools/go/go-1.12.inc index ed14b175e6..6aecaad75d 100644 --- a/meta/recipes-devtools/go/go-1.12.inc +++ b/meta/recipes-devtools/go/go-1.12.inc | |||
@@ -17,6 +17,7 @@ SRC_URI += "\ | |||
17 | file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ | 17 | file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ |
18 | file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ | 18 | file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ |
19 | file://0001-release-branch.go1.12-security-net-textproto-don-t-n.patch \ | 19 | file://0001-release-branch.go1.12-security-net-textproto-don-t-n.patch \ |
20 | file://0010-fix-CVE-2019-17596.patch \ | ||
20 | " | 21 | " |
21 | SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch" | 22 | SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch" |
22 | 23 | ||
diff --git a/meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch b/meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch new file mode 100644 index 0000000000..134cfab737 --- /dev/null +++ b/meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From f1783e1ce44a86c000a7c380a57a805c89c3efbe Mon Sep 17 00:00:00 2001 | ||
2 | From: Katie Hockman <katie@golang.org> | ||
3 | Date: Mon, 14 Oct 2019 16:42:21 -0400 | ||
4 | Subject: [PATCH] crypto/dsa: prevent bad public keys from causing panic | ||
5 | |||
6 | dsa.Verify might currently use a nil s inverse in a | ||
7 | multiplication if the public key contains a non-prime Q, | ||
8 | causing a panic. Change this to check that the mod | ||
9 | inverse exists before using it. | ||
10 | |||
11 | Fixes CVE-2019-17596 | ||
12 | |||
13 | Change-Id: I94d5f3cc38f1b5d52d38dcb1d253c71b7fd1cae7 | ||
14 | Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/572809 | ||
15 | Reviewed-by: Filippo Valsorda <valsorda@google.com> | ||
16 | (cherry picked from commit 9119dfb0511326d4485b248b83d4fde19c95d0f7) | ||
17 | Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575232 | ||
18 | |||
19 | CVE: CVE-2019-17596 | ||
20 | Upstream-Status: Backport [https://github.com/golang/go/commit/2017d88dbc096381d4f348d2fb08bfb3c2b7ed73] | ||
21 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
22 | --- | ||
23 | src/crypto/dsa/dsa.go | 3 +++ | ||
24 | 1 file changed, 3 insertions(+) | ||
25 | |||
26 | diff --git a/src/crypto/dsa/dsa.go b/src/crypto/dsa/dsa.go | ||
27 | index 575314b..2fc4f1f 100644 | ||
28 | --- a/src/crypto/dsa/dsa.go | ||
29 | +++ b/src/crypto/dsa/dsa.go | ||
30 | @@ -279,6 +279,9 @@ func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool { | ||
31 | } | ||
32 | |||
33 | w := new(big.Int).ModInverse(s, pub.Q) | ||
34 | + if w == nil { | ||
35 | + return false | ||
36 | + } | ||
37 | |||
38 | n := pub.Q.BitLen() | ||
39 | if n&7 != 0 { | ||
40 | -- | ||
41 | 2.23.0 | ||
42 | |||