Commit Graph

5322 Commits

Author SHA1 Message Date
Fabian Meumertzheim 9ca45293b3
[jazzer] Add java-example project (#5216)
The java-example project does not pull in any external dependencies, but
rather consists of three basic Java fuzzers that hit a synthetic bug
after a few seconds. The project can be used to verify that ClusterFuzz
correctly handles JVM fuzz targets.

* ExampleFuzzer fails with an assertion.
* ExampleValueProfileFuzzer fails with an exception after a few seconds,
  but only if running in value profile mode.
* ExampleFuzzerNative fails with an ASan report.
2021-02-18 17:53:50 -08:00
van Hauser 4bb61df790
Final afl++ integration (#5191)
* final afl++ integration

* remove afl++ cmplog tests

* update afl++ commit id

* support rebuild

* llvm 13 workaround

* apply fix for llvm 13

* fix nits

* Fix nits.

* Fix name nit.

* update commit id

* update commit id

* update commit id to stable

Co-authored-by: Abhishek Arya <inferno@chromium.org>
2021-02-18 12:55:07 -08:00
Andrea Fioraldi f682792936
[openjpeg] Release cmake build type (#5209)
Seems that some bugs in openjpeg can be triggered only in release mode.
More specifically, I was trying to reproduce https://github.com/uclouvain/openjpeg/issues/1228 using the OSS-Fuzz harness and I failed.
I figured out that the bug is indeed reachable by the harness, but can be uncovered only in Release mode, otherwise, an assertion error blocks it.
I guess that they use assertions only in Debug mode (WTF) and remove them in Release.
So, IMO openjpeg should be fuzzed in Release mode as the configuration used in production is the one relevant for security.
2021-02-18 10:17:18 -08:00
jonathanmetzman e93f222966
[CIFuzz] Fix handling of sanitizer artifacts (#5182)
Fixes #5175
1. Put sanitizer in artifact name.
2. Fix parsing of non-ASAN stacks.
2021-02-18 09:57:34 -08:00
jonathanmetzman d7164ef352
[infra] Remove unneeded binaries, docs from CMake install (#5161)
This should reduce the image layer size from 127 MB to 57 MB
2021-02-18 09:49:41 -08:00
Daiki Ueno 98e9d24579
New project: p11-kit (#5136)
Co-authored-by: David Cook <divergentdave@gmail.com>
2021-02-18 09:06:22 -08:00
jonathanmetzman 346370af46
[json-sanitizer][jazzer] Don't assume that fuzzer is run from its directory (#5217)
This is a speculative fix for an issue we've seen where the class
fails to load.
A simpler approach I did not use is cd-ing into $this_dir. I didn't
use this approach because it will break things if relative paths
are passed to the fuzzer by ClusterFuzz.

The other reason that I think could be responsible for the missing
class issues is not unpacking the zipfile fully.
2021-02-18 08:25:21 -08:00
jonathanmetzman fa46369f1e
[CIFuzz] Note which languages are supported (#5208)
Related #5195
2021-02-18 07:42:40 -08:00
DavidKorczynski 27a234f297
lua: fix auto_ccs email (#5215) 2021-02-18 07:07:12 -08:00
Google AutoFuzz Team 22fbe14bde
Change the primary_contact for bs4 (#5212)
As requested privately by Leonard
2021-02-18 07:06:54 -08:00
Amit Patankar 4f3158373d
Remove manual denylisting in tensorflow (#5210)
* Remove manual denylisting in tensorflow

Remove manual denylisting of fuzzing targets using bazel query via tags.

* Add a space in the bazel query.

* Update the tag we should denylist.

* Update the comment.
2021-02-17 18:30:47 -08:00
Fabian Meumertzheim 587a0bde3f
[jazzer][json-sanitizer] Add json-sanitizer as the first JVM project (#5186)
json-sanitizer uses Maven and has no native dependencies.

The build file is loosely divided into two parts. The first part is
project-specific, the second one can serve as a template for JVM fuzz
targets without native dependencies.

The following three fuzz targets are added to OSS-Fuzz and can later be
moved into the json-sanitizer tree:

* DenylistFuzzer verifies that the output of json-sanitizer never
  contains certain substrings that can lead to HTML or XML injections.
* IdempotenceFuzzer verifies that json-sanitizer is idempotent.
* ValidJsonFuzzer verifies that the output of json-sanitizer is valid
  JSON by passing it into gson.
2021-02-16 10:13:29 -08:00
Fabian Meumertzheim 481280c650
[jazzer] Adapt infra scripting to JVM fuzz targets (#5176)
compile, bad_build_check, and presubmit.py require small tweaks to
support JVM fuzz targets, most of which are similar to those required
for Python. The following additional changes are required:

* Since the Jazzer driver binary already links in libFuzzer, it should
  not be built as a static library.
* It is not clear how to do architecture checks as JVM fuzz targets can
  load their native dependencies dynamically at runtime. For now, the
  check is disabled.
* The Jazzer binaries are moved into $OUT and need to be skipped over in
  find_fuzz_targets.
2021-02-16 07:06:58 -08:00
Fabian Meumertzheim 427f63c93c
Add Jazzer to base-builder and base-runner (#5166)
Jazzer is built from HEAD using Bazel and the clang toolchain provided
by base-clang. While it could be built with OpenJDK 8, which is
available as a package, JVM fuzz targets should not be forced to be
compatible with Java 8. For this reason, the official binary release of
OpenJDK 15 is pulled into both base-builder and base-runner and set as
JAVA_HOME. It is trimmed down in size by removing src.zip and the jmods
directory.

Jazzer consists of the following four components:

* The API (`jazzer_api_deploy.jar`), which is required for fuzz targets
  that use FuzzedDataProvider or custom method hooks, is made available
  in /usr/local/lib in base-builder.
* The driver (`jazzer_driver`), which links in libFuzzer and is reused
  across fuzz targets. Since it is used to run fuzz targets, it is
  included into base-runner.
* The ASanified driver (`jazzer_driver_asan`), which is obtained from
  `jazzer_driver` by linking in ASan.
* The agent (`jazzer_agent_deploy.jar`), which bundles the runtime
  instrumentation agent with the Jazzer API. It is loaded by the driver
  and thus also included into base-runner.

The changes to the infra scripts required by JVM fuzz targets will be
submitted as a separate PR.
2021-02-16 06:56:36 -08:00
jonathanmetzman a98d7f1ca4
[base-runner][NFC] Replace test_one with test_one.py (#5179) 2021-02-16 06:14:53 -08:00
Todd C. Miller 248b4eb797
sudoers: fuzz targets are now integrated into the build system (#5198)
* use configure options to set the compiler/linker flags

 * use make to build the actual fuzz targets
2021-02-15 09:40:12 -08:00
Catena cyber 4540e32368
Use upstream repo for go-sqlite3 project (#5203) 2021-02-15 09:34:54 -08:00
Paul Kehrer 9afe4f5915
add jasper and libxml2 to graphicsmagick container (#5200) 2021-02-15 09:34:35 -08:00
Robert Löhning 198bf3f112
[qt] Have my own copy of afl's dictionaries and testcases (#5201) 2021-02-15 07:22:08 -08:00
Evgeny Vereshchagin ac290e7ed7
[systemd] roll back to meson-0.56.2 (#5199)
Apparently the latest version of meson (0.57.0) somehow broke systemd
OSS-Fuzz builds. Since it was released systemd has been failing to compile
with
```
2021-02-14T21:23:53.3854577Z [481/664] clang++  -o fuzz-compress fuzz-compress.p/src_fuzz_fuzz-compress.c.o -L/usr/lib/clang/12.0.0/lib/linux -Wl,--as-needed -Wl,--allow-shlib-undefined '-Wl,-rpath,$ORIGIN/src/shared' -Wl,-rpath-link,/work/build/src/shared -Wl,--start-group src/shared/libsystemd-shared-247.so -lFuzzingEngine -Wl,--end-group
2021-02-14T21:23:53.3856578Z FAILED: fuzz-compress
2021-02-14T21:23:53.3858714Z clang++  -o fuzz-compress fuzz-compress.p/src_fuzz_fuzz-compress.c.o -L/usr/lib/clang/12.0.0/lib/linux -Wl,--as-needed -Wl,--allow-shlib-undefined '-Wl,-rpath,$ORIGIN/src/shared' -Wl,-rpath-link,/work/build/src/shared -Wl,--start-group src/shared/libsystemd-shared-247.so -lFuzzingEngine -Wl,--end-group
2021-02-14T21:23:53.4160985Z /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../libFuzzingEngine.a(FuzzerTracePC.o): In function `size':
2021-02-14T21:23:53.4162332Z /usr/local/bin/../include/c++/v1/set:641: undefined reference to `__asan_report_load8'
2021-02-14T21:23:53.4164959Z /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../libFuzzingEngine.a(FuzzerTracePC.o): In function `fuzzer::TracePC::HandleInline8bitCountersInit(unsigned char*, unsigned char*)':
2021-02-14T21:23:53.4166954Z /src/libfuzzer/FuzzerTracePC.cpp:61: undefined reference to `__asan_report_store1'
2021-02-14T21:23:53.4168493Z /src/libfuzzer/FuzzerTracePC.cpp:59: undefined reference to `__asan_report_store1'
2021-02-14T21:23:53.4170699Z /src/libfuzzer/FuzzerTracePC.cpp:59: undefined reference to `__asan_report_store1'
2021-02-14T21:23:53.4172114Z /src/libfuzzer/FuzzerTracePC.cpp:63: undefined reference to `__asan_report_store1'
2021-02-14T21:23:53.4173550Z /src/libfuzzer/FuzzerTracePC.cpp:63: undefined reference to `__asan_report_store1'
2021-02-14T21:23:53.4174876Z /src/libfuzzer/FuzzerTracePC.cpp:54: undefined reference to `__asan_handle_no_return'
2021-02-14T21:23:53.4176322Z /src/libfuzzer/FuzzerTracePC.cpp:64: undefined reference to `__asan_handle_no_return'
2021-02-14T21:23:53.4177521Z /src/libfuzzer/FuzzerTracePC.cpp:65: undefined reference to `__asan_handle_no_return'
2021-02-14T21:23:53.4178936Z /src/libfuzzer/FuzzerTracePC.cpp:66: undefined reference to `__asan_handle_no_return'
2021-02-14T21:23:53.4180439Z /src/libfuzzer/FuzzerTracePC.cpp:67: undefined reference to `__asan_handle_no_return'
2021-02-14T21:23:53.4182667Z /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../libFuzzingEngine.a(FuzzerTracePC.o):/src/libfuzzer/FuzzerTracePC.cpp:44: more undefined references to `__asan_handle_no_return' follow
2021-02-14T21:23:53.4185448Z /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../libFuzzingEngine.a(FuzzerTracePC.o): In function `fuzzer::TracePC::HandleInline8bitCountersInit(unsigned char*, unsigned char*)':
2021-02-14T21:23:53.4189221Z /src/libfuzzer/FuzzerTracePC.cpp:61: undefined reference to `__asan_report_load8'
2021-02-14T21:23:53.4190419Z /src/libfuzzer/FuzzerTracePC.cpp:61: undefined reference to `__asan_report_store8'
2021-02-14T21:23:53.4191618Z /src/libfuzzer/FuzzerTracePC.cpp:61: undefined reference to `__asan_report_store8'
2021-02-14T21:23:53.4192815Z /src/libfuzzer/FuzzerTracePC.cpp:41: undefined reference to `__asan_report_load8'
2021-02-14T21:23:53.4194218Z /src/libfuzzer/FuzzerTracePC.cpp:46: undefined reference to `__asan_report_store8'
2021-02-14T21:23:53.4195434Z /src/libfuzzer/FuzzerTracePC.cpp:53: undefined reference to `__asan_report_store8'
2021-02-14T21:23:53.4196673Z /src/libfuzzer/FuzzerTracePC.cpp:55: undefined reference to `__asan_report_store8'
2021-02-14T21:23:53.4278293Z /src/libfuzzer/FuzzerTracePC.cpp:61: undefined reference to `__asan_report_store1'
2021-02-14T21:23:53.4279995Z /src/libfuzzer/FuzzerTracePC.cpp:64: undefined reference to `__asan_report_load8'
```
and so on.
2021-02-14 21:04:49 -08:00
jonathanmetzman f3fd5289e9
[NFC][[infra] Remove unnecessary files. (#5177)
These files don't appear to be used anymore.
2021-02-15 11:07:02 +11:00
Alexander Bulekov c12fc5df2c
qemu: Add necessary dependencies for 9p fuzzing (#5197)
In qemu/qemu@fff7111 we added configurations for fuzzing virtio-9p
devices. However, these fuzzers are presently stalled on oss-fuzz,
because the build image doesn't have the necessary libattr, and
libcap-ng libraries. Fix that.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
2021-02-13 19:16:55 -08:00
Julien Pivotto e2da2f2675
Prometheus: handle go mod (#5194)
Prometheus has removed the vendor directory, hence we need to force
gomod.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-13 12:02:43 -08:00
Nathan Moinvaziri 0f051b1fbd
Updated zlib-ng project (#5196)
* [zlib-ng] Update project homepage url.

* [zlib-ng] Change linker to use lld due to bug with -fno-semantic-interposition.
2021-02-13 11:59:54 -08:00
wiredfool 38b1953417
[Pillow] Use upstream support for fuzzing build (#5193)
* Don't worry about raqm/fonts for now.

* Current fuzzer doesn't test the font handling
* Upstream (pillow) changes are coming to packaging for raqm/harfbuzz/fribidi

* Use core setup.py options for build linking

explcitly copy libraries in pyinstaller
2021-02-13 11:27:13 -08:00
Alex Gaynor 10083e6746
[graphicsmagick] switch clone to use the new (official) mirror (#5192) 2021-02-12 18:36:09 -08:00
asraa c656631e54
[envoy] Add Yan (#5188)
* Add Yanjun

Signed-off-by: Asra Ali <asraa@google.com>

* add yan

Signed-off-by: Asra Ali <asraa@google.com>
2021-02-12 18:28:01 -08:00
Guido Vranken c65286347d
[cryptofuzz, bignum-fuzzer] Fix AFL++ builds (#5121)
* [cryptofuzz, bignum-fuzzer] Fix AFL++ builds

* [cryptofuzz, bignum-fuzzer] Don't build Golang

Because it's already part of the base image.

* [cryptofuzz, bignum-fuzzer] Retrigger CI
2021-02-12 18:26:00 -08:00
Emmanuel T Odeke 93a898c756
projects/golang: add Emmanuel Odeke as a Go maintainer (#5189) 2021-02-12 18:12:57 -08:00
Frank Denis 27f13eb527
libsodium: don't use the stack for potentially large data (#5190)
* libsodium: don't use the stack for potentially large data

Also check return codes of verification functions, and properly
check the random implementation name.

* Add license headers
2021-02-12 18:10:40 -08:00
DavidKorczynski f26468f501
imageio: initial integration. (#4993)
* imageio: initial integration.

* Updated imageio set up following upstream merges.

* Remove whitespace to trigger CI.
2021-02-12 11:34:07 -08:00
asraa 0c3a9a314a
Add Yanjun (#5187)
Signed-off-by: Asra Ali <asraa@google.com>
2021-02-12 11:33:05 -08:00
Robert Löhning 0eb5d661d2
[qt] Enable i386 again (#5185)
We worked around the __mulodi4 problem in our sources.

This reverts parts of
a23f8971d6 and
008b9bcec6
2021-02-12 11:32:56 -08:00
Frank Denis af1cb300e9
Update contact address for libsodium (#5184)
Access to oss-fuzz requires an exact match, so remove the suffix from the address.

Fixes #5158
2021-02-12 11:32:35 -08:00
jonathanmetzman ae802f3017
[presubmit] Make sure to run build tests even if nonbuild tests fail (#5183)
Previously "and" shortcircuiting caused the build tests not to be
run if the non-build tests (which are run first) failed.
2021-02-12 09:24:13 -08:00
DavidKorczynski d3c2a2a145
utf8proc: enable afl and clenaup project.yaml (#5163) 2021-02-12 07:54:41 -08:00
DavidKorczynski e8d8ef1bc8
civetweb: enable remaining fuzzers. (#5162) 2021-02-12 06:04:44 -08:00
AdamKorcz 29762b0395
[cilium] Add Dockerfile (#4798)
Co-authored-by: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>
2021-02-12 04:25:30 -08:00
Robert Löhning 29bbb8a033
[qt] Disable afl for now (#5172)
It will take some time to make that build correctly.
2021-02-11 18:28:32 -08:00
AdamKorcz c1fb3fa6c7
Fixed small typo in projects/bad_example (#5174)
* [teleport] Initial integration

* Minor update to run tests again

* Fixed small typo in projects/bad_example
2021-02-11 15:26:07 -08:00
Guido Vranken d7ecce8a83
[wolfssl] Add more bignum fuzzers (#5165) 2021-02-11 10:56:36 -08:00
AdamKorcz 6c33afc31a
Update year in copyright header in documentation (#5167) 2021-02-11 10:56:09 -08:00
Jonathan Hui b68e5c0f9a
[openthread] move build script into openthread repo (#5160) 2021-02-10 12:08:21 -08:00
Evgeny Vereshchagin 4af2cfe3cf
bad_build_check: also look for call on x86_64 (#5159)
It should make the script compatible with binutils-2.36.1 (where
"callq" is no longer present in the output of objdump)

It was spotted in https://github.com/systemd/systemd/pull/18528
2021-02-10 09:43:18 -08:00
DavidKorczynski 281914ea8f
lighttpd: initial integration. (#5079)
* lighttpd: initial integration.

* Add header.

* fix syntaxt

* Updated the maintainer email.
2021-02-10 09:10:01 -08:00
DavidKorczynski 4d85eef7fe
libphone number: enable AFL. (#5143) 2021-02-10 09:08:56 -08:00
DavidKorczynski 6fdfdf2724
Removed constraints on fuzzers so we can have AFL and Honggfuzz too. (#5144) 2021-02-10 09:08:43 -08:00
DavidKorczynski a7bcc65019
snappy: enable afl (#5145)
* snappy: enable honggfuzz and afl engines

* Snappy: enable AFL.
2021-02-10 09:08:32 -08:00
DavidKorczynski eafe577ea9
fluent-bit: enable afl engine. (#5146) 2021-02-10 09:08:16 -08:00
DavidKorczynski 76fcbcbc67
opensc: enable afl and cleanup project yaml. (#5149) 2021-02-10 09:08:03 -08:00