After adding trust-anchors and stub-zone configuration for the .de
DNSSEC testbed, I get strange validation results, where Unbound reports
secured subdomains as insecure.
The parent domain is validated by DLV and reported secure. Disabling the
.de stub zone configuration fixes it.
home.dyndns.hauke-lampe.de. A -> insecure
dyndns.hauke-lampe.de. SOA -> insecure
hauke-lampe.de. SOA -> secure
dyndns.hauke-lampe.de. DS -> answer contains NSEC3 records from .de TLD
debug: Process cached DS response
debug: nsec3: keysize 1032 bits, max iterations 500
info: ce candidate <de. TYPE0 CLASS0>
info: NSEC3s for the referral proved no DS.
debug: val handle processing q with state VAL_VALIDATE_STATE
info: Verified that response is INSECURE
Unbound seems to use the NSEC3s from .de to decide that there's no DS
for dyndns.hauke-lampe.de. If I just remove the DNSKEY for .de, Unbound
tries to validate them and then goes ahead and fetches the DS record:
info: next keyname <dyndns.hauke-lampe.de. DNSKEY IN>
info: DS RRset <hauke-lampe.de. DS IN>
debug: Process cached DS response
info: verify rrset <3K7UC41UOSLRR6B2FL0H3BG1S2QODATF.de. NSEC3 IN>
debug: verify sig 56760 8
debug: verify: could not find appropriate key
debug: rrset failed to verify: no valid signatures for 1 algorithms
debug: verify result: sec_status_bogus
debug: NSEC3 did not verify
info: NSEC3s for the referral did not prove no DS.
debug: blacklist add: cache
debug: val handle processing q with state VAL_FINDKEY_STATE
info: validator: FindKey <home.dyndns.hauke-lampe.de. A IN>
info: current keyname <hauke-lampe.de. DNSKEY IN>
info: target keyname <dyndns.hauke-lampe.de. DNSKEY IN>
debug: striplab 0
info: next keyname <dyndns.hauke-lampe.de. DNSKEY IN>
info: DS RRset <hauke-lampe.de. DS IN>
info: generate request <dyndns.hauke-lampe.de. DS IN>
This is a bug in unbound. Fixed in svn trunk r2275.
It is caused not by the testbed setup for .de, but by a parent zone that
uses NSEC3-optout, then a DLV entry below it, which itself has a secure
delegation hosted on the same server. And an oversight in the unbound
code, where the case of an island below optout nsec3 picked the nsec3
'insecure' instead of the lower island trust chain.