Remove duplicate corpus folders (#3174)

* remove duplicate pngs

* add tmin corpus back

* fix

* windows?

* space

* exit 0

* oops
This commit is contained in:
Dongjia "toka" Zhang 2025-04-28 15:39:47 +02:00 committed by GitHub
parent 977189174b
commit 3ec8098d76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
84 changed files with 25 additions and 15 deletions

View File

@ -24,6 +24,7 @@ harness: lib
[unix]
build:
cargo build --profile {{ PROFILE }}
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0
[unix]
run: build harness

View File

@ -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:
@ -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]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -14,6 +14,7 @@ harness:
[unix]
build:
cargo build --profile {{ PROFILE }}
[ ! -d ./corpus ] && cp -r {{PROJECT_DIR}}/../../../seeds/pngs ./corpus || exit 0
[unix]
run: build harness
@ -21,7 +22,7 @@ run: build harness
--profile {{ PROFILE }} \
{{ BUILD_DIR }}/harness \
-- \
--libafl-in ../../inprocess/libfuzzer_libpng/corpus \
--libafl-in ./corpus \
--libafl-out ./out
[unix]
@ -29,7 +30,7 @@ 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

View File

@ -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 }} \
-- \
@ -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

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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]

View File

@ -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]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

View File

@ -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]

View File

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 218 B

View File

Before

Width:  |  Height:  |  Size: 376 B

After

Width:  |  Height:  |  Size: 376 B

View File

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

View File

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 427 B