Bug 2073068 - [pdns] SHA-1 DNSSEC signatures will fail on RHEL 9
Summary: [pdns] SHA-1 DNSSEC signatures will fail on RHEL 9
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: pdns
Version: epel9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Morten Stevens
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: el9_dnssec_sha1 2301344
TreeView+ depends on / blocked
 
Reported: 2022-04-07 15:09 UTC by Petr Menšík
Modified: 2024-10-03 10:24 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-10-05 10:07:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github PowerDNS pdns issues 12890 0 None open auth, rec: RSA-SHA1 broken on EL9 2023-06-07 18:51:58 UTC

Description Petr Menšík 2022-04-07 15:09:39 UTC
Description of problem:
Crypto policies in RHEL9 will block SHA-1 signatures by default. However RFC 8624 [1] requires SHA-1 validation as mandatory. Because crypto policy is mandatory, it will affect any DNSSEC validating software using openssl or gnutls.

Version-Release number of selected component (if applicable):
openssl-libs-3.0.1-21.el9.x86_64
crypto-policies-20220223-1.git5203b41.el9_0.1.noarch
gnutls-3.7.3-9.el9.x86_64

How reproducible:
reliable

Steps to Reproduce:
1. delv int

Actual results:
# delv int
;; EVP_VerifyFinal failed (verify failure)
;; error:03000098:digital envelope routines::invalid digest:crypto/evp/pmeth_lib.c:959:
;; EVP_VerifyFinal failed (verify failure)
;; error:03000098:digital envelope routines::invalid digest:crypto/evp/pmeth_lib.c:959:
;; validating int/DNSKEY: no valid signature found
;; insecurity proof failed resolving 'int/DNSKEY/IN': 10.2.32.1#53
;;   validating rtma1k8jfek31ikuajq7rie9dufhe33b.int/NSEC3: bad cache hit (int/DNSKEY)
;; broken trust chain resolving 'int/A/IN': 10.2.32.1#53
;; resolution failed: broken trust chain


Expected results:
;; resolution failed: ncache nxrrset
; negative response, fully validated
; int.			3000	IN	\-A	;-$NXRRSET
; int. SOA sns.dns.icann.org. noc.dns.icann.org. 2022040601 3600 1800 604800 3600
; int. RRSIG SOA ...
; rtma1k8jfek31ikuajq7rie9dufhe33b.int. RRSIG NSEC3 ...
; rtma1k8jfek31ikuajq7rie9dufhe33b.int. NSEC3 1 0 5 398954BBB503FF9D S2BQ3UEQJHSGU7FE7M8QPQ563E9PTFH5 NS SOA RRSIG DNSKEY NSEC3PARAM


Additional info:
command "update-crypto-policies --set DEFAULT:SHA1" will switch to crypto policy, which would allow previous behaviour and success of both signature verification and creation.

1. https://datatracker.ietf.org/doc/html/rfc8624#section-3.1

Comment 1 Petr Menšík 2022-04-10 15:35:03 UTC
It was tested by PowerDNS maintainer and it seems pdns does not use EVP_ methods to verify SHA-1 signatures. Then it seems it still passes, because disabled signatures are not enforced at lower level API. PowerDNS uses such API for RSA validation. If you could test it on latest CentOS 9 Stream container, please close this bug with NOTABUG.

Comment 2 Peter van Dijk (PowerDNS) 2023-06-06 09:14:55 UTC
auth 4.8 switches to EVP for RSASHA1 on systems that have OpenSSL 3 - like RHEL9. So, it's broken now.

Comment 3 Peter van Dijk (PowerDNS) 2023-06-06 09:43:49 UTC
(Recursor 4.9 is even more broken - SERVFAILs on icann.org)

Comment 4 Morten Stevens 2023-06-06 09:58:14 UTC
Alright, I will change the status back to open. Currently, we have version 4.7.4 in EPEL-9. We can continue using version 4.7.x for a while. However, I'm unsure about our next steps.

The easiest approach would be to provide a documentation recommending users to set the following crypto policy: update-crypto-policies --set DEFAULT:SHA1

However, I'm not sure what we should do as package maintainers since we cannot directly change the crypto policy. That is something the user would need to do themselves.

Comment 5 Peter van Dijk (PowerDNS) 2023-06-06 10:03:49 UTC
ah, thank you for DEFAULT:SHA1, I was about to put LEGACY in our docs

Comment 6 Peter van Dijk (PowerDNS) 2023-06-06 10:46:09 UTC
I collected my thoughts here: https://github.com/PowerDNS/pdns/issues/12890

Comment 7 Morten Stevens 2023-10-05 10:07:42 UTC
I think we can close the ticket with the implemented workaround described in ticket https://github.com/PowerDNS/pdns/issues/12890. The fix is included in version 4.8.1 which has been pushed to EPEL-9 for 3 months.

Furthermore, the recommendation remains to set the crypto policy on RHEL9 servers with PowerDNS to DEFAULT:SHA1.
update-crypto-policies --set DEFAULT:SHA1


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