Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 717950 (CVE-2016-1000338, CVE-2016-1000339, CVE-2016-1000340, CVE-2016-1000341, CVE-2016-1000342, CVE-2016-1000343, CVE-2016-1000344, CVE-2016-1000352, CVE-2017-13098, CVE-2018-1000180, CVE-2018-1000613) - <dev-java/bcprov-1.65: Multiple vulnerabilities (CVE-2016-{1000338,1000339,1000340,1000341,1000342,1000343, 1000344,1000352}, CVE-2017-13098, CVE-2018-{1000180,1000613})
Summary: <dev-java/bcprov-1.65: Multiple vulnerabilities (CVE-2016-{1000338,1000339,10...
Status: IN_PROGRESS
Alias: CVE-2016-1000338, CVE-2016-1000339, CVE-2016-1000340, CVE-2016-1000341, CVE-2016-1000342, CVE-2016-1000343, CVE-2016-1000344, CVE-2016-1000352, CVE-2017-13098, CVE-2018-1000180, CVE-2018-1000613
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Gentoo Security
URL:
Whiteboard: B3 [glsa? cve]
Keywords: PullRequest
Depends on: 794241 799749
Blocks:
  Show dependency tree
 
Reported: 2020-04-17 21:36 UTC by GLSAMaker/CVETool Bot
Modified: 2022-08-16 19:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description GLSAMaker/CVETool Bot gentoo-dev 2020-04-17 21:36:11 UTC
CVE-2019-17359 (https://nvd.nist.gov/vuln/detail/CVE-2019-17359):
  The ASN.1 parser in Bouncy Castle Crypto (aka BC Java) 1.63 can trigger a
  large attempted memory allocation, and resultant OutOfMemoryError error, via
  crafted ASN.1 data. This is fixed in 1.64.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-04-17 21:42:02 UTC
* CVE-2018-1000180

Description:
"Issue around primality tests for RSA key pair generation if done using only the low-level API."

* CVE-2018-1000613: 

Description:
"Lack of class checking in deserialization of XMSS/XMSS^MT private keys with BDS state information."

* CVE-2017-13098 ("ROBOT")

Description:
"A Bleichenbacher oracle in TLS when RSA key exchange is negotiated. This potentially affected BCJSSE servers and any other TLS servers configured to use JCE for the underlying crypto - note the two TLS implementations using the BC lightweight APIs are not affected by this."

* CVE-2016-1000352

Description:
"Strict encoding enforcement has been introduced for ASN1Integer."

* CVE-2016-1000338

Description: 
"DSA does not fully validate ASN.1 encoding of signature on verification. It is possible to inject extra elements in the sequence making up the signature and still have it validate, which in some cases may allow the introduction of "invisible" data into a signed structure."

* CVE-2016-1000339: 

Description:
"AESFastEngine has a side channel leak if table accesses can be observed. The use of lookup large static lookup tables in AESFastEngine means that where data accesses by the CPU can be observed, it is possible to gain information about the key used to initialize the cipher. We now recommend not using AESFastEngine where this might be a concern. The BC provider is now using AESEngine by default."

* CVE-2016-1000340:

Description:
"Static ECDH vulnerable to carry propagation bug. Carry propagation bugs in the implementation of squaring for several raw math classes have been fixed (org.bouncycastle.math.raw.Nat???). These classes are used by our custom elliptic curve implementations (org.bouncycastle.math.ec.custom.**), so there was the possibility of rare (in general usage) spurious calculations for elliptic curve scalar multiplications. Such errors would have been detected with high probability by the output validation for our scalar multipliers."

* CVE-2016-1000341: 

Description:
"DSA signature generation vulnerable to timing attack. Where timings can be closely observed for the generation of signatures, the lack of blinding in 1.55 or earlier, may allow an attacker to gain information about the signatures k value and ultimately the private value as well."

* CVE-2016-1000342: 
Description:
"ECDSA does not fully validate ASN.1 encoding of signature on verification. It is possible to inject extra elements in the sequence making up the signature and still have it validate, which in some cases may allow the introduction of "invisible" data into a signed structure."

* CVE-2016-1000343: 

Description:
"DSA key pair generator generates a weak private key if used with default values. If the JCA key pair generator is not explicitly initialised with DSA parameters, 1.55 and earlier generates a private value assuming a 1024 bit key size. In earlier releases this can be dealt with by explicitly passing parameters to the key pair generator."

* CVE-2016-1000344

Description:
"DHIES allows the use of unsafe ECB mode. This algorithm is now removed from the provider."

* CVE-2016-1000345

Description:
"DHIES/ECIES CBC mode vulnerable to padding oracle attack. For BC 1.55 and older, in an environment where timings can be easily observed, it is possible with enough observations to identify when the decryption is failing due to padding."

* CVE-2016-1000346:

Description: "Other party DH public key not fully validated. This can cause issues as invalid keys can be used to reveal details about the other party's private key where static Diffie-Hellman is in use. As of this release the key parameters are checked on agreement calculation."

* CVE-2016-1000352:

Description: 
"ECIES allows the use of unsafe ECB mode. This algorithm is now removed from the provider."

----

Some of these were fixed in earlier versions. The latest fixed version is 2.6.1.
Given this is a cryptography library, I strongly recommend the maintainers update to the latest version. I did not comb through the changelog because I already found these CVEs.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-04-17 21:44:12 UTC
(In reply to Sam James (sec padawan) from comment #1)
> Some of these were fixed in earlier versions. The latest fixed version is
> 2.6.1.
> Given this is a cryptography library, I strongly recommend the maintainers
> update to the latest version. I did not comb through the changelog because I
> already found these CVEs.

@maintainer(s), please see this comment.
Comment 3 Larry the Git Cow gentoo-dev 2020-08-23 16:33:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bacc2bcfe93249ade33793fc4b0cd6065e9e98f6

commit bacc2bcfe93249ade33793fc4b0cd6065e9e98f6
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2020-08-23 16:32:50 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2020-08-23 16:32:50 +0000

    dev-java/bcprov: bump to 1.66
    
    Bug: https://bugs.gentoo.org/717950
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-java/bcprov/Manifest                                   | 2 +-
 dev-java/bcprov/{bcprov-1.65.ebuild => bcprov-1.66.ebuild} | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20c3ded0bc70eb353532ae8725831c8633e560e7

commit 20c3ded0bc70eb353532ae8725831c8633e560e7
Author:     Sam James (sam_c) <sam@cmpct.info>
AuthorDate: 2020-04-21 11:33:22 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2020-08-23 16:22:54 +0000

    dev-java/bcprov: (security) bump to 1.65
    
    Bug: https://bugs.gentoo.org/717950
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Sam James (sam_c) <sam@cmpct.info>
    Closes: https://github.com/gentoo/gentoo/pull/15453
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-java/bcprov/Manifest           |  1 +
 dev-java/bcprov/bcprov-1.65.ebuild | 63 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)
Comment 4 Miroslav Šulc gentoo-dev 2020-08-23 16:43:06 UTC
i must admit i am lost about the bcprov versions and why we have that many of them. it's also not obvious to me which versions are affected and which not and why do we slot every version, if there are some incompatibilities or what is the reason. anyway, here is the list of packages depending on bcprov:

$ grep -Eo "dev-java/bcprov:[0-9.]+" * -r | sort | uniq
app-text/pdftk-3.0.0:dev-java/bcprov:0
app-text/pdftk-3.0.8:dev-java/bcprov:0
app-text/pdftk-9999:dev-java/bcprov:0
dev-java/ant-ivy-2.3.0-r2:dev-java/bcprov:1.50
dev-java/bcmail-1.38-r6:dev-java/bcprov:1.38
dev-java/bcmail-1.45-r5:dev-java/bcprov:1.45
dev-java/bcmail-1.50-r3:dev-java/bcprov:1.50
dev-java/bcmail-1.52-r3:dev-java/bcprov:1.52
dev-java/bcpg-1.50-r1:dev-java/bcprov:1.50
dev-java/bcpg-1.50-r2:dev-java/bcprov:1.50
dev-java/bcpg-1.52-r1:dev-java/bcprov:1.52
dev-java/bcpg-1.52-r2:dev-java/bcprov:1.52
dev-java/bcpkix-1.50-r2:dev-java/bcprov:1.50
dev-java/bcpkix-1.52-r1:dev-java/bcprov:1.52
dev-java/bctsp-1.45-r1:dev-java/bcprov:1.45
dev-java/netty-handler-4.0.36:dev-java/bcprov:1.52
dev-java/pdfbox-1.8.15:dev-java/bcprov:1.45
net-p2p/freenet-0.7.5_p1484:dev-java/bcprov:1.54
net-p2p/freenet-0.7.5_p1486:dev-java/bcprov:1.54
net-vpn/i2p-0.9.44-r2:dev-java/bcprov:1.50
net-vpn/i2p-0.9.45:dev-java/bcprov:1.50


and here is the list of slots that are used atm:

$ grep -Eo "dev-java/bcprov:[0-9.]+" * -r | sed -E "s/.*://g" | sort | uniq
0
1.38
1.45
1.50
1.52
1.54


sooo, any suggestions on how to proceed about this package? :-)
Comment 5 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-08-16 19:49:57 UTC
Hm, tree is clean.