Commit Graph

56 Commits

Author SHA1 Message Date
jonathanmetzman 6a13aa75cc
[CFL] minimize crashes (#7120)
* cifuzz: minimize crashes

* lnt

* fix typo
2022-01-12 18:10:03 +00:00
jonathanmetzman 2c6a7dde49
[cifuzz] Fix timeout in reproduce. (#6982)
* [cifuzz] Fix timeout in reproduce.

Consider the testcase unreproducible.

Fixes: https://github.com/google/oss-fuzz/issues/6952

* tmp

* tmp

* fix

* add comment

* tmp

* fix annoying heisenbug

* fmt
2021-12-14 11:32:18 -05:00
jonathanmetzman d7c9d57b6d
[cifuzz] Don't enforce OOM limit when no OOMs aren't reported (#6997)
Fixes https://github.com/google/clusterfuzzlite/issues/66
2021-12-14 09:46:16 -05:00
jonathanmetzman e96a5f8f40
Allow projects to always upload crashes even if they are "unreportable". (#6998)
Fixes https://github.com/google/clusterfuzzlite/issues/65
2021-12-13 12:04:04 -05:00
Oliver Chang 3895accdee
Remove stack_parser. (#6763)
Fixes #6762.
2021-11-04 09:34:32 -04:00
Oliver Chang a75844def0
Don't check for novel crash in batch fuzzing. (#6749)
* Don't check for novel crash in batch fuzzing.

* format
2021-11-03 10:10:42 -04:00
Oliver Chang a72ef3884f
Don't set seed for batch fuzzing. (#6736)
Fixes #6714.
2021-11-03 14:22:12 +11:00
jonathanmetzman 7693e9640c
[clusterfuzzlite] Make timeout and OOM reporting optional. (#6711)
OOMs will be reported by default. Timeouts wont.
Fixes: https://github.com/google/oss-fuzz/issues/6703
Should also fix: https://github.com/google/oss-fuzz/issues/6619
Fixes: https://github.com/google/oss-fuzz/issues/3432
Related: https://github.com/google/oss-fuzz/issues/6685
2021-11-02 08:01:46 -04:00
Oliver Chang ef0e5413c9
CFLite: Logging fixes. (#6715)
Don't output stacktrace again in detected bug log message.

Disable Python buffering to avoid log interleaving issues.
2021-11-02 16:50:59 +11:00
Oliver Chang f460c03c8a
cifuzz: Fix artifacts uploading issues. (#6646) 2021-10-27 12:24:26 +11:00
Oliver Chang 570c150a05
cifuzz: set log level to info by default. (#6604)
Also fix some logging issues:

- Don't output every single stacktrace when determining if a crash is reproducible.
  It outputs too many things into the logs and makes it hard to read. 

- Log OSS-Fuzz corpus path

- Fix a minor typo and an error log with deleting the xenial image.
2021-10-26 02:18:17 +00:00
jonathanmetzman 1d588e62cd
clusterfuzzlite: Upload builds after bad build check. (#6531)
Fixes: #6525
Depends on: #6530
2021-10-04 15:21:28 +00:00
Oliver Chang 525e9eccd0
Use libClusterFuzz for reproduction. (#6495)
Fixes #6326.
2021-09-24 05:46:13 +00:00
Oliver Chang fd34d343c3
Use libClusterFuzz for CIFuzz fuzzing and pruning. (#6375)
Part of #6326.
2021-09-13 12:16:13 +10:00
jonathanmetzman 94cfc4fe2f
[cifuzz] Add pruning task (#6188)
Fixes: #6064
2021-08-10 11:10:10 -07:00
jonathanmetzman d01808333d
[cifuzz] Fuzz in cifuzz-base (#6142)
Fixes: #5926
2021-08-05 13:27:24 -07:00
jonathanmetzman 88dba120a8
[CIFuzz][NFC] Add function for setting env vars in docker command. (#6162) 2021-08-04 14:19:22 -07:00
jonathanmetzman 8eb0455476
[CIFuzz] Allow users to specify if unreproducible crashes are reported (#6138) 2021-07-29 15:41:36 +00:00
jonathanmetzman c67d5b8626
[CIFuzz] Fix build uploading. (#6096)
Previously, the downloaded build was uploaded instead of the new build.
This regression was introduced when the big workspace change was made.
Also, add more logging.
2021-07-22 12:52:07 -07:00
jonathanmetzman 0672aa4e1f
[CIFuzz] Don't make everything a subdirectory of /out (#5970)
Use different subdirectories of workspace for builds, old builds, coverage reports, corpora and artifacts/testscases.
2021-06-30 07:34:42 -07:00
jonathanmetzman ae5e4228e8
[CIFuzz][ClusterFuzzLite] Implement batch fuzzing (#5963)
[ClusterFuzzLite] Support use of github actions as a filestore
2021-06-25 08:42:10 -07:00
jonathanmetzman 343e1b2d33
[CIFuzz] Add coverage report generation. (#5937)
Also:
1. Support coverage builds.
2. Add an integration test for coverage builds and reports.
3. Refactor docker code so that there is less duplication in getting arguments for docker run, in particular when handling container (production) vs no container (testing).
4. Rename coverage.py to get_coverage_report.
5. Add tests for untested functions in docker.py
6. Add a test for get_fuzz_target_runner.
2021-06-23 07:30:11 -07:00
jonathanmetzman de0cec2514
[CIFuzz] Improve fuzz_target.py (#5929)
* [CIFuzz] Clean up fuzz_target.py
1. Use CORPUS_DIR env var to set corpus so that corpus can be saved.
2. Clean up is_crash_novel.

* fix

* consistency

* improve logging messages, remove over-cautious check

* fix tests

* fix tests

* Make sure corpus path is mapped
2021-06-18 10:26:36 -07:00
jonathanmetzman 26dea63cde
[CIFuzz][NFC] Replace format strings with f-strings. (#5933)
Also replace % formatting.
2021-06-17 11:26:42 -07:00
jonathanmetzman dc6c44e2da
[CIFuzz][fuzz_target] Prepare for ClusterFuzzLite (#5845)
Return the path to the corpus in FuzzResult.
Also, refactor is_reportable: move code testing crash novelty
into its own method.
2021-05-26 17:09:21 +00:00
jonathanmetzman d7fe9935e6
Revert "[CIFuzz] End fuzzing docker processes properly (#5473)" (#5651)
* Revert "[CIFuzz] End fuzzing docker processes properly (#5473)"

This reverts commit c9b3d057b0.
This commit causes CIFuzz to hang.
2021-04-21 18:11:01 +00:00
asraa 1b9366c1be
[CIFuzz] fix bug (#5602)
Signed-off-by: Asra Ali <asraa@google.com>
2021-04-12 17:19:54 +00:00
jonathanmetzman c9b3d057b0
[CIFuzz] End fuzzing docker processes properly (#5473)
They only right way to do this properly seems to be using docker's container id file with docker stop.
Fixes #5423
2021-04-12 08:04:35 -07:00
jonathanmetzman 4cc3aa6343
[CIFuzz] Print crash stacktraces no matter what (#5474)
Even if we don't want to report them, print the stacktrace.
Related: https://github.com/google/oss-fuzz/issues/5461
2021-03-31 06:55:30 -07:00
jonathanmetzman 5ca736fe00
[CIFuzz] Fix issue deleting corpus (#5391)
Sometimes deleting the corpus in free_disk_if_needed exceptions.
Pass ignore_errors=True to fix this.
Related: #5383
2021-03-15 16:20:13 +00:00
jonathanmetzman 3465403f30
[CIFuzz] Add functionality to save diskspace (#5342)
* [CIFuzz] Add functionality to save diskspace.

Add a LOW_DISK_SPACE env/config var. When this is specified
(always true for Github actions) run_fuzzers will delete
base-builder and the project builder image before fuzzing.
After it finishes fuzzing with a target, it will also
delete the targets, its seed corpus and its corpus.

Related: #4879
2021-03-12 07:27:07 -08:00
jonathanmetzman 21b47a7a22
[cifuzz][NFC] Handle TODOs (#5104)
Handle some TODOs
1. Get rid of multiple return values and replace with a more sensible
return value.
2. Eliminate some useless TODOs.
2021-02-04 07:15:51 -08:00
jonathanmetzman 7f150fe75e
[cifuzz] Abstract-away OSS-Fuzz specific bits (#5088)
Abstract away OSS-Fuzz specific bits into the OSSFuzz implementation
of the ClusterFuzzDeployment class. This will make it easier to implement
support for other deployments of ClusterFuzz (including ClusterFuzzLite).
2021-02-03 12:46:19 -08:00
jonathanmetzman 95d3905ec9
[cifuzz] Support a batch fuzzing mode (#5073)
In this mode, CIFuzz will keep fuzzing until the time limit is reached, even if a crash was found.
2021-02-01 10:49:33 -08:00
Jonathan Metzman cb262dfbcb fmt/lnt 2021-01-20 06:51:30 -08:00
Jonathan Metzman 2ce7db4d47 Refactor coverage and move to own module 2021-01-20 06:47:48 -08:00
jonathanmetzman a43c85a54c [CIFuzz] Set CIFUZZ env var when building/checking/running CIFuzz fuzzers. (#4699)
Fixes https://github.com/google/oss-fuzz/issues/4604
2020-11-24 08:10:05 -08:00
jonathanmetzman f3c0204d10
[NFC][CIFuzz] Fix coding issues. (#4550)
Fix some coding and style issues.
1. Treat "testcase" as one word. This is consistent with ClusterFuzz.
2. Treat "stacktrace" as one word. This is consistent with ClusterFuzz.
3. Fix spelling of comments and words in code.
4. Use descriptive style docstrings and remove unnecessary clutter
(e.g. "Test the functionality of foo_function function in bar module"
becomes "Tests foo_function."
5. Use JSON for a list needed in testing instead of pickle.
2020-11-17 13:39:57 -08:00
jonathanmetzman 8daba1a1a1
[CIFuzz] Don't assume fuzzer output is ASCII (#4537)
[CIFuzz] Don't assume fuzzer output is ascii

This is wrong because the output can be arbitrary. Instead change
code that deals with the output to deal with bytes. The testcase,
which is derived from the output can be decoded as UTF-8 since it
will be a unix path.
2020-10-19 10:10:22 -07:00
jonathanmetzman 449ef28a87
[CIFuzz] Retry HTTP requests on certain errors (#4516)
Skia has seen some unhandled connection reset errors.
When we see these errors when downloading old OSS-Fuzz build, retry downloading it, since the error is likely transient.
2020-10-12 07:50:38 -07:00
Evgeny Vereshchagin 26e8d7c772
[CIFuzz] Add support for different sanitizers (#3969)
* Revert "Revert "[CIFuzz] Add support for different sanitizers (#3516)""

This reverts commit c580d0d626.

* cifuzz: pass "sanitizer" to the "run fuzzer" step

It's a follow-up to https://github.com/google/oss-fuzz/pull/3516 that
should fix https://github.com/google/oss-fuzz/issues/3727.

* [cifuzz] drop a $

That's another follow-up to #3516 that should help to pass sanitizer correctly.
Otherwise, it always falls back to address with:

2020-06-11 21:10:14,852 - root - INFO - $address is not a project sanitizer, defaulting to address.
2020-06-11 18:27:01 -07:00
jonathanmetzman 659d4e8228
Fix CIFuzz issue where targets assumed in OSS-Fuzz build if exists (#3817)
Make some other changes:
1. Refactor fuzz_target.py and fuzz_target_test.py
2. Introduce pyfakefs and parameterized as dependencies and use them
in tests.
3. Fix infra-tests in CI so that they use installed dependencies
2020-05-28 10:14:57 -07:00
Jonathan Metzman c580d0d626 Revert "[CIFuzz] Add support for different sanitizers (#3516)"
This reverts commit 9b30127675.
2020-04-28 14:38:10 -07:00
Leo Neat 9b30127675
[CIFuzz] Add support for different sanitizers (#3516) 2020-04-28 12:31:36 -07:00
Leo Neat a1c7499830
[CIFuzz] Logging updates (#3503)
Provide some simple logging updates to assert that affected fuzzers is running correctly.
Also prevents the clouding of longs when the reproduction script runs.
2020-03-16 10:00:56 -07:00
Leo Neat 6f02735d0c
[CIFuzz] Dynamic fuzzer scheduling (#3453)
Allocates time for fuzzers based on amount of fuzzing time left. This is beneficial when a fuzzer fails early in its allotted time because of a reproducible OSS-Fuzz bug. It will then give the remaining portion of its allotted time to the following fuzzers.
2020-03-13 10:35:33 -07:00
Leo Neat 7fb97cb3d6
[CIFuzz] Timeout orphan process fix (#3462)
This fix adds the -max_total_time argument to the cifuzz run_fuzzers command. The bug that was occurring was the docker process was being killed but the fuzzing was continuing wasting valuable compute resources. So a project with a large number of fuzzers would have all of them running by the end of CIFUzz leading to no actual fuzzing getting done because of resource scarcity. This patch should fix that.
2020-03-04 14:58:09 -08:00
Leo Neat f8a4ad1a8f
[CIFuzz] Reproduce bug fix (#3442)
This patch should fix the reproduce bug that has been occurring. It should distinguish between novel and old bugs better.
2020-02-27 15:33:00 -08:00
Leo Neat 2aa7a0d558
[CIFuzz] Use backup corpus for fuzzing (#3380)
This allows fuzzing using fuzz target's backup corpora. It will make fuzzing more efficient for targets that have a backup OSS-Fuzz corpus avaliable to the public. It will not effect targets that don't have backups.
2020-02-26 08:47:13 -08:00
Leo Neat 1522a7428c
[Infra] Add tests to presubmit (#3405)
Adds unit/integration tests to travis presubmit.
2020-02-21 08:47:13 -08:00