Bug 1309779

Summary: openssl tools should not use SHA1 by default when generating digital signatures/certificates
Product: Red Hat Enterprise Linux 7 Reporter: Nikos Mavrogiannopoulos <nmavrogi>
Component: opensslAssignee: Tomas Mraz <tmraz>
Status: CLOSED ERRATA QA Contact: Stefan Dordevic <sdordevi>
Severity: unspecified Docs Contact: Mirek Jahoda <mjahoda>
Priority: unspecified    
Version: 7.4CC: mgrepl, sdordevi, szidek, tmraz
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openssl-1.0.2k-1.el7 Doc Type: Deprecated Functionality
Doc Text:
MD5, MD4, and SHA0 as the signing algorithms in *OpenSSL* disabled With this update, support for the verification of MD4, and SHA0 signatures in certificates, Certificate Revocation Lists (CRL) and message signatures is removed in addition to already removed support for the verification of MD5. Also the default for generating digital signatures is changed from SHA1 to SHA256 as SHA1 should not be used for digital signatures of certificates and other data after 2016. The verification of SHA1 signatures is still enabled for legacy purposes but might be disabled in future releases. The system administrator can enable MD5, MD4, or SHA0 support by modifying the "LegacySigningMDs" option in the `etc/pki/tls/legacy-settings` policy configuration file, for example: echo 'LegacySigningMDs md5' >> /etc/pki/tls/legacy-settings You can also enable the MD5 verification by setting the "OPENSSL_ENABLE_MD5_VERIFY" environment variable.
Story Points: ---
Clone Of:
: 1309780 1309781 (view as bug list) Environment:
Last Closed: 2017-08-01 18:16:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1309777    

Description Nikos Mavrogiannopoulos 2016-02-18 16:40:38 UTC
Description of problem:
SHA1 was published in 1993 and is still in wide use today. However there are several weaknesses and the algorithms is considered today cryptographically broken (less effort than brute force is required). It is highly likely we will have collision attacks in the near future; i.e., forged certificates. For that it is recommended for our tools which deal with digital signatures to no longer use the SHA1 as a hash function by default.

For maximum compatibility with old software we recommend the SHA2-256 algorithm to be used as the default replacement.

As such, it is recommended for all of the included in openssl tools and shipped configuration files, to switch from SHA1 to SHA2-256 when generating certificates or digital signatures.

Comment 2 Tomas Mraz 2016-02-18 17:07:59 UTC
At least for certificates the default is SHA-256 already as configured in /etc/pki/tls/openssl.cnf in RHEL-7. Do you think that all the code should be patched to use SHA2-256 by default? I am not so sure about desirability of such change in released RHEL. I mean we should change configurations but hardcoded defaults in the code is a different beast.

Comment 3 Tomas Mraz 2016-02-18 17:17:56 UTC
So I've looked at the 1.0.1 and 1.0.2 difference and this would be solved nicely with the rebase as the hardcoded default hash changed from SHA-1 to SHA2-256 there.

Comment 10 errata-xmlrpc 2017-08-01 18:16:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1929