SimpleDNS icon indicating copy to clipboard operation
SimpleDNS copied to clipboard

Add Fuzzer and add protection against invalid requests received

Open clementperon opened this issue 1 year ago • 3 comments

Hi @mwarning ,

I was looking to write a simple DNS server like this, but found my happiness with this code.

Fuzzer is no running for several minutes and no more issue found after these fixes.

clementperon avatar Mar 13 '24 13:03 clementperon

hi @clementperon, thank you for your contribution! :-) I will check the code in the next week and take from it what I think would be a good fit for the project. The code formatting is not something that need to be changed, also CMake is not a good fit for SimeDNS (make is more wide spread compared to cmake and simpler here). As for a fuzzer, this is learning project, I might add it in a slightly differ way.

mwarning avatar Mar 17 '24 21:03 mwarning

@mwarning

For the code formatting it's easy for me to develop and quickly detect missing characters. I could try to drop it but this is the default clang-format and it's not far from the actual coding style.

CMake allow me to quickly cross compiled and install the binary when I integrate this project in a distribution builder. Make is simpler but not really "standard".

clementperon avatar Mar 18 '24 09:03 clementperon

I have merged a few minor changes. When I have more time, I will try to also add the memory fixes. But all the commits build on the changed format, so I have to do it manually.

mwarning avatar Mar 24 '24 20:03 mwarning

I have added some more fixes and the fuzzer target. Why not also teach safer programming along with the DNS protocol basics. :-)

Thanks. o/

mwarning avatar Nov 17 '24 21:11 mwarning