From: W.C.A. Wijngaards Date: Wed, 17 Jun 2026 13:55:33 +0000 (+0200) Subject: - Fix that malloc failure during edns subnet addrtree X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d3348c71bb2bfac7627ea84692d1490c7083e27;p=thirdparty%2Funbound.git - 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. --- diff --git a/doc/Changelog b/doc/Changelog index bf6b52b1f..a1a5adada 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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 diff --git a/edns-subnet/addrtree.c b/edns-subnet/addrtree.c index ebe71b970..278a16f38 100644 --- a/edns-subnet/addrtree.c +++ b/edns-subnet/addrtree.c @@ -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);