Closed Willy-Tan closed 6 years ago
thanks for the report - though please keep in mind that uDNS is still under development, and sometimes I use assert false
to remind myself to finish code (that's as well the reason why there's no release of this library yet)... as I did in this case where the desired semantics are not obvious to me atm (a git grep assert\ false
will discover some more uses)..
I fixed that, was even able to delete some code
Oh okay I didn't know about the use of assert false
, I was too eager thinking that I found something relevant. I will be more careful next time !
no worries, and thanks again for the report and your fuzzing work... in the meantime I got rid of the assert false
in uDNS (and remarked most with TODO
, what I should''ve done from the beginning ;)
As the primary server seems to handle fuzz testing without any bug, I tried to fuzz the resolver, and managed to crash it (https://pastebin.com/x3UB87Mf for an example). Here is the resolver log :
TL;DR : Queries sent with opcode set to Notify are ignored by the primary server that responds with None, to which the resolver raises an error because it doesn't expect a None answer.
For a more detailed debug, which was simpler to find than the other issue :
UDns_resolver.handle
which parses correctly the packetUDns_resolver.handle_primary
is then called, which calls itselfUDns_server.Primary.handle_frame
None
UDns_resovler.handle_primary
, seeing that is is aNone
packet, callsassert false
try ... with
block to catch the error so the resolver crashes.