]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix that malloc failure during edns subnet addrtree
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 17 Jun 2026 13:55:33 +0000 (15:55 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 17 Jun 2026 13:55:33 +0000 (15:55 +0200)
  insert is checked, so it does not crash later. Thanks to
  Qifan Zhang, Palo Alto Networks, for the report.

doc/Changelog
edns-subnet/addrtree.c

index bf6b52b1f139d18dbdb338d832aba03baff340e2..a1a5adadacfc6f3f5a4f257856cc0d5f474b7121 100644 (file)
@@ -39,6 +39,9 @@
        - Fix that malloc failure for rpz_strip_nsdname is
          checked and handled, so that it does not crash later.
          Thanks to Qifan Zhang, Palo Alto Networks, for the report.
+       - Fix that malloc failure during edns subnet addrtree
+         insert is checked, so it does not crash later. Thanks to
+         Qifan Zhang, Palo Alto Networks, for the report.
 
 16 June 2026: Wouter
        - Fix to disallow $INCLUDE for secondary zones. Start up
index ebe71b9706e497510987b944f8b63db0512ee248..278a16f384b0dc6920717106d9a39c732017d233 100644 (file)
@@ -459,6 +459,7 @@ addrtree_insert(struct addrtree *tree, const addrkey_t *addr,
                        /* Data is stored in other leafnode */
                        node = newnode;
                        newnode = node_create(tree, elem, scope, ttl);
+                       if (!newnode) return;
                        if (!edge_create(newnode, addr, sourcemask, node,
                                index^1)) {
                                clean_node(tree, newnode);