Bug 1970101

Summary: dnssec-signzone creates CDS records that use digest algorithm 1 (SHA-1)
Product: Red Hat Enterprise Linux 8 Reporter: Marcel Härri <mharri>
Component: bindAssignee: Petr Menšík <pemensik>
Status: CLOSED WONTFIX QA Contact: rhel-cs-infra-services-qe <rhel-cs-infra-services-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jwboyer, rhbugs
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://datatracker.ietf.org/doc/html/rfc8624
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-09 07:27:57 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:

Description Marcel Härri 2021-06-09 19:54:14 UTC
Description of problem:

signing zone and having CDS records being published produces a warning about DNSSEC specification prohibits signing with DS records that use digest algorithm 1 (SHA-1).


Version-Release number of selected component (if applicable):

rpm -qi bind
Name        : bind
Epoch       : 32
Version     : 9.11.26
Release     : 4.el8_4


How reproducible:

sign zone with ky that has -P sync set so CDS records are being published.

It includes CDS records with SHA-1 signature:

$ dig +short CDS scrit.ch
43788 13 2 ED38DC1A55C2B7C5BF01C2E4D88EFD6BA0B1578034123E1A74694224 A7558931
43788 13 1 9B734496E43FA81601FD69DA332058361106C5C4

Wait until the registry picks up the CDS records.

Look at the zone in dnsviz and see a warning:

https://dnsviz.net/d/scrit.ch/dnssec/

    scrit.ch/DS (alg 13, id 43788): DNSSEC specification prohibits signing with DS records that use digest algorithm 1 (SHA-1).
    scrit.ch/DS (alg 13, id 43788): DNSSEC specification prohibits signing with DS records that use digest algorithm 1 (SHA-1).
    scrit.ch/DS (alg 13, id 43788): DS records with digest type 1 (SHA-1) are ignored when DS records with digest type 2 (SHA-256) exist in the same RRset.
    scrit.ch/DS (alg 13, id 43788): DS records with digest type 1 (SHA-1) are ignored when DS records with digest type 2 (SHA-256) exist in the same RRset.



This got fixed / changed in bind 9.16.0: https://bind9.readthedocs.io/en/v9_16_4/notes.html#id11

DS and CDS records are now generated with SHA-256 digests only, instead of both SHA-1 and SHA-256. This affects the default output of dnssec-dsfromkey, the dsset files generated by dnssec-signzone, the DS records added to a zone by dnssec-signzone based on keyset files, the CDS records added to a zone by named and dnssec-signzone based on “sync” timing parameters in key files, and the checks performed by dnssec-checkds. [GL #1015]

See: https://gitlab.isc.org/isc-projects/bind9/-/issues/1015 / https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/1908

Comment 1 Petr Menšík 2021-06-11 14:16:54 UTC
Okay, I haven't found any way to set used algorithms when signing the zone. I don't think we should turn off SHA-1 signatures by default on 9.11 release, but it should be possible to disable generating SHA-1 digests somehow.

Both somewhere in named.conf for inline signing in named and on dnssec-signzone command by parameters. Something similar to -2 parameter of dnssec-dsfromkey command.

Something like disable-ds-digests option, but only for signature creation.

Comment 2 Petr Menšík 2021-12-10 11:20:02 UTC
Because RFC 8624 [1] says MUST NOT create new signatures, I think SHA-1 DS records should be disabled even in 9.11, which we still support and plan to support in RHEL8. Special cases might allow creation of digest for backward compatibility. We must be able to resign the digest.

dnssec-dsfromkey -1 allows enabling sha-1 digest. But with also -2 present only SHA-2 digest is printed. I would modify it to bind 9.16 equivalent. It allows dnssec-dsfromkey -12 printing of both digests, but default is to print only -2. It should remain possible in dnssec-signzone also, because upstream never removed it in 9.11.x branch. They end its support this year however.

-1 parameter should be added to named and other tools to reenable SHA1 algorithm. But it should be disabled for common deployments. It should be added also to named, because it produces digests via key -[PD] sync parameters.

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

Comment 5 RHEL Program Management 2022-12-09 07:27:57 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.