mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix Assert Causing DoS in dname_pkt_copy(),
reported by X41 D-Sec.
This commit is contained in:
parent
5a66aecef9
commit
d2eb78e871
2 changed files with 6 additions and 0 deletions
|
|
@ -6,6 +6,8 @@
|
||||||
- Fix Assert Causing DoS in synth_cname(),
|
- Fix Assert Causing DoS in synth_cname(),
|
||||||
reported by X41 D-Sec.
|
reported by X41 D-Sec.
|
||||||
- Fix similar code in auth_zone synth cname to add the extra checks.
|
- 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
|
2 December 2019: Wouter
|
||||||
- Merge pull request #122 from he32: In tcp_callback_writer(),
|
- Merge pull request #122 from he32: In tcp_callback_writer(),
|
||||||
|
|
|
||||||
|
|
@ -339,6 +339,10 @@ void dname_pkt_copy(sldns_buffer* pkt, uint8_t* to, uint8_t* dname)
|
||||||
lablen = *dname++;
|
lablen = *dname++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if(lablen > LDNS_MAX_LABELLEN) {
|
||||||
|
*to = 0; /* end the result prematurely */
|
||||||
|
return;
|
||||||
|
}
|
||||||
log_assert(lablen <= LDNS_MAX_LABELLEN);
|
log_assert(lablen <= LDNS_MAX_LABELLEN);
|
||||||
len += (size_t)lablen+1;
|
len += (size_t)lablen+1;
|
||||||
if(len >= LDNS_MAX_DOMAINLEN) {
|
if(len >= LDNS_MAX_DOMAINLEN) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue