Bug 2070495

Summary: Unbound fails resolution of any SHA-1 signed domain
Product: Red Hat Enterprise Linux 9 Reporter: Petr Menšík <pemensik>
Component: unboundAssignee: Petr Menšík <pemensik>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: high Docs Contact: Jan Fiala <jafiala>
Priority: high    
Version: 9.0CC: jafiala, jjelen, mharri, omejzlik, peter.van.dijk, pvlasin, sjanderk
Target Milestone: rcKeywords: AutoVerified, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: unbound-1.13.1-13.el9_0 Doc Type: Known Issue
Doc Text:
.Both `bind` and `unbound` disable validation of SHA-1-based signatures The `bind` and `unbound` components disable validation support of all RSA/SHA1 (algorithm number 5) and RSASHA1-NSEC3-SHA1 (algorithm number 7) signatures, and the SHA-1 usage for signatures is restricted in the DEFAULT system-wide cryptographic policy. As a result, certain DNSSEC records signed with the SHA-1, RSA/SHA1, and RSASHA1-NSEC3-SHA1 digest algorithms fail to verify in Red Hat Enterprise Linux 9 and the affected domain names become vulnerable. To work around this problem, upgrade to a different signature algorithm, such as RSA/SHA-256 or elliptic curve keys. For more information and a list of top-level domains that are affected and vulnerable, see the link:https://access.redhat.com/solutions/6955455/[DNSSEC records signed with RSASHA1 fail to verify] solution.
Story Points: ---
Clone Of:
: 2071543 (view as bug list) Environment:
Last Closed: 2022-05-17 13:59:08 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: 2070230, 2070923    
Bug Blocks: 2073066, 2135933, 2071543    

Description Petr Menšík 2022-03-31 09:42:04 UTC
Description of problem:


Version-Release number of selected component (if applicable):
unbound-1.13.1-12.el9.x86_64
openssl-libs-3.0.1-20.el9_0.x86_64


How reproducible:
always

Steps to Reproduce:
1. unbound-host -rD secure.d2a7n3.rootcanary.net
2.
3.

Actual results:
secure.d2a7n3.rootcanary.net has address 145.97.20.20
validation failure <secure.d2a7n3.rootcanary.net. A IN>: keyset not secured by DNSKEY that matches DS from 10.38.5.26 for key d2a7n3.rootcanary.net. while building chain of trust
secure.d2a7n3.rootcanary.net has IPv6 address 2001:610:188:408::20
validation failure <secure.d2a7n3.rootcanary.net. AAAA IN>: key for validation d2a7n3.rootcanary.net. is marked as invalid because of a previous validation failure <secure.d2a7n3.rootcanary.net. A IN>: keyset not secured by DNSKEY that matches DS from 10.38.5.26 for key d2a7n3.rootcanary.net. while building chain of trust
validation failure <secure.d2a7n3.rootcanary.net. MX IN>: key for validation d2a7n3.rootcanary.net. is marked as invalid because of a previous validation failure <secure.d2a7n3.rootcanary.net. A IN>: keyset not secured by DNSKEY that matches DS from 10.38.5.26 for key d2a7n3.rootcanary.net. while building chain of trust



Expected results:
unbound-host -rD secure.d2a7n3.rootcanary.net
secure.d2a7n3.rootcanary.net has address 145.97.20.20
secure.d2a7n3.rootcanary.net has IPv6 address 2001:610:188:408::20


Additional info:
Another example domain is ietf.org

Comment 1 Petr Menšík 2022-03-31 10:30:43 UTC
Current only workaround is setting crypto-policy to DEFAULT:SHA1, which enables also SHA1 algorithm. Then it passes verification of RSASHA1 (algorithm 5) or NSEC3RSASHA1 (algorithm 7).

Comment 2 Petr Menšík 2022-03-31 10:33:01 UTC
Of course it affects also unbound daemon running in unbound.service, unbound-host example is given just to extract more simple logs and if possible debugging.

Comment 3 Petr Menšík 2022-03-31 10:56:44 UTC
It seems there is build time support for disabling sha1. According to ./configure --disable-sha1, it would not disable NSEC3 (which has no alternative to SHA-1), but should avoid SHA-1. That might be used as a template to enable SHA-1 if enabled by policy, but make it insecure if SHA-1 is disabled.

Comment 4 Petr Menšík 2022-03-31 12:31:44 UTC
Quick and dirty solution would be adding --disable-sha1 flag to unbound build. It would make all SHA-1 domains insecure, but resolution should still work also on affected domains, regardless crypto-policy setting.

Comment 11 Petr Menšík 2022-04-01 10:10:45 UTC
Create issue [1] on upstream to notify them about or problem and desire how it should be solved in ideal way. That would need more work and maybe not small changes to used validator logic. So for emergency fix we would disable validation of all SHA-1 DNSSEC signatures, but later we would like to enable its validation depending on dnssec-policy mode.

1. https://github.com/NLnetLabs/unbound/issues/656

Comment 25 Marcel Härri 2022-04-08 11:40:26 UTC
I can confirm that the builds from this MR https://gitlab.com/redhat/centos-stream/rpms/unbound/-/merge_requests/12 re-enables the resolution of domains such as paypal.com

Comment 27 errata-xmlrpc 2022-05-17 13:59:08 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 (new packages: unbound), 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-2022:2630