Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1563749 - (CVE-2018-5382) CVE-2018-5382 bouncycastle: BKS-V1 keystore files vulnerable to trivial hash collisions
CVE-2018-5382 bouncycastle: BKS-V1 keystore files vulnerable to trivial hash ...
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20120330,reported=2...
: Reopened, Security
Depends On: 1564247 1564248
Blocks: 1563752
  Show dependency treegraph
 
Reported: 2018-04-04 11:21 EDT by Andrej Nemec
Modified: 2018-10-25 11:42 EDT (History)
55 users (show)

See Also:
Fixed In Version: bouncycastle 1.47
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-05 15:24:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2927 None None None 2018-10-16 11:22 EDT

  None (edit)
Description Andrej Nemec 2018-04-04 11:21:21 EDT
Affected versions of the package are vulnerable to Hash Collision due to an error in the BKS version 1 keystore files.

BKS is a keystore format, designed to function similarly to a Sun/Oracle JKS keystore. BKS files can contain public keys, private keys and certificates, and they rely on a password-based encryption to provide confidentiality and integrity protections to the keystore contents.

The first version of a BKS file (aka BKS-V1) contained a design flaw when determining the key size used to protect the keystore data. It used the SHA-1 hash function, which is 160 bits in length. In a RFC7292-compliant cryptographic algorithm, the MAC key size should be the same size as the hash function being used, meaning that the MAC key size should be 160 bits long for BKS files.

However, Bouncy Castle BKS-V1 files uses only 16 bits for the MAC key size. Regardless of the complexity of the password, ghe BKS-V1 file will have merely 65,536 different encryption keys. An attacker may bruteforce this password in a matter of seconds by testing all 65K values.

References:

https://insights.sei.cmu.edu/cert/2018/03/the-curious-case-of-the-bouncy-castle-bks-passwords.html
https://www.kb.cert.org/vuls/id/306792
Comment 3 Andrej Nemec 2018-05-14 11:51:47 EDT
Statement:

Red Hat Product Security has rated this issue as having security impact of Low. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.
Comment 4 Doran Moppert 2018-05-28 02:33:56 EDT
Note that per the cert advisory, bouncycastle 1.49 re-introduced the legacy signature format as an option, calling it "BKS-1".  Version 1.49 and newer should avoid using this form for keystore verification.
Comment 5 Tomas Hoger 2018-06-18 09:11:30 EDT
This flaw affected BKS (Bouncy Castle keystore) version 1.  It was fixed in Bouncy Castle version 1.47.  However, as the fix implies a change to the keystore format, the new format is referred to as BKS version 2.  The support for BKS version 1 was re-introduced again in Bouncy Castle version 1.49 (most likely because of backwards (in)compatibility concerns), however BKS version 2 remains the default.  Applications using Bouncy Castle 1.49 or later may be affected if the explicitly request the use of BKS-V1 keystore format would still be affected by this issue.

Relevant entries form the Bouncy Castle release notes:

https://www.bouncycastle.org/releasenotes.html

1.47:
The default MAC for a BKS key store was 2 bytes, this has been upgraded to 20 bytes.

1.49:
A new KeyStore type, BKS-V1, has been added for people needing to create key stores compatible with earlier versions of Bouncy Castle.
Comment 11 errata-xmlrpc 2018-10-16 11:22:06 EDT
This issue has been addressed in the following products:

  Red Hat Satellite 6.4 for RHEL 7

Via RHSA-2018:2927 https://access.redhat.com/errata/RHSA-2018:2927

Note You need to log in before you can comment on or make changes to this bug.