Make OpenSSL distrust SHA-1 signatures by default
Summary
OpenSSL will no longer trust cryptographic signatures using SHA-1 by default starting from Fedora 41.
Owner
- Name: Alexander Sosedkin
- Email: asosedki@redhat.com
Current status
- Targeted release: Fedora Linux 41
- Last updated: 2024-03-14
- [<will be assigned by the Wrangler> devel thread]
- FESCo issue: <will be assigned by the Wrangler>
- Tracker bug: <will be assigned by the Wrangler>
- Release notes tracker: <will be assigned by the Wrangler>
Detailed Description
We would like to deprecate SHA-1 in signatures because chosen-prefix collision attacks on SHA-1 are becoming increasingly feasible. Specifically, https://sha-mbles.github.io claims a complexity of 2^63.4, and a cost of 45k US dollars, with an estimated cost of 10k US dollars by 2025 to find a chosen-prefix collision for a SHA-1 signature.
With this change accepted and implemetend, OpenSSL will start blocking SHA-1 signature creation and verification by default.
The rejected Changes/StrongCryptoSettings3 has previously included this change among several others. This is a second attempt to propose it, two years later, with a narrower scope.
Feedback
This change, when discussed as part of the rejected Changes/StrongCryptoSettings3 has proved itself controversial.
There seems to be a consensus that the change has to be done eventually, but Fedora is a remarkably conservative distribution when it comes to deprecating legacy cryptography, even if by-default-only.
The decision to discover code reliant on SHA-1 signatures by blocking creation/verification has not gathered many fans, but not many alternative proposals have been raised in return. In particular, there is no suitable facility to perform opt-out logging of the deprecated operation. Opt-in logging through USDT probes has been implemented the last time and can be reinstated if need be.
The precursor change has received limited testing during Fedora 37 Test Days, with only a handful of bugs discovered.
The change has received significant testing in RHEL, which distrusts SHA-1 signatures by default starting from RHEL-9.
Benefit to Fedora
Fedora's security defaults will inch closer to what is considered secure in the modern-day cryptographic landscape.
Scope
- Proposal owners: flip that switch in the DEFAULT policy, provide transitional policies for testing the change.
- Other developers:
Test your applications with TEST-FEDORA41 policy.
If the security of your application depends on trusting SHA-1 signature, fix this, or it stop working unless users explicitly opt into lower security guarantees. See SHA1SignaturesGuidance.
- Release engineering: #Releng issue number
A change is a runtime change, so the mass rebuild considerations boil down to %check-time testsuite failures expecting different defaults. Specifically, reverting the change can be safely done without a mass-rebuild.
- Policies and guidelines:
CryptoPolicies section of the packaging guidelines will have to be updated to reflect that SHA-1 signatures must not be trusted by default.
- Trademark approval: N/A (not needed for this Change)
- Alignment with Community Initiatives:
Upgrade/compatibility impact
The change is not expected to break upgrades.
Administrators willing to retain previous behavior and sacrifice security would be able to apply a compatibility policy or subpolicy before or after the upgrade.
How To Test
Preview the new defaults with update-crypto-policies --set TEST-FEDORA41
.
Proceed to use the system as usual,
identify the workflows which are broken by blocking SHA-1 signature creation/verification,
ideally also verify that update-crypto-policies --set DEFAULT
fixes them,
file bug reports against the affected components if not filed already.
Please start your ticket title with OpenSSLDistrustSHA1SigVer:
,
mention this change page, the version of crypto-policies package
and the policies under which your workflow does and does not work.
Alternatively, a tool to identify the affected operation without blocking them might be provided. This has been done the last time, in form of https://copr.fedorainfracloud.org/coprs/asosedkin/sha1sig-tracer.
User Experience
Some less-than-common use-cases will break. (One example from Fedora 37 test days was interoperability with old Apple devices). The affected users will need to either explicitly opt into a less secure system configuration or wait until the affected packages are updated to move away from SHA-1.
Dependencies
All reverse dependencies of openssl are potentially affected.
Contingency Plan
- Contingency mechanism: the change is reverted
- Contingency deadline: Fedora 41 Beta Freeze
- Blocks release? Yes
Note: with the change being a flip of a switch at heart, there's not much room for creativity in not completing it. Reverting is would be a straightforward ordeal, and would not require a mass rebuild.
Documentation
SHA1SignaturesGuidance contains relevant notes. Fedora packaging guidelines should be modified accordingly.
Release Notes
We'll need something to the tune of:
OpenSSL no longer trusts SHA-1 signatures are no longer trusted by default. Affected users can opt out of the change at the expense of lowering the system's security.