From: W.C.A. Wijngaards Date: Fri, 15 May 2026 12:27:18 +0000 (+0200) Subject: - Fix val_find_DS for robustness, to check the result of X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=aa9f1e68ff06e944ac010f13915f977aff75f236;p=thirdparty%2Funbound.git - Fix val_find_DS for robustness, to check the result of packet_rrset_copy_region before using it. Thanks to Xin Wang and Jiajia Liu, Northwestern Polytechnical University, for the report. --- diff --git a/doc/Changelog b/doc/Changelog index 4df945ab5..553120166 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,9 @@ 15 May 2026: Wouter - Fix man page entry for so-sndbuf, it is for responses sent out. + - Fix val_find_DS for robustness, to check the result of + packet_rrset_copy_region before using it. Thanks to Xin Wang + and Jiajia Liu, Northwestern Polytechnical University, for + the report. 11 May 2026: Yorgos - Fix comment and verbose logging for EDNS fallback buffer size. diff --git a/validator/val_utils.c b/validator/val_utils.c index 411a63b25..b94b6fde0 100644 --- a/validator/val_utils.c +++ b/validator/val_utils.c @@ -1310,10 +1310,11 @@ val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t c, /* DS rrset exists. Return it to the validator immediately*/ struct ub_packed_rrset_key* copy = packed_rrset_copy_region( rrset, region, *env->now); - struct packed_rrset_data* d = copy->entry.data; + struct packed_rrset_data* d; lock_rw_unlock(&rrset->entry.lock); if(!copy) return NULL; + d = (struct packed_rrset_data*)copy->entry.data; msg = dns_msg_create(nm, nmlen, LDNS_RR_TYPE_DS, c, region, 1); if(!msg) return NULL;