flightaware / scotty

A Tcl extension for building network management (SNMP, ICMP, UDP, DNS) applications
33 stars 17 forks source link

Mitigate effect of unsuccessful DNS queries. Sanitize HINFO lookups #6

Closed resuna closed 7 years ago

resuna commented 7 years ago

If no (satisfying) RRs are found in the loop in DnsDoQuery() where DNS query results are analyzed the returned query-result structure contains an error indication but the result string is uninitialized.

We set it now to the string "no answer" - which is technically not right for every possible DNS answer but at least does not lead to potential segfaults and exploits.

The HINFO patch from the last commit is now also included.