28 lines
812 B
Diff
28 lines
812 B
Diff
From: "Dr. Tobias Quathamer" <toddy@debian.org>
|
|
Date: Sat, 19 Oct 2019 14:03:22 +0200
|
|
Subject: Fix CVE-2019-17596
|
|
|
|
Cherry-picked from upstream:
|
|
https://github.com/golang/go/commit/2017d88dbc096381d4f348d2fb08bfb3c2b7ed73
|
|
|
|
[Upstream: https://sources.debian.org/src/golang-1.11/1.11.6-1+deb10u3/debian/patches/0008-Fix-CVE-2019-17596.patch]
|
|
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
|
---
|
|
src/crypto/dsa/dsa.go | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/src/crypto/dsa/dsa.go b/src/crypto/dsa/dsa.go
|
|
index 575314b..2fc4f1f 100644
|
|
--- a/src/crypto/dsa/dsa.go
|
|
+++ b/src/crypto/dsa/dsa.go
|
|
@@ -279,6 +279,9 @@ func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool {
|
|
}
|
|
|
|
w := new(big.Int).ModInverse(s, pub.Q)
|
|
+ if w == nil {
|
|
+ return false
|
|
+ }
|
|
|
|
n := pub.Q.BitLen()
|
|
if n&7 != 0 {
|