I would like to modify this behaviour in unbound to follow crypto-policy settings. It has to disable SHA-1 validation under DEFAULT crypto-policy, but it should allow secure reply in DEFAULT:SHA1 policy. Proposal to upstream were offered [1], but it did not trigger any response from them yet. Perhaps they think this is only our internal problem. 1. https://github.com/NLnetLabs/unbound/issues/656
With a rebase to recent 1.16.2 version, the build should be able to disable validation on DEFAULT policy, but keep it enabled in DEFAULT:SHA1 or LEGACY policies.
It seems the change I offered to upstream (and which is merged in this version) were not complete. I wanted algorithm 7 signatures to become (secure) when update-crypto-policies --set DEFAULT:SHA1 is used. But if I enable SHA-1 algorithm again, it fails in unittest. Failing MR 17. Unit tests result has to be reviewed, maybe there is hidden issue. On the first glance resolution becomes secure on DEFAULT:SHA1 policy and insecure on DEFAULT policy, but I think we can postpone this dynamic switching to 9.2. Better to have always insecure SHA-1 signatures than resulting to SERVFAIL bogus results in a few cases. [1] https://gitlab.com/redhat/centos-stream/rpms/unbound/-/merge_requests/17
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 (Moderate: unbound security, bug fix, and enhancement update), 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/RHSA-2022:8062