[CVE-2018-1000180, CVE-2018-1000613] Upgrade Bouncycastle to 1.60

This upgrade fixes CVE-2018-1000180 [1]:

  Bouncy Castle BC 1.54 - 1.59, BC-FJA 1.0.0, BC-FJA 1.0.1 and earlier
  have a flaw in the Low-level interface to RSA key pair generator,
  specifically RSA Key Pairs generated in low-level API with added
  certainty may have less M-R tests than expected. This appears to be
  fixed in versions BC 1.60 beta 4 and later, BC-FJA 1.0.2 and later.

and CVE-2018-1000613 [2]:

  Bouncy Castle Java Cryptography APIs version prior to version 1.60
  contains a CWE-470: Use of Externally-Controlled Input to Select
  Classes or Code ('Unsafe Reflection') vulnerability in XMSS/XMSS^MT
  private key deserialization that can result in Deserializing an
  XMSS/XMSS^MT private key can result in the execution of unexpected
  code. This attack appear to be exploitable via a handcrafted private
  key can include references to unexpected classes which will be picked
  up from the class path for the executing application. This
  vulnerability appears to have been fixed in 1.60 and later.

Bouncycastle 1.57 introduced generics in its APIs. Remove the casts
and @SuppressWarnings("unchecked") annotations that are not necessary
any more.

[1] https://nvd.nist.gov/vuln/detail/CVE-2018-1000180
[2] https://nvd.nist.gov/vuln/detail/CVE-2018-1000613

Bug: Issue 9952
Change-Id: I9b25b1568ac7da555de96d82c597b3dff47966c6
This commit is contained in:
David Pursehouse
2018-11-02 09:21:59 +09:00
parent 5980f9d707
commit 6f97ef16b3
9 changed files with 8 additions and 14 deletions

View File

@@ -585,24 +585,25 @@ maven_jar(
sha1 = "bb562ee73f740bb6b2bf7955f97be6b870d9e9f0",
)
BC_VERS = "1.56"
# When updating Bouncy Castle, also update it in bazlets.
BC_VERS = "1.60"
maven_jar(
name = "bcprov",
artifact = "org.bouncycastle:bcprov-jdk15on:" + BC_VERS,
sha1 = "a153c6f9744a3e9dd6feab5e210e1c9861362ec7",
sha1 = "bd47ad3bd14b8e82595c7adaa143501e60842a84",
)
maven_jar(
name = "bcpg",
artifact = "org.bouncycastle:bcpg-jdk15on:" + BC_VERS,
sha1 = "9c3f2e7072c8cc1152079b5c25291a9f462631f1",
sha1 = "13c7a199c484127daad298996e95818478431a2c",
)
maven_jar(
name = "bcpkix",
artifact = "org.bouncycastle:bcpkix-jdk15on:" + BC_VERS,
sha1 = "4648af70268b6fdb24674fb1fd7c1fcc73db1231",
sha1 = "d0c46320fbc07be3a24eb13a56cee4e3d38e0c75",
)
# TODO(davido): Remove exlusion of file system provider, when this issue is fixed: