- Fix Assert Causing DoS in dname_pkt_copy(),

reported by X41 D-Sec.
This commit is contained in:
W.C.A. Wijngaards 2019-12-03 15:20:48 +01:00
parent 5a66aecef9
commit d2eb78e871
2 changed files with 6 additions and 0 deletions

View file

@ -6,6 +6,8 @@
- Fix Assert Causing DoS in synth_cname(),
reported by X41 D-Sec.
- Fix similar code in auth_zone synth cname to add the extra checks.
- Fix Assert Causing DoS in dname_pkt_copy(),
reported by X41 D-Sec.
2 December 2019: Wouter
- Merge pull request #122 from he32: In tcp_callback_writer(),

View file

@ -339,6 +339,10 @@ void dname_pkt_copy(sldns_buffer* pkt, uint8_t* to, uint8_t* dname)
lablen = *dname++;
continue;
}
if(lablen > LDNS_MAX_LABELLEN) {
*to = 0; /* end the result prematurely */
return;
}
log_assert(lablen <= LDNS_MAX_LABELLEN);
len += (size_t)lablen+1;
if(len >= LDNS_MAX_DOMAINLEN) {