Can the NSEC3-OPTOUT record cover no RRTYPE’s?

At first glance, the answer seems obvious: No. The point of NSEC3 is to proof the (non)existence of data. With the OPT-OUT flag set, you skip all the non-secure data. So you would expect to have some data to cover for such an NSEC3 record. If you read RFC 5155 Section 3.2.1 it is not entirely clear, though I’m tempted to think these should not happen in the wild. Except we just found one, generated by bind’s dnssec-signzone:

aaa.ottawa.on.ca.  IN NS foo.
problementry.ottawa.on.ca.  IN NS foo.
problementry.ottawa.on.ca.  IN DS blob.
zzz.ottawa.on.ca.  IN NS foo.

The change was that “problementry.ottawa.on.ca” submitted a DS record which was added to the zone. Note also that  neither “on.ca.” or “ottawa.on.ca.” are zone cuts, although there are many delegations underneath XXXX.ottawa.on.ca. (but none with a DS record or orphan glue)

This caused bind to add two NSEC3 entries as part of the NSEC3 chain, an entry for HASH(on.ca) and an entry for HASH(ottawa.on.ca) (forgive the wordpress wrapping of lines)

+qf6k201pudkgikusoidrujdfikql15qc.ca.   3600 IN      NSEC3   1 1 5 – qnkecttopnji0h479fhpjmv18gsl1sdk ;{ flags: optout}

+qnkecttopnji0h479fhpjmv18gsl1sdk.ca.   3600    IN      NSEC3   1 1 5 – r85l4g712aibs65e47aj79e7odi202h9 ;{ flags: optout}

Note how these NSEC3 entries do not cover a single RRTYPE, because there is no zonecut and there are no RRTYPE’s for these entries.

When signing this zone with opendnssec, instead of bind, the entries are not added. Who is right? Before using my brains, I decided to use other people’s brains.

named-checkzone loaded both the bind and ods version with “OK”. So no help there. It’s a bug because it should declare at least one of the copies as containing errors in the NSEC3 hash chain

ldns-verify complained about ALL the non-zone-cuts in the zones but otherwise showed no difference. So that’s also a failure, on top of the failure of assuming dots are zone cuts.

validns found the bind zone OK, but complained about the ods zone with:

ca.signed.ods-signer-01.ldns:2898958: no corresponding NSEC3 found for on.ca.
ca.signed.ods-signer-01.ldns:2907968: no corresponding NSEC3 found for ottawa.on.ca.

So validns seems to agree with bind. Which software is right? The only thing I”m sure of now, is that I need more coffee and time to re-read RFC 5155, and specifically look at how things are supposed to work in this case.

I’m continuously surprised at how many TLD’s have rolled out DNSSEC, yet we’re still seeing differences between signer engines and validators all the time……

 

One thought on “Can the NSEC3-OPTOUT record cover no RRTYPE’s?

  1. The short answer is yes.

    The long answer is yes, a NSEC3-OPTOUT record can cover no RRTYPEs. Before adding the DS record for problementry.ottawa.on.ca., there were only insecure delegations below on.ca. According to RFC5155, Section 7.1, bullet 2, those domains do not require a NSEC3 when using Opt-Out. But if you add the DS record, suddenly the empty non-terminals on.ca. and ottawa.on.ca. are derived for a secure delegation. The NSEC3 records need to be created and they have a empty bitmap (since they belong to an empty non-terminal).

    Why are those needed? They tell the resolver the closest encloser for problementry.ottawa.on.ca. Those are needed to deny that there was wildcard expansion possible.

    Suppose the above zone also has a *.ca. configured (regardless whether that might be a good idea or not). If we didn’t add NSEC3s for the empty non-terminals, the resolver thinks ca. is the closest encloser and a query for problementry.ottawa.on.ca. could be expanded by the wildcard *.ca. That seems like something we don’t want.

    More background information is provided here: http://tools.ietf.org/html/draft-gieben-auth-denial-of-existence-dns-00

    By the way, bind and validns are right here. So is OpenDNSSEC 1.3 LTS, it is doing it correct. The bug is in the 1.4 beta. And I’ll get to it tomorrow first thing in the morning.

Leave a Reply

Your email address will not be published. Required fields are marked *