Skip to content

Commit 9ce52de

Browse files
committed
- Fix in depth for serve-expired responses from cachedb, that it
does not store bogus. Thanks to Qifan Zhang, Palo Alto Networks, for the report.
1 parent b3aa262 commit 9ce52de

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

cachedb/cachedb.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,12 @@ prep_data(struct module_qstate* qstate, struct sldns_buffer* buf)
401401
FLAGS_GET_RCODE(qstate->return_msg->rep->flags) !=
402402
LDNS_RCODE_YXDOMAIN)
403403
return 0;
404+
/* Do not persist data the validator has not yet seen, or has rejected.
405+
* Otherwise an expired blob could maybe reach clients via
406+
* serve-expired. */
407+
if(qstate->env->need_to_validate &&
408+
qstate->return_msg->rep->security == sec_status_bogus)
409+
return 0;
404410
/* We don't store the reply if its TTL is 0. This is probably coming
405411
* from upstream and it is not meant to be stored. */
406412
if(qstate->return_msg->rep->ttl == 0)

doc/Changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
- Unit test for CVE-2026-42959.
3636
- Unit test for CVE-2026-40622.
3737
- Unit test for CVE-2026-42960.
38+
- Fix in depth for serve-expired responses from cachedb, that it
39+
does not store bogus. Thanks to Qifan Zhang, Palo Alto Networks,
40+
for the report.
3841

3942
18 May 2026: Wouter
4043
- Fix for mixed class referrals, the resolver uses the query

0 commit comments

Comments
 (0)