You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@akmistry has been doing awesome work to fuzz minizip in Chromium. AFAIK, you might've already received some bug reports. However, to fully leverage our fuzzing capabilities, we would like to invite you to integrate minizip with OSS-Fuzz.
Main advantages of integrating with OSS-Fuzz:
We always fuzz tip-of-tree revision here, while in Chromium we use a fixed revision which needs to be manually updated from time to time
OSS-Fuzz integration would allow you and other contributors to reproduce crashes in a more convenient way than you might have to do it right now
Everything is automated on our end, including bug reporting and fixes verification, which also would make things more convenient for the upstream developers
I have seen @akmistry work's to fuzz minizip in Chromium and it looks great. I have also tried to fix some of the bugs that I've seen come through.
I am always interested in rewards. What would you want me to do beyond what @akmistry has done? Are you looking for me to move all his fuzzer tests into the minizip repository and expand the seed corpus or something more?
Yes, as @inferno-chromium said over email, "all you need is just move those fuzz targets files to your repo and add < 50 line build/integration instructions in OSS-Fuzz github repo (example)". That would be sufficient to get fuzzing coverage on tip-of-tree revision and convenient bug reporting / verification pipeline.
Later on, you can follow more steps from the Ideal Integration in order to improve testing of minizip and apply for a higher reward :)
@Dor1s - I spent sometime this weekend figuring out libFuzzer and how to integrate. Here are my changes. Please take a look and let me know if this is correct or if anything is missing. See pull request #1945.
Cool, thanks! Now there is a bunch of link failures:
[ 96%] Building C object CMakeFiles/zip_fuzzer.dir/test/fuzz/zip_fuzzer.c.o
[ 98%] Linking C executable unzip_fuzzer
[100%] Linking C executable zip_fuzzer
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../libFuzzingEngine.a(FuzzerDriver.o)/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../libFuzzingEngine.a(FuzzerDriver.o): In function `: In function `appendappend':
':
/usr/local/bin/../include/c++/v1/string:/usr/local/bin/../include/c++/v1/string:25172517: undefined reference to `: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*, unsigned long)std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*, unsigned long)'
'
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../libFuzzingEngine.a(FuzzerDriver.o)/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../libFuzzingEngine.a(FuzzerDriver.o): In function `: In function `__do_call':
__do_call/usr/local/bin/../include/c++/v1/new:':
340/usr/local/bin/../include/c++/v1/new:: undefined reference to `340: undefined reference to `operator delete(void*)operator delete(void*)'
'
I think the reason is that we should link using clang++ even though the project is written in C, because libFuzzer is written in C++.
$ python infra/helper.py build_image --no-pull minizip \
&& python infra/helper.py build_fuzzers minizip
...
-- Performing Test check_opt_aes - Success
-- Configuring done
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_LINK_EXECUTABLE
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_LINK_EXECUTABLE
-- Generating done
-- Build files have been written to: /src/minizip
Fuzzers build failed.
Activity
nmoinvaz commentedon Nov 10, 2018
I have seen @akmistry work's to fuzz minizip in Chromium and it looks great. I have also tried to fix some of the bugs that I've seen come through.
I am always interested in rewards. What would you want me to do beyond what @akmistry has done? Are you looking for me to move all his fuzzer tests into the minizip repository and expand the seed corpus or something more?
Dor1s commentedon Nov 12, 2018
Yes, as @inferno-chromium said over email, "all you need is just move those fuzz targets files to your repo and add < 50 line build/integration instructions in OSS-Fuzz github repo (example)". That would be sufficient to get fuzzing coverage on tip-of-tree revision and convenient bug reporting / verification pipeline.
Later on, you can follow more steps from the Ideal Integration in order to improve testing of minizip and apply for a higher reward :)
Fuzz minizip google/oss-fuzz#1940.
nmoinvaz commentedon Nov 12, 2018
@Dor1s - I spent sometime this weekend figuring out libFuzzer and how to integrate. Here are my changes. Please take a look and let me know if this is correct or if anything is missing. See pull request #1945.
[minizip] Fuzz minizip (#1945)
Dor1s commentedon Nov 13, 2018
@nmoinvaz looks like linking doesn't work properly, the binaries are linked against the standalone driver, rather than against
-lFuzzingEngine: https://github.com/nmoinvaz/minizip/blob/dev/CMakeLists.txt#L671Do we need to set
CMAKE_COMPILER_IS_CLANGin https://github.com/google/oss-fuzz/blob/master/projects/minizip/build.sh#L19 ?Better clang detection. google/oss-fuzz#1940.
nmoinvaz commentedon Nov 13, 2018
@Dor1s - I have updated the cmake clang detection, let me know if that works for you.
Dor1s commentedon Nov 13, 2018
Cool, thanks! Now there is a bunch of link failures:
I think the reason is that we should link using
clang++even though the project is written in C, because libFuzzer is written in C++.nmoinvaz commentedon Nov 13, 2018
Is there any way I can reproduce those results? I had tested through docker and also used infra.py script initially during my testing.
nmoinvaz commentedon Nov 13, 2018
I have modified my cmake script to use CXX when linking. Give that a shot.
Dor1s commentedon Nov 13, 2018
$ python infra/helper.py build_image --no-pull minizip \ && python infra/helper.py build_fuzzers minizip ... -- Performing Test check_opt_aes - Success -- Configuring done CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_CXX_LINK_EXECUTABLE CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_CXX_LINK_EXECUTABLE -- Generating done -- Build files have been written to: /src/minizip Fuzzers build failed.nmoinvaz commentedon Nov 13, 2018
Thanks for the command. Should be fixed now.
nmoinvaz commentedon Nov 13, 2018
You may require pull request #1948.
Dor1s commentedon Nov 13, 2018
Good job, the latest build succeeded! Woohoo!
inferno-chromium commentedon Dec 17, 2018
For rewards, @nmoinvaz - please fill out the form at https://goo.gl/YMLfG2