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

pull/700/head cares-1_26_0
Brad House 10 months ago
parent 27c41bef66
commit 0ad09d251b
  1. 5
      src/lib/ares_dns_parse.c

@ -1138,6 +1138,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