This repository contains the source code for a fuzz testing example.
It was created specifically for a presentation at the University of Catania, and is accompanied by slides used during the event.
- 📍 Event
- 📄 Slides
▶️ Teams Event + Video
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=clang++
cmake --build . -- -j$(nproc)
cd build
./math_utils_test
timeout 30 ./fuzz_math_utils || echo "Fuzz test crashed or timed out"
There are multiple ways to read the crashdump, I strongly recommend hexdump.
# read full crash dump
hexdump crash-123456789
# read crash dump and convert hex values to decimal
hexdump -v -e '"%d, "' -e '8/1 "0x%02x, " "\n"' crash-123456789
# read crash dump via xxd
xxd crash-123456789
# read crash dump via gdb and print the a,b values (partially)
gdb ./fuzz_math_utils
run < ./crash-123456789
print a
print b