- Fix OOB Read in sldns_wire2str_dname_scan(),

reported by X41 D-Sec.
This commit is contained in:
W.C.A. Wijngaards 2019-12-03 15:42:34 +01:00
parent d2eb78e871
commit e183a66d60
2 changed files with 3 additions and 1 deletions

View file

@ -8,6 +8,8 @@
- 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.
- Fix OOB Read in sldns_wire2str_dname_scan(),
reported by X41 D-Sec.
2 December 2019: Wouter
- Merge pull request #122 from he32: In tcp_callback_writer(),

View file

@ -798,7 +798,7 @@ int sldns_wire2str_dname_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen,
(*dlen)--;
return sldns_str_print(s, slen, ".");
}
while(*pos) {
while((!pkt || pos < pkt+pktlen) && *pos) {
/* read label length */
uint8_t labellen = *pos++;
if(in_buf) { (*d)++; (*dlen)--; }