BIND 10 #2585: bugs in in-memory finder

BIND 10 Development do-not-reply at isc.org
Fri Dec 28 23:06:42 UTC 2012


#2585: bugs in in-memory finder
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  defect        |                       Status:  new
            Priority:  medium        |                    Milestone:  Next-
           Component:  data source   |  Sprint-Proposed
            Keywords:                |                   Resolution:
           Sensitive:  0             |                 CVSS Scoring:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:
         Total Hours:  0             |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Description changed by jinmei:

Old description:

> #2480 revealed two bugs in the in-memory zone finder implementation:
>
> {{{
> TEST_P(QueryTest, exactAnyMatch) {
>     // there's a bug in the in-memory data source and this doesn't work
> ...
> }
> TEST_P(QueryTest, wildcardNxrrsetWithDuplicateNSEC) {
>     // TODO: this seems to be an in-memory specific bug
> ...
> }
> }}}
>
> The first one because we substitute the owner name of RRsets for type
> ANY queries unconditionally (which will confuse the isSameKind() check
> later):
>
> {{{
>             target->push_back(createTreeNodeRRset(node, cur_rds,
> rrclass_,
>                                                   options, &name));
> }}}
>
> The second one is because we substitute the owner name of NSEC for
> NXRRSET while we shouldn't:
> {{{
>     // No exact match or CNAME.  Get NSEC if necessary and return
> NXRRSET.
>     return (createFindResult(rrclass_, zone_data_, NXRRSET, node,
>                              getNSECForNXRRSET(zone_data_, options,
> node),
>                              options, wild, &name));
> }}}
>
> Fixing these should be easy, but they should have been caught in unit
> tests for the zone finder in the first place, so we need such tests,
> too.  We should then also re-enable the disabled tests in query_unittest.

New description:

 #2480 revealed three bugs in the in-memory zone finder implementation:

 {{{#!cpp
 TEST_P(QueryTest, exactAnyMatch) {
     // there's a bug in the in-memory data source and this doesn't work
 ...
 }
 TEST_P(QueryTest, wildcardNxrrsetWithDuplicateNSEC) {
     // TODO: this seems to be an in-memory specific bug
 ...
 }

 TEST_P(QueryTest, wildcardNxrrsetWithNSEC) {
     // This is an in-memory specific bug (#2585), until it's fixed we
     // tentatively skip the test for in-memory
 ...
 }
 }}}

 The first one because we substitute the owner name of RRsets for type
 ANY queries unconditionally (which will confuse the isSameKind() check
 later):

 {{{
             target->push_back(createTreeNodeRRset(node, cur_rds, rrclass_,
                                                   options, &name));
 }}}

 The latter two are because we substitute the owner name of NSEC for
 NXRRSET while we shouldn't:
 {{{
     // No exact match or CNAME.  Get NSEC if necessary and return NXRRSET.
     return (createFindResult(rrclass_, zone_data_, NXRRSET, node,
                              getNSECForNXRRSET(zone_data_, options, node),
                              options, wild, &name));
 }}}

 Fixing these should be easy, but they should have been caught in unit
 tests for the zone finder in the first place, so we need such tests,
 too.  We should then also re-enable the disabled tests in query_unittest.

--

-- 
Ticket URL: <http://bind10.isc.org/ticket/2585#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list