UpstandingHackers / hammer

Parser combinators for binary formats, in C. Yes, in C. What? Don't look at me like that.
GNU General Public License v2.0
430 stars 40 forks source link

Segfault in examples/dns on a malformed DNS packet #198

Open pictyeye opened 3 years ago

pictyeye commented 3 years ago

The attached packet (found using AFL) triggers a segmentation fault in act_domain (dns.c): segfaulter.txt (NB: I had to base64 encode the packet to submit the issue on GH)

To reproduce the bug, you must first run the dns server using

scons examples
build/opt/examples/dns

Then, you can trigger the segfault using

openssl enc -d -base64 < segfaulter.txt | nc localhost 53