From 8d3348c71bb2bfac7627ea84692d1490c7083e27 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Wed, 17 Jun 2026 15:55:33 +0200 Subject: [PATCH] - 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. --- doc/Changelog | 3 +++ edns-subnet/addrtree.c | 1 + 2 files changed, 4 insertions(+) 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);