Skip to content

Remove duplicate corpus folders #3174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fuzzers/binary_only/frida_executable_libpng/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ harness: lib
[unix]
build:
cargo build --profile {{ PROFILE }}
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, why copy this over everytime? this is super weird.
Examples shouldn't access files outside of their own folder I think


[unix]
run: build harness
Expand Down
2 changes: 2 additions & 0 deletions fuzzers/binary_only/frida_libpng/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ lib: libpng
harness: lib
clang++ -O3 -c -fPIC harness.cc -o harness.o
clang++ -O3 harness.o libpng-1.6.37/.libs/libpng16.a -shared -lz -o libpng-harness.so
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[windows]
zlib:
Expand All @@ -49,6 +50,7 @@ lib2: libpng
harness: lib lib2
copy libpng-1.6.37\Release\libpng16.lib . && copy libpng-1.6.37\Release\libpng16.dll . && copy zlib\Release\zlib.lib . && copy zlib\Release\zlib.dll . && copy target\release\frida_fuzzer.exe .
cl /O2 /c /I .\libpng-1.6.37 harness.cc /Fo:harness.obj && link /DLL /OUT:libpng-harness.dll harness.obj libpng16.lib zlib.lib
if not exist corpus mkdir corpus && xcopy /E /I {{PROJECT_DIR}}\..\..\..\seeds\pngs corpus

[unix]
[windows]
Expand Down
Binary file removed fuzzers/binary_only/frida_libpng/corpus/not_kitty.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion fuzzers/binary_only/frida_windows_gdiplus/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ harness_cmplog_test:
build:
cargo build --profile {{ PROFILE }}
copy {{TARGET_DIR}}\{{PROFILE}}\{{FUZZER_NAME}} .
if not exist corpus mkdir corpus && xcopy /E /I {{PROJECT_DIR}}\..\..\..\seeds\pngs corpus

[windows]
run: build harness
Expand Down Expand Up @@ -46,4 +47,4 @@ test: build harness
[windows]
clean:
make -C libpng-1.6.37 clean
cargo clean
cargo clean
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 3 additions & 2 deletions fuzzers/binary_only/fuzzbench_fork_qemu/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,23 @@ harness:
[unix]
build:
cargo build --profile {{ PROFILE }}
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[unix]
run: build harness
cargo run \
--profile {{ PROFILE }} \
{{ BUILD_DIR }}/harness \
-- \
--libafl-in ../../inprocess/libfuzzer_libpng/corpus \
--libafl-in ./corpus \
--libafl-out ./out

[unix]
test: build harness
#!/bin/bash

rm -rf out/
timeout 15s {{ FUZZER }} {{ BUILD_DIR }}/harness -- --libafl-in ../../inprocess/libfuzzer_libpng/corpus --libafl-out out ./harness | tee fuzz_stdout.log
timeout 15s {{ FUZZER }} {{ BUILD_DIR }}/harness -- --libafl-in ./corpus --libafl-out out ./harness | tee fuzz_stdout.log
if grep -qa "objectives: 1" fuzz_stdout.log; then
echo "Fuzzer is working"
else
Expand Down
5 changes: 3 additions & 2 deletions fuzzers/binary_only/fuzzbench_qemu/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ harness:
[unix]
build:
cargo build --profile {{ PROFILE }}
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[unix]
run: build harness
{{ FUZZER }} \
--libafl-in ../../inprocess/libfuzzer_libpng/corpus \
--libafl-in ./corpus \
--libafl-out ./out \
./{{ HARNESS_NAME }} \
-- \
Expand All @@ -29,7 +30,7 @@ run: build harness
[unix]
test: build harness
#!/bin/bash
timeout 15s {{ FUZZER }} ./harness -- --libafl-in ../../inprocess/libfuzzer_libpng/corpus --libafl-out out ./harness | tee fuzz_stdout.log
timeout 15s {{ FUZZER }} ./harness -- --libafl-in ./corpus --libafl-out out ./harness | tee fuzz_stdout.log
if grep -qa "objectives: 5" fuzz_stdout.log; then
echo "Fuzzer is working"
else
Expand Down
1 change: 1 addition & 0 deletions fuzzers/binary_only/qemu_cmin/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ harness: libpng
-L"{{TARGET_DIR}}/build-zlib/zlib/lib" \
-o"{{ HARNESS }}" \
-lm -static
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[unix]
run: harness build
Expand Down
Binary file removed fuzzers/binary_only/qemu_cmin/corpus/not_kitty.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed fuzzers/binary_only/qemu_cmin/corpus/not_kitty_icc.png
Binary file not shown.
3 changes: 2 additions & 1 deletion fuzzers/binary_only/qemu_coverage/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ build:
--profile {{ PROFILE }} \
--features {{ ARCH }} \
--target-dir {{ TARGET_DIR }}
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[unix]
harness: libpng
Expand Down Expand Up @@ -62,4 +63,4 @@ test:

[unix]
clean:
cargo clean
cargo clean
Binary file removed fuzzers/binary_only/qemu_coverage/corpus/not_kitty.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions fuzzers/binary_only/qemu_launcher/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ harness: libpng
-L"{{ TARGET_DIR }}/build-zlib/zlib/lib" \
-o"{{ HARNESS }}" \
-lm
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[unix]
run: harness build
Expand Down
Binary file removed fuzzers/binary_only/qemu_launcher/corpus/not_kitty.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion fuzzers/binary_only/qemu_tmin/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ test:

