- 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.
This commit is contained in:
W.C.A. Wijngaards
2026-05-15 14:27:18 +02:00
parent 84a4f556b1
commit aa9f1e68ff
2 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -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;