clusterfuzz: enforce maximum DNS packet size due to long parser time

v1.23
Brad House 10 months ago
parent 429033c5d2
commit 2fdd75c633
  1. 5
      src/lib/ares_dns_parse.c

@ -1128,6 +1128,11 @@ static ares_status_t ares_dns_parse_buf(ares__buf_t *buf, unsigned int flags,
return ARES_EFORMERR;
}
/* Maximum DNS packet size is 64k, even over TCP */
if (ares__buf_len(buf) > 0xFFFF) {
return ARES_EFORMERR;
}
/* All communications inside of the domain protocol are carried in a single
* format called a message. The top level format of message is divided
* into 5 sections (some of which are empty in certain cases) shown below:

Loading…
Cancel
Save