[unix]
clean:
cargo clean
cargo clean
1 change: 0 additions & 1 deletion fuzzers/inprocess/libfuzzer_libmozjpeg/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ lib:
[linux]
[macos]
fuzzer: lib cxx
pwd
{{LIBAFL_CXX}} {{PROJECT_DIR}}/harness.cc {{PROJECT_DIR}}/mozjpeg-4.0.3/libjpeg.a {{PROJECT_DIR}}/mozjpeg-4.0.3/libturbojpeg.a -I {{PROJECT_DIR}}/mozjpeg-4.0.3/ -o {{FUZZER_NAME}} -lm -lz

[windows]
Expand Down
1 change: 1 addition & 0 deletions fuzzers/inprocess/libfuzzer_libpng/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ fuzzer feat="": (lib feat) (cxx feat)
-L"{{ZLIB_LIB}}" \
-o {{FUZZER_NAME}} \
-lm -lz
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

# Feat is either nothing or "crash"
[unix]
Expand Down
Binary file removed fuzzers/inprocess/libfuzzer_libpng/corpus/not_kitty.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion fuzzers/inprocess/libfuzzer_libpng_accounting/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ lib:
[linux]
[macos]
fuzzer: lib cxx
pwd
{{LIBAFL_CXX}} {{PROJECT_DIR}}/harness.cc {{PROJECT_DIR}}/libpng-1.6.37/.libs/libpng16.a -I {{PROJECT_DIR}}/libpng-1.6.37/ -o {{FUZZER_NAME}} -lm -lz
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[windows]
fuzzer:
Expand Down
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
2 changes: 1 addition & 1 deletion fuzzers/inprocess/libfuzzer_libpng_centralized/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ lib:
[linux]
[macos]
fuzzer: lib cxx
pwd
{{LIBAFL_CXX}} {{PROJECT_DIR}}/harness.cc {{PROJECT_DIR}}/libpng-1.6.37/.libs/libpng16.a -I {{PROJECT_DIR}}/libpng-1.6.37/ -o {{FUZZER_NAME}} -lm -lz
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[windows]
fuzzer:
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
2 changes: 1 addition & 1 deletion fuzzers/inprocess/libfuzzer_libpng_cmin/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ crash_lib:
[linux]
[macos]
fuzzer: lib cxx
pwd
{{LIBAFL_CXX}} {{PROJECT_DIR}}/harness.cc {{PROJECT_DIR}}/libpng-1.6.37/.libs/libpng16.a -I {{PROJECT_DIR}}/libpng-1.6.37/ -o {{FUZZER_NAME}} -lm -lz -lz3
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[windows]
fuzzer:
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
2 changes: 1 addition & 1 deletion fuzzers/inprocess/libfuzzer_libpng_launcher/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ lib:
[linux]
[macos]
fuzzer: lib cxx
pwd
{{LIBAFL_CXX}} {{PROJECT_DIR}}/harness.cc {{PROJECT_DIR}}/libpng-1.6.37/.libs/libpng16.a -I {{PROJECT_DIR}}/libpng-1.6.37/ -o {{FUZZER_NAME}} -lm -lz
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[windows]
fuzzer:
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
2 changes: 1 addition & 1 deletion fuzzers/inprocess/libfuzzer_libpng_norestart/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ crash_lib:
[linux]
[macos]
fuzzer: lib cxx
pwd
{{LIBAFL_CXX}} {{PROJECT_DIR}}/harness.cc {{PROJECT_DIR}}/libpng-1.6.37/.libs/libpng16.a -I {{PROJECT_DIR}}/libpng-1.6.37/ -o {{FUZZER_NAME}} -lm -lz
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[windows]
fuzzer:
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
2 changes: 1 addition & 1 deletion fuzzers/inprocess/libfuzzer_libpng_tcp_manager/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ lib:
[linux]
[macos]
fuzzer: lib cxx
pwd
{{LIBAFL_CXX}} {{PROJECT_DIR}}/harness.cc {{PROJECT_DIR}}/libpng-1.6.37/.libs/libpng16.a -I {{PROJECT_DIR}}/libpng-1.6.37/ -o {{FUZZER_NAME}} -lm -lz
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[windows]
fuzzer:
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
1 change: 1 addition & 0 deletions fuzzers/inprocess/libfuzzer_stb_image/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ fuzzer: cxx
#!/bin/bash
cargo build --profile {{PROFILE}}
cp {{FUZZER}} .
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0

[linux]
[macos]
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
1 change: 1 addition & 0 deletions fuzzers/inprocess/libfuzzer_stb_image_sugar/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cxx:
fuzzer: cxx
#!/bin/bash
cargo build --profile {{PROFILE}}
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0
cp {{FUZZER}} .

[linux]
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
1 change: 0 additions & 1 deletion fuzzers/structure_aware/nautilus_sync/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ lib:
[linux]
[macos]
fuzzer: lib cxx
pwd
{{LIBAFL_CXX}} {{PROJECT_DIR}}/harness.cc {{PROJECT_DIR}}/libpng-1.6.37/.libs/libpng16.a -I {{PROJECT_DIR}}/libpng-1.6.37/ -o {{FUZZER_NAME}} -lm -lz

[windows]
Expand Down
Loading