AFLplusplus / LibAFL

Advanced Fuzzing Library - Slot your Fuzzer together in Rust! Scales across cores and machines. For Windows, Android, MacOS, Linux, no_std, ...
Other
1.99k stars 306 forks source link

qemu: Add QemuConfig to set qemu args via a struct #2339

Closed Marcondiro closed 1 month ago

rmalmain commented 2 months ago

Also, I just thought about it but we could have a look at the debug flags for systemmode (-s -S). Last time I tried it didn't work and I thought I would take a look once the typed qemu builder lands because i think we must perform some kind of operation depending on this option.

domenukk commented 1 month ago

@rmalmain The CI for launcher is unhappy again

    Finished `dev` profile [optimized + debuginfo] target(s) in 4m 06s
[cargo-make] INFO - Running Task: test
+ cd /__w/LibAFL/LibAFL/fuzzers/qemu/qemu_launcher
Profile: dev
+ echo Profile: dev
+ cd injection_test
+ make
gcc -g -o static sqltest.c -l sqlite3 -lm -static -lpthread -ldl
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libsqlite3.a(os_unix.o): in function `unixDlOpen':
(.text+0x8ad): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
gcc -g -o sqltest sqltest.c -l sqlite3 -lm -lpthread 
+ mkdir in
+ echo aaaaaaaaaa
+ find /__w/LibAFL/LibAFL/target/x86_64 -name qemu_launcher
+ timeout 10s /__w/LibAFL/LibAFL/target/x86_64/debug/qemu_launcher -o out -i in -j ../injections.toml -v -- ./static
+ true
+ grep -Ei found.*injection fuzz.log
+ [ -z  ]
+ echo Fuzzer does not generate any testcases or any crashes
Fuzzer does not generate any testcases or any crashes
+ echo Logs:
Logs:
+ cat fuzz.log
+ exit 1
Error while executing command, exit code: 1
Error: Process completed with exit code 1.
rmalmain commented 1 month ago

looks good to me by now, should we merge once the fix pr is merged?