Report information
The Basics
Id:
37680
Status:
resolved
Priority:
Medium/Medium
Queue:

People
Owner:
Nobody in particular
Cc:
AdminCc:

BugTracker
Version Fixed:
9.9.7, 9.9.7-S1, 9.10.2, 9.11.0
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
(no value)
Priority:
(no value)
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
(no value)
Area:
bug

Dates
Created:Sun, 02 Nov 2014 21:48:16 -0500
Updated:Thu, 03 Aug 2017 22:13:49 -0400
Closed:Wed, 04 Mar 2015 11:49:47 -0500



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: Bug report: unexpected behavior in isc_radix_search
Date: Mon, 03 Nov 2014 13:48:09 +1100
To: bind9-bugs@isc.org
From: Mark Andrews <marka@isc.org>

Subject: Bug report: unexpected behavior in isc_radix_search
Date: Mon, 3 Nov 2014 10:32:26 +0800
To: bind-workers@isc.org
From: Tom Sawyer <tomsawyer126@gmail.com>
Hi,all:

I possibly find a bug exist in isc_radix_search(lib/isc/radix.c), bind-9.10.1 .

Suppose we have two radix nodes a and b in a radix tree. Their prefix is 3.3.3.0/24 and 3.3.0.0/16.If we call isc_radix_search with a isc_prefix_t set as 3.3.3.3/22, it will return success with node a. But for the definition of radix_tree it should be node b to be found.

The reason of this behavior hasn't been exposed is that isc_radix_search is called with a prefix set as x.x.x.x/32(Ipv4) for now.

Patch is as follows and it is suit for bind-9.10.1 :

diff --git i/lib/isc/radix.c w/lib/isc/radix.c
index df26615..6f9cc19 100644
--- i/lib/isc/radix.c
+++ w/lib/isc/radix.c
@@ -279,6 +279,9 @@ isc_radix_search(isc_radix_tree_t *radix, isc_radix_node_t **target,
        while (cnt-- > 0) {
                node = stack[cnt];

+              if (prefix->bitlen < node->bit){
+                   continue;
+              }
                if (_comp_with_mask(isc_prefix_tochar(node->prefix),
                                    isc_prefix_tochar(prefix),
                                    node->prefix->bitlen)) {


--
Best Regards.
Tom Sawyer.

_______________________________________________ bind-workers mailing list bind-workers@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-workers