getdnsapi / getdns

A modern asynchronous DNS API https://getdnsapi.net/
Other
461 stars 127 forks source link

getdns doesn't handle some malformed packets gracefully #501

Open saradickinson opened 3 years ago

saradickinson commented 3 years ago

See https://github.com/AdguardTeam/AdGuardDNS/issues/150 for an overview.

Due to a bug, the server was sending packets where the length fields and messages were intermingled on one connection. After the first malformed packets are received the connection is closed but then getdns starts closing all subsequent connections immediately after receiving the first response, reporting failure and all name resolution fails until getdns is relaunched. I haven't fully debugged why getdns ends up in this state but it needs investigating. I have packet captures available for further debugging.