Hello,

  The NULL pointer dereference that used to cause random crashes in
unbound-host has been fixed upstream.

  Here's a diff in order to include the upstream change, verified to fix the
issue at least on amd64 and i386.

  Best regards,
  
      -Frank.
      
-- 
Frank Denis - j [at] pureftpd.org - http://00f.net - http://www.cotery.com
diff -urN net/unbound.old/Makefile net/unbound/Makefile
--- net/unbound.old/Makefile    Mon Aug  4 14:41:31 2008
+++ net/unbound/Makefile        Mon Aug  4 14:36:41 2008
@@ -3,7 +3,7 @@
 COMMENT=       validating DNS resolver
 
 DISTNAME=      unbound-1.0.1
-PKGNAME=       ${DISTNAME}
+PKGNAME=       ${DISTNAME}p0
 
 CATEGORIES=    net
 
diff -urN net/unbound.old/patches/patch-services_outside_network_c 
net/unbound/patches/patch-services_outside_network_c
--- net/unbound.old/patches/patch-services_outside_network_c    Thu Jan  1 
01:00:00 1970
+++ net/unbound/patches/patch-services_outside_network_c        Mon Aug  4 
14:38:05 2008
@@ -0,0 +1,37 @@
+$OpenBSD$
+--- services/outside_network.c.orig    Wed Jun 18 16:27:30 2008
++++ services/outside_network.c Mon Aug  4 14:37:30 2008
+@@ -668,6 +668,23 @@ pending_delete(struct outside_network* outnet, struct 
+ {
+       if(!p)
+               return;
++      if(outnet && outnet->udp_wait_first &&
++              (p->next_waiting || p == outnet->udp_wait_last) ) {
++              /* delete from waiting list, if it is in the waiting list */
++              struct pending* prev = NULL, *x = outnet->udp_wait_first;
++              while(x && x != p) {
++                      prev = x;
++                      x = x->next_waiting;
++              }
++              if(x) {
++                      log_assert(x == p);
++                      if(prev)
++                              prev->next_waiting = p->next_waiting;
++                      else    outnet->udp_wait_first = p->next_waiting;
++                      if(outnet->udp_wait_last == p)
++                              outnet->udp_wait_last = prev;
++              }
++      }
+       if(outnet) {
+               (void)rbtree_delete(outnet->pending, p->node.key);
+       }
+@@ -1067,7 +1084,8 @@ serviced_delete(struct serviced_query* sq)
+               if(sq->status == serviced_query_UDP_EDNS ||
+                       sq->status == serviced_query_UDP) {
+                       struct pending* p = (struct pending*)sq->pending;
+-                      portcomm_loweruse(sq->outnet, p->pc);
++                      if(p->pc)
++                              portcomm_loweruse(sq->outnet, p->pc);
+                       pending_delete(sq->outnet, p);
+                       outnet_send_wait_udp(sq->outnet);
+               } else {

Reply via email to